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 | d5ae2c3a75ccc70290fb19e9424418e9f3b5c17b (patch) | |
tree | a3ac5ab582ee2d63417d48e8f9119c609f6cb69e /utils | |
parent | e97b102e2b597751c9e9edce74d3d69bba317dcd (diff) | |
download | llvm-d5ae2c3a75ccc70290fb19e9424418e9f3b5c17b.tar.gz llvm-d5ae2c3a75ccc70290fb19e9424418e9f3b5c17b.tar.bz2 llvm-d5ae2c3a75ccc70290fb19e9424418e9f3b5c17b.tar.xz |
Fixed bug when tests in executable partially used absolute paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/TestFormats.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py index 26541f183b..27085b9a75 100644 --- a/utils/lit/lit/TestFormats.py +++ b/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): |