aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Ollila <tomi.ollila@iki.fi>2017-01-04 16:53:47 +0200
committerDavid Bremner <david@tethera.net>2017-03-10 08:21:28 -0400
commitd6a735423b94fb1ad8c6c59fe3efde42aa8020cb (patch)
treec34faedb61b50adce8f766a920416dc12024280d
parentae05839028d59cbed09122752658543f68666423 (diff)
test: atomicity.py: improve exit probability on failure
Some gdb python exceptions on some os environments (e.g. macOS Sierra, non-codesigned gdb) do not make gdb exit (but to drop down to nonexistent command line?). Mitigate this chance by explict SystemExit on all exceptions. The contents of output file 'gdb.out' is unchanged.
-rw-r--r--test/atomicity.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/atomicity.py b/test/atomicity.py
index 1ca52b9c..389517e1 100644
--- a/test/atomicity.py
+++ b/test/atomicity.py
@@ -71,4 +71,8 @@ class RenameBreakpoint(gdb.Breakpoint):
return False
RenameBreakpoint('rename')
-gdb.execute('run')
+try:
+ gdb.execute('run')
+except Exception:
+ import traceback
+ raise SystemExit(traceback.format_exc())