tests: Enable tests dependent on active frontend
This commit is contained in:
parent
e44ac5b84c
commit
57de35a821
1 changed files with 53 additions and 32 deletions
|
@ -1,15 +1,4 @@
|
||||||
if ((NOT "A32" IN_LIST DYNARMIC_FRONTENDS) OR (NOT "A64" IN_LIST DYNARMIC_FRONTENDS))
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(dynarmic_tests
|
add_executable(dynarmic_tests
|
||||||
A32/test_arm_disassembler.cpp
|
|
||||||
A32/test_arm_instructions.cpp
|
|
||||||
A32/test_thumb_instructions.cpp
|
|
||||||
A32/testenv.h
|
|
||||||
A64/a64.cpp
|
|
||||||
A64/testenv.h
|
|
||||||
decoder_tests.cpp
|
|
||||||
fp/FPToFixed.cpp
|
fp/FPToFixed.cpp
|
||||||
fp/FPValue.cpp
|
fp/FPValue.cpp
|
||||||
fp/mantissa_util_tests.cpp
|
fp/mantissa_util_tests.cpp
|
||||||
|
@ -18,21 +7,49 @@ add_executable(dynarmic_tests
|
||||||
rand_int.h
|
rand_int.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
|
||||||
|
target_sources(dynarmic_tests PRIVATE
|
||||||
|
A32/test_arm_disassembler.cpp
|
||||||
|
A32/test_arm_instructions.cpp
|
||||||
|
A32/test_thumb_instructions.cpp
|
||||||
|
A32/testenv.h
|
||||||
|
decoder_tests.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ("A64" IN_LIST DYNARMIC_FRONTENDS)
|
||||||
|
target_sources(dynarmic_tests PRIVATE
|
||||||
|
A64/a64.cpp
|
||||||
|
A64/testenv.h
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DYNARMIC_TESTS_USE_UNICORN)
|
if (DYNARMIC_TESTS_USE_UNICORN)
|
||||||
|
target_link_libraries(dynarmic_tests PRIVATE Unicorn::Unicorn)
|
||||||
|
|
||||||
|
target_sources(dynarmic_tests PRIVATE
|
||||||
|
fuzz_util.cpp
|
||||||
|
fuzz_util.h
|
||||||
|
)
|
||||||
|
|
||||||
|
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
|
||||||
target_sources(dynarmic_tests PRIVATE
|
target_sources(dynarmic_tests PRIVATE
|
||||||
A32/fuzz_arm.cpp
|
A32/fuzz_arm.cpp
|
||||||
A32/fuzz_thumb.cpp
|
A32/fuzz_thumb.cpp
|
||||||
|
unicorn_emu/a32_unicorn.cpp
|
||||||
|
unicorn_emu/a32_unicorn.h
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ("A64" IN_LIST DYNARMIC_FRONTENDS)
|
||||||
|
target_sources(dynarmic_tests PRIVATE
|
||||||
A64/fuzz_with_unicorn.cpp
|
A64/fuzz_with_unicorn.cpp
|
||||||
A64/misaligned_page_table.cpp
|
A64/misaligned_page_table.cpp
|
||||||
A64/verify_unicorn.cpp
|
A64/verify_unicorn.cpp
|
||||||
fuzz_util.cpp
|
|
||||||
fuzz_util.h
|
|
||||||
unicorn_emu/a32_unicorn.cpp
|
|
||||||
unicorn_emu/a32_unicorn.h
|
|
||||||
unicorn_emu/a64_unicorn.cpp
|
unicorn_emu/a64_unicorn.cpp
|
||||||
unicorn_emu/a64_unicorn.h
|
unicorn_emu/a64_unicorn.h
|
||||||
)
|
)
|
||||||
target_link_libraries(dynarmic_tests PRIVATE Unicorn::Unicorn)
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE STREQUAL "x86_64")
|
if (ARCHITECTURE STREQUAL "x86_64")
|
||||||
|
@ -50,22 +67,26 @@ if (ARCHITECTURE STREQUAL "x86_64")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(dynarmic_print_info
|
|
||||||
print_info.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
include(CreateDirectoryGroups)
|
include(CreateDirectoryGroups)
|
||||||
|
|
||||||
|
if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
|
||||||
|
add_executable(dynarmic_print_info
|
||||||
|
print_info.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
create_target_directory_groups(dynarmic_print_info)
|
||||||
|
|
||||||
|
target_link_libraries(dynarmic_print_info PRIVATE dynarmic boost catch fmt)
|
||||||
|
target_include_directories(dynarmic_print_info PRIVATE . ../src)
|
||||||
|
target_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||||
|
target_compile_definitions(dynarmic_print_info PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
create_target_directory_groups(dynarmic_tests)
|
create_target_directory_groups(dynarmic_tests)
|
||||||
create_target_directory_groups(dynarmic_print_info)
|
|
||||||
|
|
||||||
target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch fmt)
|
target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch fmt)
|
||||||
target_include_directories(dynarmic_tests PRIVATE . ../src)
|
target_include_directories(dynarmic_tests PRIVATE . ../src)
|
||||||
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
|
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||||
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1 CATCH_CONFIG_ENABLE_BENCHMARKING=1)
|
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1 CATCH_CONFIG_ENABLE_BENCHMARKING=1)
|
||||||
|
|
||||||
target_link_libraries(dynarmic_print_info PRIVATE dynarmic boost catch fmt)
|
|
||||||
target_include_directories(dynarmic_print_info PRIVATE . ../src)
|
|
||||||
target_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
|
|
||||||
target_compile_definitions(dynarmic_print_info PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
|
||||||
|
|
||||||
add_test(dynarmic_tests dynarmic_tests --durations yes)
|
add_test(dynarmic_tests dynarmic_tests --durations yes)
|
||||||
|
|
Loading…
Reference in a new issue