summaryrefslogtreecommitdiffstats
path: root/utils/lit/TestFormats.py
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-01-01 10:31:22 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-01-01 10:31:22 +0000
commita16c51cee9225a354c999dd1076d5dba2aa79807 (patch)
treedba00119388b84f9f44e6ec5e9129f807fd79ca3 /utils/lit/TestFormats.py
parent40a6fcdb85efd93fe0e36c9552cfb0b18b5eacd6 (diff)
downloadFreeBSD-src-a16c51cee9225a354c999dd1076d5dba2aa79807.zip
FreeBSD-src-a16c51cee9225a354c999dd1076d5dba2aa79807.tar.gz
Update LLVM to 92395.
Diffstat (limited to 'utils/lit/TestFormats.py')
-rw-r--r--utils/lit/TestFormats.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/lit/TestFormats.py b/utils/lit/TestFormats.py
index 7305c79..5dfd54a 100644
--- a/utils/lit/TestFormats.py
+++ b/utils/lit/TestFormats.py
@@ -9,12 +9,17 @@ class GoogleTest(object):
self.test_sub_dir = str(test_sub_dir)
self.test_suffix = str(test_suffix)
- def getGTestTests(self, path):
+ def getGTestTests(self, path, litConfig):
"""getGTestTests(path) - [name]
Return the tests available in gtest executable."""
- lines = Util.capture([path, '--gtest_list_tests']).split('\n')
+ try:
+ lines = Util.capture([path, '--gtest_list_tests']).split('\n')
+ except:
+ litConfig.error("unable to discover google-tests in %r" % path)
+ raise StopIteration
+
nested_tests = []
for ln in lines:
if not ln.strip():
@@ -47,7 +52,7 @@ class GoogleTest(object):
execpath = os.path.join(filepath, subfilename)
# Discover the tests in this executable.
- for name in self.getGTestTests(execpath):
+ for name in self.getGTestTests(execpath, litConfig):
testPath = path_in_suite + (filename, subfilename, name)
yield Test.Test(testSuite, testPath, localConfig)
OpenPOWER on IntegriCloud