diff --git a/utils/lit/TestFormats.py b/utils/lit/TestFormats.py index 61bdb185355..7e638b47f4d 100644 --- a/utils/lit/TestFormats.py +++ b/utils/lit/TestFormats.py @@ -53,6 +53,10 @@ class GoogleTest(object): def execute(self, test, litConfig): testPath,testName = os.path.split(test.getSourcePath()) + if not os.path.exists(testPath): + # Handle GTest typed tests, whose name includes a '/'. + testPath, namePrefix = os.path.split(testPath) + testName = os.path.join(namePrefix, testName) cmd = [testPath, '--gtest_filter=' + testName] out, err, exitCode = TestRunner.executeCommand(cmd)