diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d46cd38..2e08992d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,6 +155,7 @@ add_dependencies(newserv newserv-Revision-cc) enable_testing() file(GLOB LogTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.txt) +file(GLOB LogRDTestCases ${CMAKE_SOURCE_DIR}/tests/*.rdtest.txt) foreach(LogTestCase IN ITEMS ${LogTestCases}) add_test( @@ -163,6 +164,15 @@ foreach(LogTestCase IN ITEMS ${LogTestCases}) COMMAND ${CMAKE_BINARY_DIR}/newserv --replay-log=${LogTestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json) endforeach() +if(resource_file_FOUND) + foreach(LogRDTestCase IN ITEMS ${LogRDTestCases}) + add_test( + NAME ${LogRDTestCase} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${CMAKE_BINARY_DIR}/newserv --replay-log=${LogRDTestCase} --config=${CMAKE_SOURCE_DIR}/tests/config.json) + endforeach() +endif() + file(GLOB ScriptTestCases ${CMAKE_SOURCE_DIR}/tests/*.test.sh) foreach(ScriptTestCase IN ITEMS ${ScriptTestCases}) diff --git a/tests/GC-Episode3BattleVirusAndCreatureTech.test.txt b/tests/GC-Episode3BattleVirusAndCreatureTech.rdtest.txt similarity index 100% rename from tests/GC-Episode3BattleVirusAndCreatureTech.test.txt rename to tests/GC-Episode3BattleVirusAndCreatureTech.rdtest.txt diff --git a/tests/GC-Episode3BattleWithSpectatorTeam.test.txt b/tests/GC-Episode3BattleWithSpectatorTeam.rdtest.txt similarity index 100% rename from tests/GC-Episode3BattleWithSpectatorTeam.test.txt rename to tests/GC-Episode3BattleWithSpectatorTeam.rdtest.txt