[libcxx] r222717 - Use lit.util.executeCommand instead of our own version
Eric Fiselier
eric at efcs.ca
Mon Nov 24 19:03:33 PST 2014
Author: ericwf
Date: Mon Nov 24 21:03:32 2014
New Revision: 222717
URL: http://llvm.org/viewvc/llvm-project?rev=222717&view=rev
Log:
Use lit.util.executeCommand instead of our own version
Modified:
libcxx/trunk/test/lit.cfg
Modified: libcxx/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=222717&r1=222716&r2=222717&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Mon Nov 24 21:03:32 2014
@@ -36,24 +36,6 @@ class LibcxxTestFormat(lit.formats.FileB
self.ld_flags = list(ld_flags)
self.exec_env = dict(exec_env)
- def execute_command(self, command, in_dir=None):
- kwargs = {
- 'stdin' :subprocess.PIPE,
- 'stdout':subprocess.PIPE,
- 'stderr':subprocess.PIPE,
- }
- if in_dir:
- kwargs['cwd'] = in_dir
- p = subprocess.Popen(command, **kwargs)
- out, err = p.communicate()
- exitCode = p.wait()
-
- # Detect Ctrl-C in subprocess.
- if exitCode == -signal.SIGINT:
- raise KeyboardInterrupt
-
- return out, err, exitCode
-
def execute(self, test, lit_config):
while True:
try:
@@ -121,7 +103,7 @@ class LibcxxTestFormat(lit.formats.FileB
if use_verify:
cmd += ['-Xclang', '-verify']
- out, err, rc = self.execute_command(cmd)
+ out, err, rc = lit.util.executeCommand(cmd)
return cmd, out, err, rc
def _clean(self, exec_path):
@@ -136,7 +118,7 @@ class LibcxxTestFormat(lit.formats.FileB
cmd.append(exec_path)
if lit_config.useValgrind:
cmd = lit_config.valgrindArgs + cmd
- out, err, exitCode = self.execute_command(cmd, in_dir)
+ out, err, exitCode = lit.util.executeCommand(cmd, cwd=in_dir)
return cmd, out, err, exitCode
def _evaluate_test(self, test, use_verify, lit_config):
More information about the cfe-commits
mailing list