[lit] Skip gtest names starting with DISABLED_
authorReid Kleckner <reid@kleckner.net>
Mon, 6 Apr 2015 22:16:58 +0000 (22:16 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 6 Apr 2015 22:16:58 +0000 (22:16 +0000)
The sanitizer test suite uses this idiom to disable a test.  Now that we
actually check if a test ran after invoking it, we see that zero tests
ran, and complain.

Instead, ignore tests starting with DISABLED_ completely. Fixes the
sanitizer test suite failures on Windows.

llvm-svn: 234247

llvm/utils/lit/lit/formats/googletest.py

index 748dcc7..a1ecced 100644 (file)
@@ -53,6 +53,10 @@ class GoogleTest(TestFormat):
             ln = ln[index*2:]
             if ln.endswith('.'):
                 nested_tests.append(ln)
+            elif ln.startswith('DISABLED_'):
+                # Gtest will internally skip these tests. No need to launch a
+                # child process for it.
+                continue
             else:
                 yield ''.join(nested_tests) + ln