Skip to content

Commit

Permalink
Merge pull request cram2#291 from telemux/test_script
Browse files Browse the repository at this point in the history
Update test script to print error message
  • Loading branch information
artnie authored Jul 20, 2023
2 parents 7932edb + 0300ee4 commit 5104221
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cram_common/cram_tests/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,23 @@ EOF
# create lisp script and run tests for every system under test
for system in "${systems_under_test[@]}"; do
echo "-------- System $system under test --------"

create_test_script $system $report_file
let starttime=$(date +%s)
# if the tests get stuck, e.g. on a memory fault, terminate them after 3 minutes to continue
timeout 3m /usr/bin/sbcl --dynamic-space-size 8192 --noinform --disable-debugger --load $tmp_test_script --quit
if [ $? -eq 124 ]
error_code=$(echo $?)

if [ $error_code -eq 124 ]
then
echo "Tests for system $system timed out after 3 minutes. Terminating."
echo "Tests for system $system timed out after 3 minutes. Terminating." >> $report_file
elif [ $error_code -eq 1 ]
then
echo "Tests for system $system exits with error." >> $report_file
else
echo "Finished in $(expr $(date +%s) - $starttime) seconds."
echo "Finished successfully in $(expr $(date +%s) - $starttime) seconds."
fi
done

# print the test report
cat $report_file

0 comments on commit 5104221

Please sign in to comment.