changeset 18383:6880eae9f861

run-tests: exit cleanly if parallel run is interrupted If interrupted while running with "--jobs N", run-tests asynchronously spewed a bunch of output and backtraces from both the master and slave processes, leaving the terminal full of goop. This patch makes it behave more sensibly.
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 15 Jan 2013 13:33:28 -0800
parents f3b21beb9802
children e389a25e7e60
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Jan 13 01:39:16 2013 -0600
+++ b/tests/run-tests.py	Tue Jan 15 13:33:28 2013 -0800
@@ -1125,8 +1125,8 @@
         pid, status, fp = waitq.get()
         try:
             childresults = pickle.load(fp)
-        except pickle.UnpicklingError:
-            pass
+        except (pickle.UnpicklingError, EOFError):
+            sys.exit(255)
         else:
             passed += len(childresults['p'])
             skipped += len(childresults['s'])
@@ -1221,7 +1221,8 @@
             outputcoverage(options)
     except KeyboardInterrupt:
         failed = True
-        print "\ninterrupted!"
+        if not options.child:
+            print "\ninterrupted!"
 
     if failed:
         sys.exit(1)