[libcxx] r232526 - Fix failed test command repro printing for *.pass.cpp tests

Jonathan Roelofs jonathan at codesourcery.com
Tue Mar 17 12:32:24 PDT 2015


Author: jroelofs
Date: Tue Mar 17 14:32:24 2015
New Revision: 232526

URL: http://llvm.org/viewvc/llvm-project?rev=232526&view=rev
Log:
Fix failed test command repro printing for *.pass.cpp tests

Before we were printing out the compile command twice, which isn't that useful.

Thanks EricWF for the report!

Modified:
    libcxx/trunk/test/libcxx/test/executor.py
    libcxx/trunk/test/libcxx/test/format.py

Modified: libcxx/trunk/test/libcxx/test/executor.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/executor.py?rev=232526&r1=232525&r2=232526&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/executor.py (original)
+++ libcxx/trunk/test/libcxx/test/executor.py Tue Mar 17 14:32:24 2015
@@ -17,7 +17,7 @@ class Executor(object):
             file_deps: [str]: Files required by the test
             env: {str: str}:  Environment variables to execute under
         Returns:
-            out, err, exitCode
+            cmd, out, err, exitCode
         """
         raise NotImplementedError
 
@@ -34,7 +34,8 @@ class LocalExecutor(Executor):
             env_cmd += ['%s=%s' % (k, v) for k, v in env.items()]
         if work_dir == '.':
             work_dir = os.getcwd()
-        return executeCommand(env_cmd + cmd, cwd=work_dir)
+        out, err, rc = executeCommand(env_cmd + cmd, cwd=work_dir)
+        return (env_cmd + cmd, out, err, rc)
 
 
 class PrefixExecutor(Executor):
@@ -129,6 +130,9 @@ class RemoteExecutor(Executor):
                 srcs.extend(file_deps)
                 dsts.extend(dev_paths)
             self.copy_in(srcs, dsts)
+            # TODO(jroelofs): capture the copy_in and delete_remote commands,
+            # and conjugate them with '&&'s around the first tuple element
+            # returned here:
             return self._execute_command_remote(cmd, target_cwd, env)
         finally:
             if target_cwd:

Modified: libcxx/trunk/test/libcxx/test/format.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/format.py?rev=232526&r1=232525&r2=232526&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/format.py (original)
+++ libcxx/trunk/test/libcxx/test/format.py Tue Mar 17 14:32:24 2015
@@ -125,8 +125,8 @@ class LibcxxTestFormat(object):
             # should add a `// FILE-DEP: foo.dat` to each test to track this.
             data_files = [os.path.join(local_cwd, f)
                           for f in os.listdir(local_cwd) if f.endswith('.dat')]
-            out, err, rc = self.executor.run(exec_path, [exec_path],
-                                             local_cwd, data_files, env)
+            cmd, out, err, rc = self.executor.run(exec_path, [exec_path],
+                                                  local_cwd, data_files, env)
             if rc != 0:
                 report = libcxx.util.makeReport(cmd, out, err, rc)
                 report = "Compiled With: %s\n%s" % (compile_cmd, report)





More information about the cfe-commits mailing list