[commit: ghc] master: testsuite: Print summary even if interrupted (a3c0b42)

git at git.haskell.org git at git.haskell.org
Thu Jun 14 09:34:44 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a3c0b42ee6abe0b0fa4cf6f24a7011c5ebcb0225/ghc

>---------------------------------------------------------------

commit a3c0b42ee6abe0b0fa4cf6f24a7011c5ebcb0225
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Jun 14 12:33:35 2018 +0300

    testsuite: Print summary even if interrupted
    
    Fixes #15265.
    
    Reviewers: osa1
    
    Reviewed By: osa1
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #15265
    
    Differential Revision: https://phabricator.haskell.org/D4841


>---------------------------------------------------------------

a3c0b42ee6abe0b0fa4cf6f24a7011c5ebcb0225
 testsuite/driver/runtests.py | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 622e2ea..811a6e0 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -308,21 +308,24 @@ else:
     watcher = Watcher(len(parallelTests))
 
     # Now run all the tests
-    for oneTest in parallelTests:
-        if stopping():
-            break
-        oneTest(watcher)
-
-    # wait for parallel tests to finish
-    if not stopping():
-        watcher.wait()
-
-    # Run the following tests purely sequential
-    config.use_threads = False
-    for oneTest in aloneTests:
-        if stopping():
-            break
-        oneTest(watcher)
+    try:
+        for oneTest in parallelTests:
+            if stopping():
+                break
+            oneTest(watcher)
+
+        # wait for parallel tests to finish
+        if not stopping():
+            watcher.wait()
+
+        # Run the following tests purely sequential
+        config.use_threads = False
+        for oneTest in aloneTests:
+            if stopping():
+                break
+            oneTest(watcher)
+    except KeyboardInterrupt:
+        pass
 
     # flush everything before we continue
     sys.stdout.flush()



More information about the ghc-commits mailing list