MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
 - 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
diff --git a/utils/test/MultiTestRunner.py b/utils/test/MultiTestRunner.py
index 0e1bbd4..53c1cdb 100755
--- a/utils/test/MultiTestRunner.py
+++ b/utils/test/MultiTestRunner.py
@@ -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)
diff --git a/utils/test/TestRunner.py b/utils/test/TestRunner.py
index dbcb2a7..ddd543c 100755
--- a/utils/test/TestRunner.py
+++ b/utils/test/TestRunner.py
@@ -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)