diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2013-05-26 03:58:41 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2013-05-26 03:58:41 +0000 |
commit | a035f3b2ce12e9533f9bae068e0797f7a6e5eda1 (patch) | |
tree | 179b3bf86dbb2f1c39d1b2526a14e11d31855e36 /llvm/utils/lit | |
parent | 37645e59534d3b143795a854d7df533aa2b5f658 (diff) | |
download | bcm5719-llvm-a035f3b2ce12e9533f9bae068e0797f7a6e5eda1.tar.gz bcm5719-llvm-a035f3b2ce12e9533f9bae068e0797f7a6e5eda1.zip |
Fixed bug when tests in executable partially used absolute paths.
llvm-svn: 182715
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/TestFormats.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/utils/lit/lit/TestFormats.py b/llvm/utils/lit/lit/TestFormats.py index 26541f183bf..a8fa3779350 100644 --- a/llvm/utils/lit/lit/TestFormats.py +++ b/llvm/utils/lit/lit/TestFormats.py @@ -61,9 +61,9 @@ class GoogleTest(object): (dirname, basename) = os.path.split(execpath) # Discover the tests in this executable. for testname in self.getGTestTests(execpath, litConfig, localConfig): - testPath = path_in_suite + (dirname, basename, testname) - yield Test.Test(testSuite, testPath, localConfig) - + testPath_in_suite = path_in_suite + (basename, testname) + yield Test.Test(testSuite, testPath_in_suite, localConfig) + def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): source_path = testSuite.getSourcePath(path_in_suite) @@ -73,15 +73,17 @@ class GoogleTest(object): # Iterate over executables in a directory. if not os.path.normcase(filename) in self.test_sub_dir: continue + filepath_in_suite = path_in_suite + (filename, ) for subfilename in os.listdir(filepath): execpath = os.path.join(filepath, subfilename) for test in self.getTestsInExecutable( - testSuite, path_in_suite, execpath, + testSuite, filepath_in_suite, execpath, litConfig, localConfig): yield test elif ('.' in self.test_sub_dir): + filepath_in_suite = path_in_suite + (filename, ) for test in self.getTestsInExecutable( - testSuite, path_in_suite, filepath, + testSuite, filepath_in_suite, filepath, litConfig, localConfig): yield test |