[libcxx] r237530 - libcxx: Enhance lit test command in verbose mode.
Logan Chien
tzuhsiang.chien at gmail.com
Sat May 16 17:24:11 PDT 2015
Author: logan
Date: Sat May 16 19:24:11 2015
New Revision: 237530
URL: http://llvm.org/viewvc/llvm-project?rev=237530&view=rev
Log:
libcxx: Enhance lit test command in verbose mode.
Print both the compiler command and linker command so that it will be
easier for developers to reproduce the failed test cases.
Modified:
libcxx/trunk/test/libcxx/compiler.py
Modified: libcxx/trunk/test/libcxx/compiler.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/compiler.py?rev=237530&r1=237529&r2=237530&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/compiler.py (original)
+++ libcxx/trunk/test/libcxx/compiler.py Sat May 16 19:24:11 2015
@@ -107,12 +107,15 @@ class CXXCompiler(object):
# 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:
More information about the cfe-commits
mailing list