mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* python script to generate cpp file with BareDistro content poltool cmd to generate the files * updated baredistro, fixed compilation * fix warning, ignore autogenerated file in stylechecker * test for pol? uoconvert got a new argument outdir for the cfg file output single thread decay has now a upper limit of sleeptime fixed that the exit_code can only get worse basic files for core testing in testsuite added a not really nice way to set it up via ctest integrated in CI with upload of log output * testenv * update poltool filegeneration to c++17 * first real tests * first npc test * equip a backpack and test a bit aos props * fixed early returns
125 lines
4.2 KiB
CMake
125 lines
4.2 KiB
CMake
|
|
# cleanup as initial fixture, to have at the end of the run still all testdata
|
|
if (${CMAKE_VERSION} VERSION_LESS "3.17")
|
|
add_test(NAME cleantestdir
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory coretest
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
)
|
|
else()
|
|
add_test(NAME cleantestdir
|
|
COMMAND ${CMAKE_COMMAND} -E rm -rf coretest
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
)
|
|
endif()
|
|
set_tests_properties(cleantestdir PROPERTIES FIXTURES_SETUP client)
|
|
|
|
# generate client files, minimal distro and needed core cfgs
|
|
add_test(NAME testenv
|
|
COMMAND ../bin/poltool testenv
|
|
outdir=coretest
|
|
width=192
|
|
height=192
|
|
hsa=0
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
)
|
|
set_tests_properties(testenv PROPERTIES DEPENDS cleantestdir)
|
|
set_tests_properties(testenv PROPERTIES FIXTURES_SETUP client)
|
|
|
|
add_test(NAME shard_cfgfiles
|
|
COMMAND ${CMAKE_COMMAND} -E copy ../testsuite/pol/pol.cfg ../testsuite/pol/ecompile.cfg coretest
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
)
|
|
set_tests_properties(shard_cfgfiles PROPERTIES DEPENDS testenv)
|
|
set_tests_properties(shard_cfgfiles PROPERTIES FIXTURES_SETUP shard)
|
|
|
|
add_test(NAME shard_testscript
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ../testsuite/pol/scripts coretest/scripts
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
)
|
|
set_tests_properties(shard_testscript PROPERTIES DEPENDS testenv)
|
|
set_tests_properties(shard_testscript PROPERTIES FIXTURES_SETUP shard)
|
|
|
|
add_test(NAME shard_testconfig
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ../testsuite/pol/config coretest/config
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
)
|
|
set_tests_properties(shard_testconfig PROPERTIES DEPENDS testenv)
|
|
set_tests_properties(shard_testconfig PROPERTIES FIXTURES_SETUP shard)
|
|
|
|
|
|
# uoconvert part
|
|
|
|
add_test(NAME uoconvert_map
|
|
COMMAND ../../bin/uoconvert map britannia
|
|
width=192 height=192
|
|
uodata=client
|
|
maxtileid=0x3fff
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( uoconvert_map PROPERTIES FIXTURES_REQUIRED client)
|
|
set_tests_properties( uoconvert_map PROPERTIES FIXTURES_SETUP uoconvert)
|
|
|
|
add_test(NAME uoconvert_statics
|
|
COMMAND ../../bin/uoconvert statics britannia
|
|
uodata=client
|
|
maxtileid=0x3fff
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( uoconvert_statics PROPERTIES DEPENDS uoconvert_map)
|
|
set_tests_properties( uoconvert_statics PROPERTIES FIXTURES_REQUIRED client)
|
|
set_tests_properties( uoconvert_statics PROPERTIES FIXTURES_SETUP uoconvert)
|
|
|
|
add_test(NAME uoconvert_maptile
|
|
COMMAND ../../bin/uoconvert maptile britannia
|
|
uodata=client
|
|
maxtileid=0x3fff
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( uoconvert_maptile PROPERTIES FIXTURES_REQUIRED client)
|
|
set_tests_properties( uoconvert_maptile PROPERTIES DEPENDS uoconvert_map)
|
|
set_tests_properties( uoconvert_maptile PROPERTIES FIXTURES_SETUP uoconvert)
|
|
|
|
add_test(NAME uoconvert_tiles
|
|
COMMAND ../../bin/uoconvert tiles
|
|
uodata=client
|
|
maxtileid=0x3fff
|
|
outdir=config
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( uoconvert_tiles PROPERTIES FIXTURES_REQUIRED "client;shard")
|
|
set_tests_properties( uoconvert_tiles PROPERTIES FIXTURES_SETUP uoconvert)
|
|
|
|
add_test(NAME uoconvert_landtiles
|
|
COMMAND ../../bin/uoconvert landtiles
|
|
uodata=client
|
|
maxtileid=0x3fff
|
|
outdir=config
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( uoconvert_landtiles PROPERTIES FIXTURES_REQUIRED "client;shard")
|
|
set_tests_properties( uoconvert_landtiles PROPERTIES FIXTURES_SETUP uoconvert)
|
|
|
|
add_test(NAME uoconvert_multis
|
|
COMMAND ../../bin/uoconvert multis
|
|
uodata=client
|
|
maxtileid=0x3fff
|
|
outdir=config
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( uoconvert_multis PROPERTIES FIXTURES_REQUIRED "client;shard")
|
|
set_tests_properties( uoconvert_multis PROPERTIES FIXTURES_SETUP uoconvert)
|
|
|
|
|
|
add_test(NAME shard_ecompile
|
|
COMMAND ../../bin/ecompile -A
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( shard_ecompile PROPERTIES FIXTURES_REQUIRED shard)
|
|
set_tests_properties( shard_ecompile PROPERTIES FIXTURES_SETUP ecompile)
|
|
|
|
add_test(NAME shard_test
|
|
COMMAND ../../bin/pol
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/coretest
|
|
)
|
|
set_tests_properties( shard_test PROPERTIES FIXTURES_REQUIRED "client;shard;uoconvert;ecompile")
|
|
|