summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r--llvm/utils/lit/lit/formats/googletest.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/utils/lit/lit/formats/googletest.py b/llvm/utils/lit/lit/formats/googletest.py
index 59ac3c5cb37..748dcc7fc67 100644
--- a/llvm/utils/lit/lit/formats/googletest.py
+++ b/llvm/utils/lit/lit/formats/googletest.py
@@ -95,7 +95,7 @@ class GoogleTest(TestFormat):
# Handle GTest parametrized and typed tests, whose name includes
# some '/'s.
testPath, namePrefix = os.path.split(testPath)
- testName = os.path.join(namePrefix, testName)
+ testName = namePrefix + '/' + testName
cmd = [testPath, '--gtest_filter=' + testName]
if litConfig.useValgrind:
@@ -107,7 +107,14 @@ class GoogleTest(TestFormat):
out, err, exitCode = lit.util.executeCommand(
cmd, env=test.config.environment)
- if not exitCode:
- return lit.Test.PASS,''
+ if exitCode:
+ return lit.Test.FAIL, out + err
+
+ passing_test_line = '[ PASSED ] 1 test.'
+ if passing_test_line not in out:
+ msg = ('Unable to find %r in gtest output:\n\n%s%s' %
+ (passing_test_line, out, err))
+ return lit.Test.UNRESOLVED, msg
+
+ return lit.Test.PASS,''
- return lit.Test.FAIL, out + err
OpenPOWER on IntegriCloud