Skip to content

Commit

Permalink
Exit with correct exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtBIT committed Apr 24, 2018
1 parent c059e3b commit e748ec2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/run
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ for test_suite_filepath in $TESTS/test_*; do
(( max_length+=2 ))
for test_function in ${test_functions[@]}; do
$test_function
if [ $? -eq 0 ]; then
exit_status=$?
if [ $exit_status -eq 0 ]; then
test_status="green(OK)"
else
test_status="red(FAIL)"
fi
tintf " %-${max_length}s [ %s ]\n" "$test_function" "$test_status"
if [ $? -gt 0 ]; then
exit $?
if [ $exit_status -gt 0 ]; then
exit $exit_status
fi
done
done

0 comments on commit e748ec2

Please sign in to comment.