MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
it currently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77072 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/test/TestRunner.py b/utils/test/TestRunner.py
index cfbfe6b..dbcb2a7 100755
--- a/utils/test/TestRunner.py
+++ b/utils/test/TestRunner.py
@@ -69,17 +69,10 @@
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 @@
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 @@
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 @@
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 @@
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 @@
res = runOneTest(path, command, output, testname,
opts.clang, opts.clangcc,
- useValgrind=opts.useValgrind,
useDGCompat=opts.useDGCompat,
useScript=os.getenv("TEST_SCRIPT"))