CI: Enable coloured output for gdb backtraces.

This commit is contained in:
Tommy 2022-06-09 16:09:27 +12:00
parent 1cffa2e8fd
commit 80c914cd81
3 changed files with 5 additions and 5 deletions

View File

@ -237,7 +237,7 @@ class WesnothRunner:
print("Wesnoth exited because of signal", -res.returncode)
if options.backtrace:
print("Launching GDB for a backtrace...")
gdb_args = ["gdb", "-q", "-batch", "-ex", "start", "-ex", "continue", "-ex", "bt", "-ex", "quit", "--args"]
gdb_args = ["gdb", "-q", "-batch", "-ex", "set style enabled on", "-ex", "start", "-ex", "continue", "-ex", "bt", "-ex", "quit", "--args"]
gdb_args.extend(args)
subprocess.run(gdb_args, timeout=240)
test_summary.crash_test(test_list)

View File

@ -1,9 +1,9 @@
#!/bin/bash
gdb -q -batch -return-child-result -ex "set disable-randomization off" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth -m --controller 1:ai --controller 2:ai --nogui 2> error.log
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 ./wesnoth -m --controller 1:ai --controller 2:ai --nogui 2> 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 "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth -m --controller 1:ai --controller 2:ai --nogui 2> error.log
gdb -q -batch -return-child-result -ex "set style enabled on" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth -m --controller 1:ai --controller 2:ai --nogui 2> error.log
error_code="$?"
done
cat error.log

View File

@ -1,9 +1,9 @@
#!/bin/bash
gdb -q -batch -return-child-result -ex "set disable-randomization off" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests 2> error.log
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 2> 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 "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests 2> error.log
gdb -q -batch -return-child-result -ex "set style enabled on" -ex "run" -ex "thread apply all bt" -ex "quit" --args ./boost_unit_tests 2> error.log
error_code="$?"
done
cat error.log