diff --git a/.travis.yml b/.travis.yml index 30f5fa2..7abf0e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,12 @@ os: - linux - osx +env: + - TEST_SHELLS="zsh bash" + - TEST_SHELLS=bash + - TEST_SHELLS=zsh + - HI=mom + install: - ./test/support/travisci_deps.sh diff --git a/run_tests.sh b/run_tests.sh index fff4438..877f9ed 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -3,8 +3,15 @@ failed=false +# allow list of shells to run tests in to be overriden by environment variable +# if empty or null, use defaults +if [ -z "$TEST_SHELLS" ]; then + TEST_SHELLS="bash zsh" +fi + +echo "== Will run all tests with following shells: ${TEST_SHELLS}" for test in $(find test/lib -name *_test.sh); do - for shell in bash zsh; do + for shell in $TEST_SHELLS; do echo "== Running tests with [$shell]: $test" $shell $test || failed=true done @@ -16,4 +23,4 @@ if [ "$failed" = "true" ]; then else echo "All tests passed!" return 0; -fi \ No newline at end of file +fi