FEX/unittests/gcc-target-tests-32/CMakeLists.txt
Ryan Houdek dc041bdf0e Disables silent logging on unit tests
We need these for our CI artifacts
2021-03-26 18:04:17 -07:00

34 lines
1.2 KiB
CMake

# Careful. Globbing can't see changes to the contents of files
# Need to do a fresh clean to see changes
file(GLOB_RECURSE TESTS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/External/fex-gcc-target-tests-bins/32/*)
foreach(TEST ${TESTS})
string(REPLACE "/fex-gcc-target-tests-bins/32/" ";" TEST_NAME_LIST ${TEST})
list(GET TEST_NAME_LIST 1 TEST_NAME)
string(REPLACE "/" "-" TEST_NAME ${TEST_NAME})
# Interpreter is too slow to run these tests, only generate for jit
add_test(NAME "${TEST_NAME}.jit.gcc-target-32"
COMMAND "python3" "${CMAKE_SOURCE_DIR}/Scripts/guest_test_runner.py"
"${CMAKE_SOURCE_DIR}/unittests/gcc-target-tests-32/Known_Failures"
"${CMAKE_SOURCE_DIR}/unittests/gcc-target-tests-32/Expected_Output"
"${CMAKE_SOURCE_DIR}/unittests/gcc-target-tests-32/Disabled_Tests"
"${TEST_NAME}"
"${CMAKE_BINARY_DIR}/Bin/FEXLoader"
"--no-silent" "-c" "irjit" "-n" "500" "-R" $ENV{ROOTFS} "--"
"${TEST}")
endforeach()
execute_process(COMMAND "nproc" OUTPUT_VARIABLE CORES)
string(STRIP ${CORES} CORES)
add_custom_target(
gcc_target_tests_32
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
USES_TERMINAL
COMMAND "ctest" "--timeout" "20" "-j${CORES}" "-R" "\.*.gcc-target-32$$")