Skip to content

Commit

Permalink
Updated build.sh so that build.sh exits with failure when a crashed t…
Browse files Browse the repository at this point in the history
…est is detected.
  • Loading branch information
mabruzzo committed Aug 4, 2021
1 parent c53c505 commit d2a03c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ printf "done\n"
printf "done\n" >> $log

# TESTS

count_test_crashes=0
if [ $target == "test" ]; then

rm -f test/STOP
Expand Down Expand Up @@ -203,6 +203,7 @@ if [ $target == "test" ]; then
crash=$((test_begin - $test_end))

if [ $crash != 0 ]; then
let "count_test_crashes++"
line=" CRASH: $test\n"
printf "$line"
printf "$line" >> $log
Expand Down Expand Up @@ -258,6 +259,7 @@ if [ $target == "test" ]; then

echo "Test run summary"
echo
echo " Test runs crashed: $count_test_crashes"
echo " Test runs attempted: $count_attempted"
echo " Test runs started: $count_started"
if [ $count_attempted -gt $count_started ]; then
Expand All @@ -273,7 +275,7 @@ if [ $target == "test" ]; then
fi
echo

if [ $f -gt 0 ] || [ $crash -gt 0 ] ; then
if [ $f -gt 0 ] || [ $count_test_crashes -gt 0 ] ; then
echo "Exiting testing with failures:"
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
cat "$dir/fail.$configure"
Expand Down

0 comments on commit d2a03c8

Please sign in to comment.