diff options
author | P. J. McDermott <pjm@nac.net> | 2012-09-09 18:32:26 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-09-09 18:32:26 (EDT) |
commit | 3e94506db49e011534281784fd07f38d4f688cc8 (patch) | |
tree | 7dfb18b69144257d5fad744950570466545c076e /tests | |
parent | 55e8ff7f93260d2a427daeec56dafdfa418368e5 (diff) |
Set non-zero exit status on test failures.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/common.sh | 1 | ||||
-rw-r--r-- | tests/deps.sh | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/common.sh b/tests/common.sh index c32b3a1..ff3c9a8 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -51,4 +51,5 @@ test_assert() printf 'Assertion failed with exit status %d:\n %s\n' \ "${es}" "${*}" fi + return "${es}" } diff --git a/tests/deps.sh b/tests/deps.sh index 12f4a25..1d4aa99 100644 --- a/tests/deps.sh +++ b/tests/deps.sh @@ -21,6 +21,8 @@ ob_use deps +ret=0 + while read line; do line="${line%%#*}" @@ -43,8 +45,11 @@ EOF printf 'Testing component "%s"...\n' "${comp}" test_assert [ "'$(eval echo \$\{test_${comp}\})'" = \ "'$(eval echo \$\{good_${comp}\})'" ] + [ ${?} -ne 0 ] && ret=1 done printf '\n' done <'depstab' + +exit ${ret} |