ctest: register mars_parse and game_sim suites (host ctest 9/9)
This commit is contained in:
parent
66d4bdaf9d
commit
43fc8836e1
2 changed files with 30 additions and 0 deletions
13
tests/game_sim/CMakeLists.txt
Normal file
13
tests/game_sim/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# game/sim tests: four hand-computed suites + a real-save smoke test (skips unless SOTS_SAVES_JSON).
|
||||||
|
foreach(_t economy research colony movement)
|
||||||
|
add_executable(game_sim_test_${_t} test_${_t}.cpp)
|
||||||
|
target_link_libraries(game_sim_test_${_t} PRIVATE sots_game_sim)
|
||||||
|
target_include_directories(game_sim_test_${_t} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
target_compile_options(game_sim_test_${_t} PRIVATE -Wall -Wextra -pedantic)
|
||||||
|
add_test(NAME game_sim_${_t} COMMAND game_sim_test_${_t})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_executable(game_sim_smoke_real_save smoke_real_save.cpp)
|
||||||
|
target_link_libraries(game_sim_smoke_real_save PRIVATE sots_game_sim)
|
||||||
|
target_include_directories(game_sim_smoke_real_save PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
add_test(NAME game_sim_smoke_real_save COMMAND game_sim_smoke_real_save)
|
||||||
17
tests/mars_parse/CMakeLists.txt
Normal file
17
tests/mars_parse/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# mars_parse tests: unit suite always; real-data oracle check only when SOTS_DATA_DIR is set
|
||||||
|
# at configure time (it needs the owner's extracted game data; never committed).
|
||||||
|
add_executable(mars_parse_unit_tests
|
||||||
|
canon.cpp test_main.cpp test_value.cpp test_blocks.cpp test_effect.cpp)
|
||||||
|
target_link_libraries(mars_parse_unit_tests PRIVATE mars_parse)
|
||||||
|
target_include_directories(mars_parse_unit_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
target_compile_options(mars_parse_unit_tests PRIVATE -Wall -Wextra -Wpedantic)
|
||||||
|
add_test(NAME mars_parse_unit COMMAND mars_parse_unit_tests)
|
||||||
|
|
||||||
|
add_executable(mars_parse_oracle_check canon.cpp oracle_check.cpp)
|
||||||
|
target_link_libraries(mars_parse_oracle_check PRIVATE mars_parse)
|
||||||
|
target_include_directories(mars_parse_oracle_check PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
if(DEFINED ENV{SOTS_DATA_DIR})
|
||||||
|
# Parses every brace-block/.effect file under the data root (no Python cross-check here;
|
||||||
|
# run tests/mars_parse/build_and_run.sh for the full oracle comparison).
|
||||||
|
add_test(NAME mars_parse_realdata COMMAND mars_parse_oracle_check "$ENV{SOTS_DATA_DIR}")
|
||||||
|
endif()
|
||||||
Loading…
Add table
Reference in a new issue