Boost tests: tee to error.log for SDL init failure check.

This commit is contained in:
Tommy 2022-06-11 02:14:00 +12:00
parent cc3ab60be0
commit 18f0de5d6e

View file

@ -1,9 +1,13 @@
#!/bin/bash
gdb -q -batch -return-child-result -ex "set disable-randomization off" -ex "set style enabled on" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests --color_output --log_level=test_suite
# propagate failure codes across pipes
set -o pipefail
gdb -q -batch -return-child-result -ex "set disable-randomization off" -ex "set style enabled on" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests --color_output --log_level=test_suite 2>&1 | tee error.log
error_code="$?"
while grep -q 'Could not initialize SDL_video' error.log; do
echo "Could not initialize SDL_video error, retrying..."
gdb -q -batch -return-child-result -ex "set style enabled on" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests --color_output --log_level=test_suite
gdb -q -batch -return-child-result -ex "set style enabled on" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests --color_output --log_level=test_suite 2>&1 | tee error.log
error_code="$?"
done