diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-25 12:23:35 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-25 12:23:35 +0000 |
commit | 322f789febed781f6b194714afdef25e91e21d25 (patch) | |
tree | 7587e57deabe7488bf53df93f799b729917f3c05 | |
parent | fecdd00619c0893e9da0e9e53fe507012f1cdce4 (diff) |
MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77066 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-x | utils/test/TestRunner.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/utils/test/TestRunner.py b/utils/test/TestRunner.py index 84964c8c14..3b2b5eb7cc 100755 --- a/utils/test/TestRunner.py +++ b/utils/test/TestRunner.py @@ -132,13 +132,26 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC, index = ln.index('RUN:') ln = ln[index+4:] - # Strip whitespace and append. - scriptLines.append(ln.strip()) + # Strip trailing newline. + scriptLines.append(ln) elif 'XFAIL' in ln: xfailLines.append(ln) # FIXME: Support something like END, in case we need to process large # files. + + # Apply substitutions to the script. + def processLine(ln): + # Apply substitutions + for a,b in substitutions: + ln = ln.replace(a,b) + + if useDGCompat: + ln = re.sub(r'\{(.*)\}', r'"\1"', ln) + + # Strip the trailing newline and any extra whitespace. + return ln.strip() + scriptLines = map(processLine, scriptLines) # Validate interior lines for '&&', a lovely historical artifact. for i in range(len(scriptLines) - 1): @@ -151,18 +164,7 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC, # Strip off '&&' scriptLines[i] = ln[:-2] - - # Apply substitutions to the script. - def processLine(ln): - # Apply substitutions - for a,b in substitutions: - ln = ln.replace(a,b) - if useDGCompat: - ln = re.sub(r'\{(.*)\}', r'"\1"', ln) - return ln - scriptLines = map(processLine, scriptLines) - if xfailLines: print >>output, "XFAILED '%s':"%(TESTNAME,) output.writelines(xfailLines) |