Created
October 20, 2014 14:55
-
-
Save delcypher/988d653ee79f0981d399 to your computer and use it in GitHub Desktop.
Patch for lit to handle errors under windows more cleanly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py | |
index af6e383..ca87b05 100644 | |
--- a/utils/lit/lit/TestRunner.py | |
+++ b/utils/lit/lit/TestRunner.py | |
@@ -144,13 +144,16 @@ def executeShCmd(cmd, cfg, cwd, results): | |
named_temp_files.append(f.name) | |
args[i] = f.name | |
- procs.append(subprocess.Popen(args, cwd=cwd, | |
- executable = executable, | |
- stdin = stdin, | |
- stdout = stdout, | |
- stderr = stderr, | |
- env = cfg.environment, | |
- close_fds = kUseCloseFDs)) | |
+ try: | |
+ procs.append(subprocess.Popen(args, cwd=cwd, | |
+ executable = executable, | |
+ stdin = stdin, | |
+ stdout = stdout, | |
+ stderr = stderr, | |
+ env = cfg.environment, | |
+ close_fds = kUseCloseFDs)) | |
+ except OSError as e: | |
+ raise InternalShellError(j, 'Could not create process due to {}'.format(e)) | |
# Immediately close stdin for any process taking stdin from us. | |
if stdin == subprocess.PIPE: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment