]> granicus.if.org Git - clang/commitdiff
MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
authorDaniel Dunbar <daniel@zuster.org>
Sat, 25 Jul 2009 13:13:06 +0000 (13:13 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 25 Jul 2009 13:13:06 +0000 (13:13 +0000)
it currently.

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

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

index 5986cd927bd49aa629811521354ab574c693c138..0e1bbd42394edaa63702eaf827139f9caf5d6af2 100755 (executable)
@@ -172,7 +172,6 @@ class Tester(threading.Thread):
                 startTime = time.time()
                 code = TestRunner.runOneTest(path, command, output, testname, 
                                              opts.clang, opts.clangcc,
-                                             useValgrind=opts.useValgrind,
                                              useDGCompat=opts.useDGCompat,
                                              useScript=opts.testScript,
                                              output=open(testresults,'w'))
@@ -267,6 +266,9 @@ def main():
 
     if not args:
         parser.error('No inputs specified')
+    if opts.useValgrind:
+        parser.error('Support for running with valgrind is '
+                     'temporarily disabled')
 
     if opts.clang is None:
         opts.clang = TestRunner.inferClang()
index cfbfe6b3b74836cee2bd1debcc2fe7191a1bbbdc..dbcb2a74314ede73f502fc63495d713d51e26498 100755 (executable)
@@ -69,17 +69,10 @@ def cat(path, output):
     f.close()
 
 def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
-               useValgrind=False,
                useDGCompat=False,
                useScript=None, 
                output=sys.stdout):
     OUTPUT = os.path.abspath(OUTPUT)
-    if useValgrind:
-        VG_OUTPUT = '%s.vg'%(OUTPUT,)
-        os.system('rm -f %s.*'%(VG_OUTPUT))
-        VALGRIND = 'valgrind -q --tool=memcheck --leak-check=full --trace-children=yes --log-file=%s.%%p'%(VG_OUTPUT)
-        CLANG    = '%s %s'%(VALGRIND, CLANG)
-        CLANGCC  = '%s %s'%(VALGRIND, CLANGCC)
 
     # Create the output directory if it does not already exist.
     mkdir_p(os.path.dirname(OUTPUT))
@@ -174,9 +167,9 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
     f = open(SCRIPT,'w')
     if kSystemName == 'Windows':
         f.write('\nif %ERRORLEVEL% NEQ 0 EXIT\n'.join(scriptLines))
-        f.write('\n')
     else:
         f.write(' &&\n'.join(scriptLines))
+    f.write('\n')
     f.close()
 
     outputFile = open(OUTPUT,'w')
@@ -208,16 +201,7 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
     if xfailLines:
         SCRIPT_STATUS = not SCRIPT_STATUS
 
-    if useValgrind:
-        if kSystemName == 'Windows':
-            raise NotImplementedError,'Cannot run valgrind on windows'
-        else:
-            VG_OUTPUT = capture(['/bin/sh','-c','cat %s.*'%(VG_OUTPUT)])
-        VG_STATUS = len(VG_OUTPUT)
-    else:
-        VG_STATUS = 0
-    
-    if SCRIPT_STATUS or VG_STATUS:
+    if SCRIPT_STATUS:
         print >>output, "******************** TEST '%s' FAILED! ********************"%(TESTNAME,)
         print >>output, "Command: "
         output.writelines(scriptLines)
@@ -226,9 +210,6 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
         else:
             print >>output, "Incorrect Output:"
         cat(OUTPUT, output)
-        if VG_STATUS:
-            print >>output, "Valgrind Output:"
-            print >>output, VG_OUTPUT
         print >>output, "******************** TEST '%s' FAILED! ********************"%(TESTNAME,)
         output.flush()
         if xfailLines:
@@ -334,9 +315,6 @@ def main():
     parser.add_option("", "--clang-cc", dest="clangcc",
                       help="Program to use as \"clang-cc\"",
                       action="store", default=None)
-    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)
@@ -357,7 +335,6 @@ def main():
         
         res = runOneTest(path, command, output, testname, 
                          opts.clang, opts.clangcc,
-                         useValgrind=opts.useValgrind,
                          useDGCompat=opts.useDGCompat,
                          useScript=os.getenv("TEST_SCRIPT"))