[cfe-commits] r77073 - in /cfe/trunk/utils/test: MultiTestRunner.py TestRunner.py
Daniel Dunbar
daniel at zuster.org
Sat Jul 25 06:20:00 PDT 2009
Author: ddunbar
Date: Sat Jul 25 08:19:40 2009
New Revision: 77073
URL: http://llvm.org/viewvc/llvm-project?rev=77073&view=rev
Log:
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
- We don't use the former, and the latter doesn't actually work.
Modified:
cfe/trunk/utils/test/MultiTestRunner.py
cfe/trunk/utils/test/TestRunner.py
Modified: cfe/trunk/utils/test/MultiTestRunner.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/MultiTestRunner.py?rev=77073&r1=77072&r2=77073&view=diff
==============================================================================
--- cfe/trunk/utils/test/MultiTestRunner.py (original)
+++ cfe/trunk/utils/test/MultiTestRunner.py Sat Jul 25 08:19:40 2009
@@ -5,9 +5,9 @@
TODO
--
- - Fix Ctrl-c issues
- - Use a timeout
- - Detect signalled failures (abort)
+ - Use configuration file for clang specific stuff
+ - Use a timeout / ulimit
+ - Detect signaled failures (abort)
- Better support for finding tests
"""
@@ -172,8 +172,6 @@
startTime = time.time()
code = TestRunner.runOneTest(path, command, output, testname,
opts.clang, opts.clangcc,
- useDGCompat=opts.useDGCompat,
- useScript=opts.testScript,
output=open(testresults,'w'))
elapsed = time.time() - startTime
except KeyboardInterrupt:
@@ -222,12 +220,6 @@
parser.add_option("", "--vg", dest="useValgrind",
help="Run tests under valgrind",
action="store_true", default=False)
- parser.add_option("", "--dg", dest="useDGCompat",
- help="Use llvm dejagnu compatibility mode",
- action="store_true", default=False)
- parser.add_option("", "--script", dest="testScript",
- help="Default script to use",
- action="store", default=None)
parser.add_option("-v", "--verbose", dest="showOutput",
help="Show all test output",
action="store_true", default=False)
Modified: cfe/trunk/utils/test/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/TestRunner.py?rev=77073&r1=77072&r2=77073&view=diff
==============================================================================
--- cfe/trunk/utils/test/TestRunner.py (original)
+++ cfe/trunk/utils/test/TestRunner.py Sat Jul 25 08:19:40 2009
@@ -69,29 +69,13 @@
f.close()
def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
- useDGCompat=False,
- useScript=None,
output=sys.stdout):
OUTPUT = os.path.abspath(OUTPUT)
# Create the output directory if it does not already exist.
mkdir_p(os.path.dirname(OUTPUT))
- # FIXME
- #ulimit -t 40
-
- # FIXME: Load script once
- # FIXME: Support "short" script syntax
-
- if useScript:
- scriptFile = useScript
- else:
- # See if we have a per-dir test script.
- dirScriptFile = os.path.join(os.path.dirname(FILENAME), 'test.script')
- if os.path.exists(dirScriptFile):
- scriptFile = dirScriptFile
- else:
- scriptFile = FILENAME
+ scriptFile = FILENAME
# Verify the script contains a run line.
for ln in open(scriptFile):
@@ -140,9 +124,6 @@
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)
@@ -205,10 +186,7 @@
print >>output, "******************** TEST '%s' FAILED! ********************"%(TESTNAME,)
print >>output, "Command: "
output.writelines(scriptLines)
- if not SCRIPT_STATUS:
- print >>output, "Output:"
- else:
- print >>output, "Incorrect Output:"
+ print >>output, "Incorrect Output:"
cat(OUTPUT, output)
print >>output, "******************** TEST '%s' FAILED! ********************"%(TESTNAME,)
output.flush()
@@ -315,9 +293,6 @@
parser.add_option("", "--clang-cc", dest="clangcc",
help="Program to use as \"clang-cc\"",
action="store", default=None)
- parser.add_option("", "--dg", dest="useDGCompat",
- help="Use llvm dejagnu compatibility mode",
- action="store_true", default=False)
(opts, args) = parser.parse_args()
if not args:
@@ -334,9 +309,7 @@
testname = path
res = runOneTest(path, command, output, testname,
- opts.clang, opts.clangcc,
- useDGCompat=opts.useDGCompat,
- useScript=os.getenv("TEST_SCRIPT"))
+ opts.clang, opts.clangcc)
sys.exit(res == TestStatus.Fail or res == TestStatus.XPass)
More information about the cfe-commits
mailing list