diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-25 09:53:43 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-25 09:53:43 +0000 |
commit | 3c2da2bb7ed6c55f9960fb2779cf09382a95b1ac (patch) | |
tree | c6bbe32cd47deca506a7ee96c174ac4de6ae4114 | |
parent | e6475f11920a0e5451ca53854036be35b4677947 (diff) | |
download | bcm5719-llvm-3c2da2bb7ed6c55f9960fb2779cf09382a95b1ac.tar.gz bcm5719-llvm-3c2da2bb7ed6c55f9960fb2779cf09382a95b1ac.zip |
MultiTestRunner.py improvements.
- Tweak output directories for temp files, derive the temporary base from the
test's parent directory name, and the test name (instead of the whole path).
llvm-svn: 77059
-rwxr-xr-x | clang/utils/test/MultiTestRunner.py | 7 | ||||
-rwxr-xr-x | clang/utils/test/TestRunner.py | 15 |
2 files changed, 14 insertions, 8 deletions
diff --git a/clang/utils/test/MultiTestRunner.py b/clang/utils/test/MultiTestRunner.py index c43789dad3c..41cf537143d 100755 --- a/clang/utils/test/MultiTestRunner.py +++ b/clang/utils/test/MultiTestRunner.py @@ -155,11 +155,10 @@ class Tester(threading.Thread): def runTest(self, (path,index)): command = path - # Use hand concatentation here because we want to override - # absolute paths. - output = 'Output/' + path + '.out' + base = TestRunner.getTestOutputBase('Output', path) + output = base + '.out' testname = path - testresults = 'Output/' + path + '.testresults' + testresults = base + '.testresults' TestRunner.mkdir_p(os.path.dirname(testresults)) numTests = len(self.provider.tests) digits = len(str(numTests)) diff --git a/clang/utils/test/TestRunner.py b/clang/utils/test/TestRunner.py index d82ddac2d85..c7671033776 100755 --- a/clang/utils/test/TestRunner.py +++ b/clang/utils/test/TestRunner.py @@ -16,7 +16,6 @@ # import errno -import hashlib import os import platform import re @@ -286,6 +285,16 @@ def inferClangCC(clang): return clangcc +def getTestOutputBase(dir, testpath): + """getTestOutputPath(dir, testpath) - Get the full path for temporary files + corresponding to the given test path.""" + + # Form the output base out of the test parent directory name and the test + # name. FIXME: Find a better way to organize test results. + return os.path.join(dir, + os.path.basename(os.path.dirname(testpath)), + os.path.basename(testpath)) + def main(): global options from optparse import OptionParser @@ -314,9 +323,7 @@ def main(): for path in args: command = path - # Use hand concatentation here because we want to override - # absolute paths. - output = 'Output/' + path + '.out' + output = getTestOutputPath('Output', path) + '.out' testname = path res = runOneTest(path, command, output, testname, |