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 | f0c74bda2e0487265fcaba542727259b82b7a941 (patch) | |
tree | 13b50d7becdbf667b15e65f4d230ed70c28c57ae /utils/lit | |
parent | 03abfc7114ce60ef69c4335c16eb264957340fad (diff) | |
download | external_llvm-f0c74bda2e0487265fcaba542727259b82b7a941.zip external_llvm-f0c74bda2e0487265fcaba542727259b82b7a941.tar.gz external_llvm-f0c74bda2e0487265fcaba542727259b82b7a941.tar.bz2 |
Fixed bug when tests in executable partially used absolute paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/TestFormats.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py index 26541f1..a8fa377 100644 --- a/utils/lit/lit/TestFormats.py +++ b/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 |