diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2013-05-30 04:56:28 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2013-05-30 04:56:28 +0000 |
commit | 5308abb22a3bafd077a6b62a251d788a209f4661 (patch) | |
tree | 18969362e060eef0685c79c511418bc2f335b3b9 /llvm/utils/lit | |
parent | d7f27094c0657a28b5d2d28701772f5bbdc1bbca (diff) | |
download | bcm5719-llvm-5308abb22a3bafd077a6b62a251d788a209f4661.tar.gz bcm5719-llvm-5308abb22a3bafd077a6b62a251d788a209f4661.zip |
Fixed bug when tests in executable partially used absolute paths.
llvm-svn: 182910
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/TestFormats.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/utils/lit/lit/TestFormats.py b/llvm/utils/lit/lit/TestFormats.py index 26541f183bf..27085b9a756 100644 --- a/llvm/utils/lit/lit/TestFormats.py +++ b/llvm/utils/lit/lit/TestFormats.py @@ -54,6 +54,7 @@ class GoogleTest(object): else: yield ''.join(nested_tests) + ln + # Note: path_in_suite should not include the executable name. def getTestsInExecutable(self, testSuite, path_in_suite, execpath, litConfig, localConfig): if not execpath.endswith(self.test_suffix): @@ -61,9 +62,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) + testPath = path_in_suite + (basename, testname) yield Test.Test(testSuite, testPath, localConfig) - + def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): source_path = testSuite.getSourcePath(path_in_suite) @@ -73,10 +74,11 @@ class GoogleTest(object): # Iterate over executables in a directory. if not os.path.normcase(filename) in self.test_sub_dir: continue + dirpath_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, dirpath_in_suite, execpath, litConfig, localConfig): yield test elif ('.' in self.test_sub_dir): |