mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
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:
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user