diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2018-06-14 12:33:35 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-06-14 12:33:53 +0300 |
commit | a3c0b42ee6abe0b0fa4cf6f24a7011c5ebcb0225 (patch) | |
tree | 26c567a256e0efbc3b5c4fd0265fce97e98a530e | |
parent | b5ccee49f96e093854133fb431d75b757988f794 (diff) | |
download | haskell-a3c0b42ee6abe0b0fa4cf6f24a7011c5ebcb0225.tar.gz |
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
-rw-r--r-- | testsuite/driver/runtests.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 622e2ea550..811a6e0abb 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() |