diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2015-05-06 11:46:36 -0700 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2015-05-18 10:52:30 -0700 |
commit | 2c3e0051c31c3f5b2328b447eadf1cf9c4427442 (patch) | |
tree | c0104029af14e9f47c2ef58ca60e6137691f3c9b /utils/lit | |
parent | e1bc145815f4334641be19f1c45ecf85d25b6e5a (diff) | |
download | external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.zip external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.tar.gz external_llvm-2c3e0051c31c3f5b2328b447eadf1cf9c4427442.tar.bz2 |
Update aosp/master LLVM for rebase to r235153
Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
(cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/formats/googletest.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/utils/lit/lit/formats/googletest.py b/utils/lit/lit/formats/googletest.py index 59ac3c5..3ce5791 100644 --- a/utils/lit/lit/formats/googletest.py +++ b/utils/lit/lit/formats/googletest.py @@ -53,6 +53,11 @@ class GoogleTest(TestFormat): ln = ln[index*2:] if ln.endswith('.'): nested_tests.append(ln) + elif any([name.startswith('DISABLED_') + for name in nested_tests + [ln]]): + # Gtest will internally skip these tests. No need to launch a + # child process for it. + continue else: yield ''.join(nested_tests) + ln @@ -95,7 +100,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 +112,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 |