diff options
| author | Zachary Turner <zturner@google.com> | 2015-02-07 00:14:55 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-02-07 00:14:55 +0000 |
| commit | dc494d5303e01c36237de42ec09077b03b58fa88 (patch) | |
| tree | 51e931fe370e003c1199ef31e621e0b5d2e2317a | |
| parent | e07f13ae35e82e5579d0d9f0dc05fd0321c6bba2 (diff) | |
| download | bcm5719-llvm-dc494d5303e01c36237de42ec09077b03b58fa88.tar.gz bcm5719-llvm-dc494d5303e01c36237de42ec09077b03b58fa88.zip | |
Dont' use close_fds = True on Windows.
If you do, the test runner will fail immediately with the error:
close_fds is not supported on Windows platforms if you redirect
stdin/stdout/stderr.
llvm-svn: 228472
| -rwxr-xr-x | lldb/test/dosep.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lldb/test/dosep.py b/lldb/test/dosep.py index e397eabf290..dd437618eaa 100755 --- a/lldb/test/dosep.py +++ b/lldb/test/dosep.py @@ -55,11 +55,18 @@ eTimedOut, ePassed, eFailed = 124, 0, 1 def call_with_timeout(command, timeout): """Run command with a timeout if possible.""" - if timeout_command and timeout != "0": - return subprocess.call([timeout_command, timeout] + command, - stdin=subprocess.PIPE, close_fds=True) - return (ePassed if subprocess.call(command, stdin=subprocess.PIPE, close_fds=True) == 0 - else eFailed) + if os.name != "nt": + if timeout_command and timeout != "0": + return subprocess.call([timeout_command, timeout] + command, + stdin=subprocess.PIPE, close_fds=True) + return (ePassed if subprocess.call(command, stdin=subprocess.PIPE, close_fds=True) == 0 + else eFailed) + else: + if timeout_command and timeout != "0": + return subprocess.call([timeout_command, timeout] + command, + stdin=subprocess.PIPE) + return (ePassed if subprocess.call(command, stdin=subprocess.PIPE) == 0 + else eFailed) def process_dir(root, files, test_root, dotest_options): """Examine a directory for tests, and invoke any found within it.""" |

