mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-05 05:46:35 +00:00
Adds support for disabled tests in the IR and ASM runners
This commit is contained in:
parent
633e3ddb33
commit
2474ca1437
@ -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)
|
||||
|
@ -55,6 +55,7 @@ foreach(ASM_SRC ${ASM_SOURCES})
|
||||
add_test(NAME ${TEST_NAME}
|
||||
COMMAND "python3" "${CMAKE_SOURCE_DIR}/Scripts/testharness_runner.py"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/ASM/Known_Failures"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/ASM/Disabled_Tests"
|
||||
"Test_${ASM_NAME}"
|
||||
"${CMAKE_BINARY_DIR}/Bin/TestHarnessRunner"
|
||||
${ARGS_LIST} "${OUTPUT_NAME}" "${OUTPUT_CONFIG_NAME}")
|
||||
|
0
unittests/ASM/Disabled_Tests
Normal file
0
unittests/ASM/Disabled_Tests
Normal file
@ -46,6 +46,7 @@ foreach(IR_SRC ${IR_SOURCES})
|
||||
add_test(NAME ${TEST_NAME}
|
||||
COMMAND "python3" "${CMAKE_SOURCE_DIR}/Scripts/testharness_runner.py"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/IR/Known_Failures"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/IR/Disabled_Tests"
|
||||
"Test_${IR_NAME}"
|
||||
"${CMAKE_BINARY_DIR}/Bin/IRLoader"
|
||||
${ARGS_LIST} "${IR_SRC}" "${OUTPUT_CONFIG_NAME}")
|
||||
|
0
unittests/IR/Disabled_Tests
Normal file
0
unittests/IR/Disabled_Tests
Normal file
Loading…
x
Reference in New Issue
Block a user