diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rwxr-xr-x | test/002-test-key-name.test/run.sh | 3 | ||||
-rwxr-xr-x | test/run-tests.sh | 7 |
3 files changed, 10 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 0504a5e..8e0bf25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: c compiler: gcc +os: osx script: + - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CFLAGS="-I/usr/local/opt/openssl/include $CFLAGS" LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"; fi' - make all test diff --git a/test/002-test-key-name.test/run.sh b/test/002-test-key-name.test/run.sh index e4b4acb..f9fd5c3 100755 --- a/test/002-test-key-name.test/run.sh +++ b/test/002-test-key-name.test/run.sh @@ -29,6 +29,7 @@ if [ "$found" = "$real" ] ; then rm $stderr exit 0 else - echo "Error: No match" + echo "Error: No match. Key file contents:" + cat "$key" exit 1 fi diff --git a/test/run-tests.sh b/test/run-tests.sh index b7f7856..68a3adf 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -4,7 +4,6 @@ fail() { echo -e '[\e[1;31mFAIL\e[0m] '"$i:" "$@" - exit 1 } pass() @@ -18,6 +17,7 @@ check_expected() if [ -f "$1.expected" ] ; then if ! diff "$1.expected" "$1.tmp" >/dev/null; then fail "$1 didn't match expected" + exit 1 fi fi } @@ -28,6 +28,11 @@ for i in *.test ; do pushd "${i}" >/dev/null if ! ( . ./run.sh ) 2>stderr.tmp >stdout.tmp; then fail "script had non-zero return code" + echo "stderr:" + cat stderr.tmp + echo "stdout:" + cat stdout.tmp + exit 1 fi check_expected stdout |