[Lldb-commits] [lldb] r228472 - Dont' use close_fds = True on Windows.
Zachary Turner
zturner at google.com
Fri Feb 6 16:14:55 PST 2015
Author: zturner
Date: Fri Feb 6 18:14:55 2015
New Revision: 228472
URL: http://llvm.org/viewvc/llvm-project?rev=228472&view=rev
Log:
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.
Modified:
lldb/trunk/test/dosep.py
Modified: lldb/trunk/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=228472&r1=228471&r2=228472&view=diff
==============================================================================
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Fri Feb 6 18:14:55 2015
@@ -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."""
More information about the lldb-commits
mailing list