mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-11-23 06:30:01 +00:00
Tests: Add gcc-target-tests for 32 and 64 bit
This commit is contained in:
parent
e466dfb480
commit
29a8fd0a4a
13
.github/workflows/ccpp.yml
vendored
13
.github/workflows/ccpp.yml
vendored
@ -76,3 +76,16 @@ jobs:
|
||||
shell: bash
|
||||
# Execute the gvisor tests
|
||||
run: cmake --build . --config $BUILD_TYPE --target gvisor_tests
|
||||
|
||||
- name: gcc target tests 32
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the gvisor tests
|
||||
run: cmake --build . --config $BUILD_TYPE --target gcc_target_tests_32
|
||||
|
||||
- name: gcc target tests 64
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the gvisor tests
|
||||
run: cmake --build . --config $BUILD_TYPE --target gcc_target_tests_64
|
||||
|
||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -26,3 +26,7 @@
|
||||
shallow = true
|
||||
path = External/fex-gvisor-tests-bins
|
||||
url = https://github.com/FEX-Emu/fex-gvisor-tests-bins.git
|
||||
[submodule "External/fex-gcc-target-tests-bins"]
|
||||
shallow = true
|
||||
path = External/fex-gcc-target-tests-bins
|
||||
url = https://github.com/FEX-Emu/fex-gcc-target-tests-bins.git
|
||||
|
1
External/fex-gcc-target-tests-bins
vendored
Submodule
1
External/fex-gcc-target-tests-bins
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9f83d474bb992a917ceeb5f5e727eeb7e28a42c6
|
@ -58,8 +58,12 @@ else:
|
||||
Process.wait()
|
||||
ResultCode = Process.returncode
|
||||
|
||||
if (not test_name in expected_output or expected_output[test_name] != ResultCode):
|
||||
if expected_output.get(test_name):
|
||||
# expect zero by default
|
||||
if (not test_name in expected_output):
|
||||
expected_output[test_name] = 0
|
||||
|
||||
if (expected_output[test_name] != ResultCode):
|
||||
if (test_name in expected_output):
|
||||
print("test failed, expected is", expected_output[test_name], "but got", ResultCode)
|
||||
else:
|
||||
print("Test doesn't have expected output,", test_name)
|
||||
|
@ -3,3 +3,5 @@ add_subdirectory(32Bit_ASM/)
|
||||
add_subdirectory(IR/)
|
||||
add_subdirectory(POSIX/)
|
||||
add_subdirectory(gvisor-tests/)
|
||||
add_subdirectory(gcc-target-tests-32/)
|
||||
add_subdirectory(gcc-target-tests-64/)
|
||||
|
33
unittests/gcc-target-tests-32/CMakeLists.txt
Normal file
33
unittests/gcc-target-tests-32/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
# 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"
|
||||
"-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$$")
|
0
unittests/gcc-target-tests-32/Disabled_Tests
Normal file
0
unittests/gcc-target-tests-32/Disabled_Tests
Normal file
1
unittests/gcc-target-tests-32/Expected_Output
Normal file
1
unittests/gcc-target-tests-32/Expected_Output
Normal file
@ -0,0 +1 @@
|
||||
# default to zero
|
9
unittests/gcc-target-tests-32/Known_Failures
Normal file
9
unittests/gcc-target-tests-32/Known_Failures
Normal file
@ -0,0 +1,9 @@
|
||||
pr72867.c.gcc-target-test-32
|
||||
pr88240.c.gcc-target-test-32
|
||||
sse2-mmx-cvtps2pi.c.gcc-target-test-32
|
||||
sse2-mmx-cvttps2pi.c.gcc-target-test-32
|
||||
sse2-mmx-pextrw.c.gcc-target-test-32
|
||||
sse2-mmx-psraw.c.gcc-target-test-32
|
||||
sse2-mmx-psrawi.c.gcc-target-test-32
|
||||
sse2-psraw-1.c.gcc-target-test-32
|
||||
sse2-shiftqihi-constant-2.c.gcc-target-test-32
|
33
unittests/gcc-target-tests-64/CMakeLists.txt
Normal file
33
unittests/gcc-target-tests-64/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
# 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/64/*)
|
||||
|
||||
foreach(TEST ${TESTS})
|
||||
|
||||
string(REPLACE "/fex-gcc-target-tests-bins/64/" ";" 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-64"
|
||||
COMMAND "python3" "${CMAKE_SOURCE_DIR}/Scripts/guest_test_runner.py"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/gcc-target-tests-64/Known_Failures"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/gcc-target-tests-64/Expected_Output"
|
||||
"${CMAKE_SOURCE_DIR}/unittests/gcc-target-tests-64/Disabled_Tests"
|
||||
"${TEST_NAME}"
|
||||
"${CMAKE_BINARY_DIR}/Bin/FEXLoader"
|
||||
"-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_64
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
USES_TERMINAL
|
||||
COMMAND "ctest" "--timeout" "20" "-j${CORES}" "-R" "\.*.gcc-target-64$$")
|
0
unittests/gcc-target-tests-64/Disabled_Tests
Normal file
0
unittests/gcc-target-tests-64/Disabled_Tests
Normal file
1
unittests/gcc-target-tests-64/Expected_Output
Normal file
1
unittests/gcc-target-tests-64/Expected_Output
Normal file
@ -0,0 +1 @@
|
||||
# default to zero
|
9
unittests/gcc-target-tests-64/Known_Failures
Normal file
9
unittests/gcc-target-tests-64/Known_Failures
Normal file
@ -0,0 +1,9 @@
|
||||
asm-5.c.gcc-target-test-64
|
||||
pr88240.c.gcc-target-test-64
|
||||
sse2-mmx-cvtps2pi.c.gcc-target-test-64
|
||||
sse2-mmx-cvttps2pi.c.gcc-target-test-64
|
||||
sse2-mmx-pextrw.c.gcc-target-test-64
|
||||
sse2-mmx-psraw.c.gcc-target-test-64
|
||||
sse2-mmx-psrawi.c.gcc-target-test-64
|
||||
sse2-psraw-1.c.gcc-target-test-64
|
||||
sse2-shiftqihi-constant-2.c.gcc-target-test-64
|
Loading…
Reference in New Issue
Block a user