From 72dec38d88a607f90cba229a60c98a0703fc32f7 Mon Sep 17 00:00:00 2001
From: Matthew Laird <lairdm@ebi.ac.uk>
Date: Fri, 29 Jan 2016 16:24:44 +0000
Subject: [PATCH] - Added whitespace back in to .travis.yml - Modified harness
 to use $ENSDIR as the root dir if available

---
 .travis.yml         | 65 ++++++++++++++++++++++++++-------------------
 travisci/harness.sh |  8 +++---
 2 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bdfc59e501..259325ae8f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,41 +1,52 @@
-language: perl
+language: "perl"
+
 perl:
-- '5.14'
-- '5.12'
-- '5.10'
+  - "5.14"
+  - "5.12"
+  - "5.10"
+
 env:
-- COVERALLS=true  DB=mysql
-- COVERALLS=false DB=mysql
-- COVERALLS=false DB=sqlite
+  - COVERALLS=true  DB=mysql
+  - COVERALLS=false DB=mysql
+  - COVERALLS=false DB=sqlite
+  
 sudo: false
+  
 addons:
   apt:
     packages:
     - unzip
+
 before_install:
-- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-test.git
-- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-variation.git
-- wget https://github.com/bioperl/bioperl-live/archive/bioperl-release-1-2-3.zip
-- unzip bioperl-release-1-2-3.zip
+    - git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-test.git
+    - git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-variation.git
+    - wget http://bioperl.org/DIST/BioPerl-1.6.1.tar.gz
+    - tar zxvf BioPerl-1.6.1.tar.gz
+
+
 install:
-- cpanm -v --installdeps --notest .
-- cpanm -n Devel::Cover::Report::Coveralls
-- cpanm -n DBD::SQLite
-- cp travisci/MultiTestDB.conf.travisci.mysql  modules/t/MultiTestDB.conf.mysql
-- cp travisci/MultiTestDB.conf.travisci.SQLite modules/t/MultiTestDB.conf.SQLite
-script: ./travisci/harness.sh
+    - cpanm -v --installdeps --notest .
+    - cpanm -n Devel::Cover::Report::Coveralls
+    - cpanm -n DBD::SQLite
+    - cp travisci/MultiTestDB.conf.travisci.mysql  modules/t/MultiTestDB.conf.mysql
+    - cp travisci/MultiTestDB.conf.travisci.SQLite modules/t/MultiTestDB.conf.SQLite
+
+script: "./travisci/harness.sh"
+
+# Get the matrix to only build coveralls support when on 5.10
 matrix:
   exclude:
-  - perl: '5.10'
-    env: COVERALLS=false DB=mysql
-  - perl: '5.12'
-    env: COVERALLS=false DB=sqlite
-  - perl: '5.12'
-    env: COVERALLS=true  DB=mysql
-  - perl: '5.14'
-    env: COVERALLS=false DB=sqlite
-  - perl: '5.14'
-    env: COVERALLS=true  DB=mysql
+    - perl: "5.10"
+      env: COVERALLS=false DB=mysql
+    - perl: "5.12"
+      env: COVERALLS=false DB=sqlite
+    - perl: "5.12"
+      env: COVERALLS=true  DB=mysql
+    - perl: "5.14"
+      env: COVERALLS=false DB=sqlite
+    - perl: "5.14"
+      env: COVERALLS=true  DB=mysql
+
 notifications:
   email:
     on_success: always
diff --git a/travisci/harness.sh b/travisci/harness.sh
index c4a53b48aa..b1bcb90e64 100755
--- a/travisci/harness.sh
+++ b/travisci/harness.sh
@@ -1,6 +1,8 @@
 #!/bin/bash
 
-export PERL5LIB=$PWD/bioperl-live-bioperl-release-1-2-3:$PWD/ensembl-test/modules:$PWD/modules:$PWD/ensembl-variation/modules
+ENSDIR="${ENSDIR:-$PWD}"
+
+export PERL5LIB=$ENSDIR/bioperl-live:$ENSDIR/ensembl-test/modules:$PWD/modules:$ENSDIR/ensembl-variation/modules
 export TEST_AUTHOR=$USER
 
 if [ "$DB" = 'mysql' ]; then
@@ -15,9 +17,9 @@ fi
 
 echo "Running test suite"
 if [ "$COVERALLS" = 'true' ]; then
-  PERL5OPT='-MDevel::Cover=+ignore,bioperl,+ignore,ensembl-test,+ignore,ensembl-variation' perl $PWD/ensembl-test/scripts/runtests.pl -verbose modules/t $SKIP_TESTS
+  PERL5OPT='-MDevel::Cover=+ignore,bioperl,+ignore,ensembl-test,+ignore,ensembl-variation' perl $ENSDIR/ensembl-test/scripts/runtests.pl -verbose modules/t $SKIP_TESTS
 else
-  perl $PWD/ensembl-test/scripts/runtests.pl modules/t $SKIP_TESTS
+  perl $ENSDIR/ensembl-test/scripts/runtests.pl modules/t $SKIP_TESTS
 fi
 
 rt=$?
-- 
GitLab