16 lines
1.2 KiB
CMake
16 lines
1.2 KiB
CMake
# game/config tests: hand-written samples for the constant loader's typing, first-wins,
|
|
# colour, tokenizer and block rules, plus an offline replay of a golden LoadFile trace
|
|
# (skips unless SOTS_DATA_DIR and a trace path are given).
|
|
add_executable(game_config_unit_tests unit_tests.cpp)
|
|
target_link_libraries(game_config_unit_tests PRIVATE sots_game_config)
|
|
target_compile_options(game_config_unit_tests PRIVATE -Wall -Wextra -Werror)
|
|
add_test(NAME game_config_unit COMMAND game_config_unit_tests)
|
|
|
|
add_executable(game_config_replay replay_trace.cpp)
|
|
target_link_libraries(game_config_replay PRIVATE sots_game_config shim_trace)
|
|
target_include_directories(game_config_replay PRIVATE ${CMAKE_SOURCE_DIR}/tests/game_sim ${CMAKE_SOURCE_DIR}/tests/shim_trace)
|
|
set(SOTS_TRACECMP_DIR "$ENV{HOME}/sots-re/verify/harness/compare" CACHE PATH
|
|
"Directory holding tracecmp.py (python oracle for the trace tests)")
|
|
target_compile_definitions(game_config_replay PRIVATE SOTS_TRACECMP_DIR="${SOTS_TRACECMP_DIR}")
|
|
target_compile_options(game_config_replay PRIVATE -Wall -Wextra -Werror)
|
|
add_test(NAME game_config_replay COMMAND game_config_replay) # SKIPs without SOTS_DATA_DIR / SOTS_M1_TRACE
|