1
0
forked from 0ad/0ad

Skip and warn about globalscripts and random map tests following 077c4f2576 and 0a6db43c83 when testing without public mod present or if the respective folders don't exist.

Differential Revision: https://code.wildfiregames.com/D2645
Reported By: ricotz
Reviewed By: Angen
Comments By: Stan, Freagarach
This was SVN commit r23598.
This commit is contained in:
elexis 2020-04-23 12:06:56 +00:00
parent 9686ec1a33
commit ebf0591a8f
2 changed files with 13 additions and 1 deletions

View File

@ -38,6 +38,12 @@ public:
void test_mapgen_scripts()
{
if (!VfsDirectoryExists(L"maps/random/tests/"))
{
debug_printf("Skipping map generator tests (can't find binaries/data/mods/public/maps/random/tests/)\n");
return;
}
VfsPaths paths;
TS_ASSERT_OK(vfs::GetPathnames(g_VFS, L"maps/random/tests/", L"test_*.js", paths));

View File

@ -58,6 +58,12 @@ public:
void test_global_scripts()
{
if (!VfsDirectoryExists(L"globalscripts/tests/"))
{
debug_printf("Skipping globalscripts tests (can't find binaries/data/mods/public/globalscripts/tests/)\n");
return;
}
VfsPaths paths;
TS_ASSERT_OK(vfs::GetPathnames(g_VFS, L"globalscripts/tests/", L"test_*.js", paths));
for (const VfsPath& path : paths)
@ -73,7 +79,7 @@ public:
{
if (!VfsFileExists(L"simulation/components/tests/setup.js"))
{
debug_printf("WARNING: Skipping component scripts tests (can't find binaries/data/mods/public/simulation/components/tests/setup.js)\n");
debug_printf("Skipping component scripts tests (can't find binaries/data/mods/public/simulation/components/tests/setup.js)\n");
return;
}