]> granicus.if.org Git - clang/commitdiff
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
authorDaniel Dunbar <daniel@zuster.org>
Sat, 25 Jul 2009 13:19:40 +0000 (13:19 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 25 Jul 2009 13:19:40 +0000 (13:19 +0000)
 - We don't use the former, and the latter doesn't actually work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77073 91177308-0d34-0410-b5e6-96231b3b80d8

utils/test/MultiTestRunner.py
utils/test/TestRunner.py

index 0e1bbd42394edaa63702eaf827139f9caf5d6af2..53c1cdbb18c818b5e8e2ab993912e1983127d68b 100755 (executable)
@@ -5,9 +5,9 @@ MultiTestRunner - Harness for running multiple tests in the simple clang style.
 
 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 @@ class Tester(threading.Thread):
                 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 @@ def main():
     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)
index dbcb2a74314ede73f502fc63495d713d51e26498..ddd543c30ff9a5023434aa90259aafc967ed8dae 100755 (executable)
@@ -69,29 +69,13 @@ def cat(path, output):
     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 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
         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 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
         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 @@ def main():
     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 @@ def main():
         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)