diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2015-05-17 00:24:11 +0000 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2015-05-17 00:24:11 +0000 |
commit | 3b6e51a73ffe202a4baa027f7ae40b12c43afaaa (patch) | |
tree | 12f6e9fa1b4ecc37608576cc5da4eb95e5e96f86 | |
parent | d73258a029d958384398461471b5d2d6c1c6cc45 (diff) | |
download | bcm5719-llvm-3b6e51a73ffe202a4baa027f7ae40b12c43afaaa.tar.gz bcm5719-llvm-3b6e51a73ffe202a4baa027f7ae40b12c43afaaa.zip |
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.
llvm-svn: 237530
-rw-r--r-- | libcxx/test/libcxx/compiler.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libcxx/test/libcxx/compiler.py b/libcxx/test/libcxx/compiler.py index 4828874240d..995d61d58af 100644 --- a/libcxx/test/libcxx/compiler.py +++ b/libcxx/test/libcxx/compiler.py @@ -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: |