[PATCH] libcxx: Enhance lit test command in verbose mode.

Logan Chien tzuhsiang.chien at gmail.com
Sat May 16 05:24:09 PDT 2015


Hi rengolin, EricWF,

Print both the compiler command and linker command so that it will be
easier for developers to reproduce the failed test cases.

http://reviews.llvm.org/D9807

Files:
  test/libcxx/compiler.py

Index: test/libcxx/compiler.py
===================================================================
--- test/libcxx/compiler.py
+++ test/libcxx/compiler.py
@@ -107,12 +107,15 @@
             # Otherwise wrap the filename in a context manager function.
             with_fn = lambda: libcxx.util.nullContext(object_file)
         with with_fn() as object_file:
-            cmd, output, err, rc = self.compile(source_file, object_file,
-                                                flags=flags, env=env, cwd=cwd)
+            cc_cmd, cc_stdout, cc_stderr, rc = self.compile(
+                    source_file, object_file, flags=flags, env=env, cwd=cwd)
             if rc != 0:
-                return cmd, output, err, rc
-            return self.link(object_file, out=out, flags=flags, env=env,
-                             cwd=cwd)
+                return cc_cmd, cc_stdout, cc_stderr, rc
+
+            link_cmd, link_stdout, link_stderr, rc = self.link(
+                    object_file, out=out, flags=flags, env=env, cwd=cwd)
+            return (cc_cmd + ['&&'] + link_cmd, cc_stdout + link_stdout,
+                    cc_stderr + link_stderr, rc)
 
     def dumpMacros(self, source_files=None, flags=[], env=None, cwd=None):
         if source_files is None:

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9807.25916.patch
Type: text/x-patch
Size: 1271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150516/f8aa3534/attachment.bin>


More information about the cfe-commits mailing list