]> git.notmuchmail.org Git - notmuch/commitdiff
test: atomicity.py: improve exit probability on failure
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 4 Jan 2017 14:53:47 +0000 (16:53 +0200)
committerDavid Bremner <david@tethera.net>
Fri, 10 Mar 2017 12:21:28 +0000 (08:21 -0400)
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.

test/atomicity.py

index 1ca52b9c4f73aad5966e44e3dff8505b1d9e348f..389517e1571e0b6590d068ef9cc9c13a98b44a40 100644 (file)
@@ -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())