Improve test runner output for broken configurations.

Previously LIT would often fail while attempting to set up/configure
the test compiler; normally when attempting to dump the builtin macros.
This sort of failure provided no useful information about what went
wrong with the compiler, making the actual issues hard --- if not
impossible --- to debug easily.

This patch changes the LIT configuration to report the failure explicitly,
including the failed compile command and the stdout/stderr output.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@314735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-10-02 22:52:51 +00:00
parent f17205d6a8
commit 5fe8797d57
2 changed files with 16 additions and 6 deletions

View File

@@ -204,7 +204,7 @@ class CXXCompiler(object):
flags = ['-dM'] + flags
cmd, out, err, rc = self.preprocess(source_files, flags=flags, cwd=cwd)
if rc != 0:
return None
return cmd, out, err, rc
parsed_macros = {}
lines = [l.strip() for l in out.split('\n') if l.strip()]
for l in lines: