mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
posixtests: Move disabled list to file from filenames
This commit is contained in:
1 parent
66a0293cdb
commit
f10891eb11
4 files changed
+207
-5
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Args: <Known Failures file> <ExpectedOutputsFile> <TestName> <FexExecutable> <FexArgs>...
|
||||
# Args: <Known Failures file> <ExpectedOutputsFile> <DisabledTestsFile> <TestName> <FexExecutable> <FexArgs>...
|
||||
|
||||
# fexargs should also include the test executable
|
||||
|
||||
@@ -11,10 +11,12 @@ if (len(sys.argv) < 6):
|
||||
|
||||
known_failures_file = sys.argv[1]
|
||||
expected_output_file = sys.argv[2]
|
||||
test_name = sys.argv[3]
|
||||
disabled_tests_file = sys.argv[3]
|
||||
test_name = sys.argv[4]
|
||||
|
||||
known_failures = { }
|
||||
expected_output = { }
|
||||
disabled_tests = { }
|
||||
|
||||
# Open the known failures file and add it to a dictionary
|
||||
with open(known_failures_file) as kff:
|
||||
@@ -27,15 +29,23 @@ with open(expected_output_file) as eof:
|
||||
parts = line.strip().split(" ")
|
||||
expected_output[parts[0]] = int(parts[1])
|
||||
|
||||
with open(disabled_tests_file) as dtf:
|
||||
for line in dtf:
|
||||
disabled_tests[line.strip()] = 1
|
||||
|
||||
# run with timeout to avoid locking up
|
||||
RunnerArgs = ["timeout", "45s"]
|
||||
|
||||
# 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])
|
||||
|
||||
#print(RunnerArgs)
|
||||
|
||||
if (disabled_tests.get(test_name)):
|
||||
print("Skipping", test_name)
|
||||
sys.exit(0)
|
||||
|
||||
# Run the test and wait for it to end to get the result
|
||||
Process = subprocess.Popen(RunnerArgs)
|
||||
Process.wait()
|
||||
|
||||
Reference in new issue
Block a user