tests/tcg: better trap gdb failures

It seems older and non-multiarach aware GDBs might not fail gracefully
when faced with something they don't know. For example when faced with
a target XML for s390x the Ubuntu 18.04 gdb will generate an internal
fault and prompt for a core dump.

Work around this by invoking GDB in a more batch orientated way and
then trying to filter out between test failures and gdb failures.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200430190122.4592-4-alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée 2020-04-30 20:01:16 +01:00
parent 38c1c09839
commit d2fefdedd3
3 changed files with 18 additions and 3 deletions

View file

@ -70,7 +70,6 @@ except (gdb.error, AttributeError):
try:
# These are not very useful in scripts
gdb.execute("set pagination off")
gdb.execute("set confirm off")
# Run the actual tests
run_test()