diff --git a/.travis.yml b/.travis.yml index e245b1a..61a1909 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,9 @@ +os: + - linux + - osx + language: python python: - '3.5' + script: ./t/regress.sh diff --git a/t/regress.sh b/t/regress.sh index a7bdd64..41af06e 100755 --- a/t/regress.sh +++ b/t/regress.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +. $(dirname $0)/regress_util.sh + ## List of tests to ignore test_ignore_list=( test_fail ) ignore_test () { @@ -11,9 +13,6 @@ ignore_test () { fi } -test_root=$(dirname $(readlink -f $0)) -wit_root=$(readlink -f $test_root/..) - export PATH=$wit_root:${PATH} timestamp=`date +'%Y-%m-%dT%H-%M-%S'` diff --git a/t/regress_util.sh b/t/regress_util.sh index d919a04..3108509 100755 --- a/t/regress_util.sh +++ b/t/regress_util.sh @@ -1,8 +1,8 @@ #!/bin/sh +test_root=$(dirname $(perl -MCwd -M5.14.0 -e "say Cwd::realpath('$0')")) +wit_root=$(perl -MCwd -M5.14.0 -e "say Cwd::realpath('$test_root/..')") wit_repo='git@github.com:sifive/wit' -test_root=$(dirname $(readlink -f $0)) -wit_root=$(readlink -f $test_root/..) export PATH=$wit_root:${PATH}