From e87599356fccddc03fddb1accd4016eb9cf3033e Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 25 Jul 2009 12:05:55 +0000 Subject: [PATCH] MultiTestRunner: Always use absolute path names for tests. Also, fix a function name I forgot to update. llvm-svn: 77064 --- clang/utils/test/MultiTestRunner.py | 2 ++ clang/utils/test/TestRunner.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/utils/test/MultiTestRunner.py b/clang/utils/test/MultiTestRunner.py index 41cf537143db..dcf9d89ebbb7 100755 --- a/clang/utils/test/MultiTestRunner.py +++ b/clang/utils/test/MultiTestRunner.py @@ -23,6 +23,8 @@ kTestFileExtensions = set(['.mi','.i','.c','.cpp','.m','.mm','.ll']) def getTests(inputs): for path in inputs: + # Always use absolte paths. + path = os.path.abspath(path) if not os.path.exists(path): print >>sys.stderr,"WARNING: Invalid test \"%s\""%(path,) continue diff --git a/clang/utils/test/TestRunner.py b/clang/utils/test/TestRunner.py index 5639a378e7ba..84964c8c143b 100755 --- a/clang/utils/test/TestRunner.py +++ b/clang/utils/test/TestRunner.py @@ -308,7 +308,7 @@ def inferClangCC(clang): return clangcc def getTestOutputBase(dir, testpath): - """getTestOutputPath(dir, testpath) - Get the full path for temporary files + """getTestOutputBase(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 @@ -345,7 +345,7 @@ def main(): for path in args: command = path - output = getTestOutputPath('Output', path) + '.out' + output = getTestOutputBase('Output', path) + '.out' testname = path res = runOneTest(path, command, output, testname,