[libcxx-commits] [PATCH] D122016: Allow test suite run to be interupted using ctrl-C.

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 18 09:58:00 PDT 2022


EricWF created this revision.
Herald added a subscriber: arichardson.
Herald added a project: All.
EricWF abandoned this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
EricWF updated this revision to Diff 416535.
EricWF added a comment.
EricWF published this revision for review.

Not sure what Arc is asking


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122016

Files:
  libcxx/utils/run.py


Index: libcxx/utils/run.py
===================================================================
--- libcxx/utils/run.py
+++ libcxx/utils/run.py
@@ -16,10 +16,10 @@
 import argparse
 import os
 import platform
+import signal
 import subprocess
 import sys
 
-
 def main():
     parser = argparse.ArgumentParser()
     parser.add_argument('--execdir', type=str, required=True)
@@ -54,8 +54,10 @@
             env['TEMP'] = os.environ.get('TEMP')
 
     # Run the command line with the given environment in the execution directory.
-    return subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False)
-
+    exitCode = subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False)
+    if exitCode == -signal.SIGINT:
+        raise KeyboardInterrupt
+    return exitCode
 
 if __name__ == '__main__':
     exit(main())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122016.416535.patch
Type: text/x-patch
Size: 834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220318/1b873091/attachment-0001.bin>


More information about the libcxx-commits mailing list