Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test script to print error message #291

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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