[libcxxabi] r222718 - Use lit.util.executeCommand instead of our own version

Eric Fiselier eric at efcs.ca
Mon Nov 24 19:06:31 PST 2014


Author: ericwf
Date: Mon Nov 24 21:06:31 2014
New Revision: 222718

URL: http://llvm.org/viewvc/llvm-project?rev=222718&view=rev
Log:
Use lit.util.executeCommand instead of our own version

Modified:
    libcxxabi/trunk/test/lit.cfg

Modified: libcxxabi/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.cfg?rev=222718&r1=222717&r2=222718&view=diff
==============================================================================
--- libcxxabi/trunk/test/lit.cfg (original)
+++ libcxxabi/trunk/test/lit.cfg Mon Nov 24 21:06:31 2014
@@ -28,24 +28,6 @@ class LibcxxabiTestFormat(lit.formats.Fi
         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:
@@ -111,7 +93,7 @@ class LibcxxabiTestFormat(lit.formats.Fi
             compile_cmd = [self.cxx_under_test, '-o', exec_path,
                    source_path] + self.cpp_flags + self.ld_flags
             cmd = compile_cmd
-            out, err, exitCode = self.execute_command(cmd)
+            out, err, exitCode = lit.util.executeCommand(cmd)
             if exitCode != 0:
                 report = """Command: %s\n""" % ' '.join(["'%s'" % a
                                                          for a in cmd])
@@ -131,7 +113,7 @@ class LibcxxabiTestFormat(lit.formats.Fi
             cmd.append(exec_path)
             if lit_config.useValgrind:
                 cmd = lit_config.valgrindArgs + cmd
-            out, err, exitCode = self.execute_command(cmd, source_dir)
+            out, err, exitCode = lit.util.executeCommand(cmd, cwd=source_dir)
             if exitCode != 0:
                 report = """Compiled With: %s\n""" % \
                     ' '.join(["'%s'" % a for a in compile_cmd])





More information about the cfe-commits mailing list