[cfe-commits] r77066 - /cfe/trunk/utils/test/TestRunner.py
Daniel Dunbar
daniel at zuster.org
Sat Jul 25 05:23:47 PDT 2009
Author: ddunbar
Date: Sat Jul 25 07:23:35 2009
New Revision: 77066
URL: http://llvm.org/viewvc/llvm-project?rev=77066&view=rev
Log:
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...
Modified:
cfe/trunk/utils/test/TestRunner.py
Modified: cfe/trunk/utils/test/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/TestRunner.py?rev=77066&r1=77065&r2=77066&view=diff
==============================================================================
--- cfe/trunk/utils/test/TestRunner.py (original)
+++ cfe/trunk/utils/test/TestRunner.py Sat Jul 25 07:23:35 2009
@@ -132,13 +132,26 @@
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 @@
# 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)
More information about the cfe-commits
mailing list