Adds support for disabled tests in the IR and ASM runners

This commit is contained in:
Ryan Houdek committed 2020-05-28 15:09:51 -07:00
1 parent 633e3ddb33
commit 2474ca1437
5 files changed
+18 -6

No files matched your search

+16 -6
View File
@@ -2,25 +2,35 @@
import sys
import subprocess
# Args: <Known Failures file> <TestName> <Test Harness Executable> <Args>...
# Args: <Known Failures file> <DisabledTestsFile> <TestName> <Test Harness Executable> <Args>...
if (len(sys.argv) < 4):
if (len(sys.argv) < 5):
sys.exit()
known_failures = {}
disabled_tests = {}
known_failures_file = sys.argv[1]
disabled_tests_file = sys.argv[2]
current_test = sys.argv[2]
current_test = sys.argv[3]
# Open the known failures file and add it to a dictionary
with open(known_failures_file) as kff:
for line in kff:
known_failures[line.strip()] = 1
RunnerArgs = ["catchsegv", sys.argv[3]]
with open(disabled_tests_file) as dtf:
for line in dtf:
disabled_tests[line.strip()] = 1
RunnerArgs = ["catchsegv", sys.argv[4]]
# Add the rest of the arguments
for i in range(len(sys.argv) - 4):
RunnerArgs.append(sys.argv[4 + i])
for i in range(len(sys.argv) - 5):
RunnerArgs.append(sys.argv[5 + i])
if (disabled_tests.get(current_test)):
print("Skipping", current_test)
sys.exit(0)
# Run the test and wait for it to end to get the result
Process = subprocess.Popen(RunnerArgs)