Skip to content

Commit

Permalink
display tests that failed
Browse files Browse the repository at this point in the history
  • Loading branch information
mgree committed Oct 19, 2019
1 parent 9491ad7 commit 132ee27
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/shell_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ tick() {
}

failed() {
failed_tests="$failed_tests${failed_tests+ }$1"

if debugging
then
msg "$1 failed"
Expand Down Expand Up @@ -102,6 +104,7 @@ mkdir -p ${TEST_LOGDIR}/shell

count=0
passed=0
failed_tests=""

# clear out other application FDs
exec 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-
Expand Down Expand Up @@ -198,6 +201,10 @@ then
fi

printf "${TEST_SCRIPT}: %d/%d tests passed\n" ${passed} ${count}
if [ "${failed_tests}" ]
then
printf "${TEST_SCRIPT} failing tests: ${failed_tests}\n"
fi

# set exit code
[ "${passed}" -eq "${count}" ]

0 comments on commit 132ee27

Please sign in to comment.