Page MenuHomeWildfire Games

Fix test.exe build failing with --jenkins-tests flag
ClosedPublic

Authored by Silier on Sep 16 2019, 9:25 PM.

Details

Summary

rP22909 misstyped / at the end of path what made test.exe fail with error and therefore never ended on jenkins

Test Plan

commit
abort actual build on windows differential
restart autobuilder for windows

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Silier created this revision.Sep 16 2019, 9:25 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/tests/test_GuiManager.h
|  29| class·TestGuiManager·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestGuiManager:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/725/display/redirect

Silier edited the summary of this revision. (Show Details)Sep 17 2019, 6:33 AM
Silier edited the test plan for this revision. (Show Details)

I'll trust you on this one, since obviously I can't actually test it :p.

It feels like this shouldn't crash as hard as it does but we could most likely do that in a later diff.

elexis accepted this revision.Sep 17 2019, 10:00 AM
elexis added a subscriber: elexis.

If we do a grep we can find the consistent way.
Actually there are two prominent patterns, one without trailing slash, one where the trailing slash is succeeded by a trailing emtpy string:

"mods"/"public",
"screenshots"/""

I guess the important part is to not have the separator inside the string.

graphics/tests/test_TextureConverter.h:		TS_ASSERT_OK(m_VFS->Mount(L"cache/", DataDir()/"_testcache"));
graphics/tests/test_MeshManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"", MOD_PATH));
graphics/tests/test_MeshManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"collada/", DataDir()/"tests"/"collada", VFS_MOUNT_MUST_EXIST));
graphics/tests/test_MeshManager.h:		// Mount _testcache onto virtual /cache - don't use the normal cache
graphics/tests/test_MeshManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache/", CACHE_PATH));
graphics/tests/test_TextureManager.h:		TS_ASSERT_OK(m_VFS->Mount(L"cache/", DataDir()/"_testcache"));
main.cpp:		g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE);
main.cpp:		MountMods(paths, GetMods(args, INIT_MODS));
gui/tests/test_GuiManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"_test.gui", VFS_MOUNT_MUST_EXIST));
gui/tests/test_GuiManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"mods"/"_testcache/"));
scriptinterface/tests/test_ScriptConversions.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"_test.sim", VFS_MOUNT_MUST_EXIST));
lib/file/vfs/tests/test_vfs_util.h:		TS_ASSERT_OK(g_VFS->Mount(L"", MOD_PATH));
lib/file/vfs/tests/test_vfs_util.h:		// Mount _testcache onto virtual /cache - don't use the normal cache
lib/file/vfs/tests/test_vfs_util.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache/", CACHE_PATH));
simulation2/components/tests/test_scripts.h:		g_VFS->Mount(L"", DataDir()/"mods"/"mod", VFS_MOUNT_MUST_EXIST);
simulation2/components/tests/test_scripts.h:		g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST, 1); // ignore directory-not-found errors
simulation2/components/tests/test_Pathfinder.h:		g_VFS->Mount(L"", DataDir()/"mods"/"mod", VFS_MOUNT_MUST_EXIST);
simulation2/components/tests/test_Pathfinder.h:		g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST, 1); // ignore directory-not-found errors
simulation2/components/tests/test_Pathfinder.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
simulation2/tests/test_ComponentManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"_test.sim", VFS_MOUNT_MUST_EXIST));
simulation2/tests/test_ComponentManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
simulation2/tests/test_Serializer.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST));
simulation2/tests/test_Serializer.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
simulation2/tests/test_CmpTemplateManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"_test.sim", VFS_MOUNT_MUST_EXIST));
simulation2/tests/test_CmpTemplateManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
simulation2/tests/test_CmpTemplateManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"mod", VFS_MOUNT_MUST_EXIST));
simulation2/tests/test_CmpTemplateManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST));
simulation2/tests/test_CmpTemplateManager.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
simulation2/tests/test_Simulation2.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"_test.sim", VFS_MOUNT_MUST_EXIST));
simulation2/tests/test_Simulation2.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
network/tests/test_Net.h:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST));
network/tests/test_Net.h:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
network/tests/test_Net.h.orig:		TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST));
network/tests/test_Net.h.orig:		TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
ps/ModInstaller.cpp:	if (m_VFS->Mount(m_CacheDir, m_TempDir / "") != INFO::OK)
ps/Mod.h:	 * Make sure this is called after each MountMods call.
ps/GameSetup/GameSetup.cpp:void MountMods(const Paths& paths, const std::vector<CStr>& mods)
ps/GameSetup/GameSetup.cpp:				g_VFS->Mount(L"", modPath / modName/"", baseFlags, priority);
ps/GameSetup/GameSetup.cpp:				g_VFS->Mount(L"", modUserPath / modName/"", userFlags, priority);
ps/GameSetup/GameSetup.cpp:			g_VFS->Mount(L"", modPath / modName/"", baseFlags, priority);
ps/GameSetup/GameSetup.cpp:			g_VFS->Mount(L"", modUserPath / modName/"", userFlags, priority+1);
ps/GameSetup/GameSetup.cpp:	g_VFS->Mount(L"config/", readonlyConfig);
ps/GameSetup/GameSetup.cpp:	g_VFS->Mount(L"l10n/", paths.RData()/"l10n"/"");
ps/GameSetup/GameSetup.cpp:	MountMods(paths, GetMods(args, flags));
ps/GameSetup/GameSetup.cpp:	g_VFS->Mount(L"screenshots/", paths.UserData()/"screenshots"/"");
ps/GameSetup/GameSetup.cpp:	g_VFS->Mount(L"saves/", paths.UserData()/"saves"/"", VFS_MOUNT_WATCH);
ps/GameSetup/GameSetup.cpp:	// Mounting with highest priority, so that a mod supplied user.cfg is harmless
ps/GameSetup/GameSetup.cpp:	g_VFS->Mount(L"config/", readonlyConfig, 0, (size_t)-1);
ps/GameSetup/GameSetup.cpp:		g_VFS->Mount(L"config/", paths.Config(), 0, (size_t)-1);
ps/GameSetup/GameSetup.cpp:	g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE);	// (adding XMBs to archive speeds up subsequent reads)
ps/GameSetup/GameSetup.h: * Mounts all files of the given mods in the global VFS.
ps/GameSetup/GameSetup.h:extern void MountMods(const Paths& paths, const std::vector<CStr>& mods);
ps/Mod.cpp:		if (vfs->Mount(L"", modPath / *iter, VFS_MOUNT_MUST_EXIST) < 0)
ps/Mod.cpp:		if (vfs->Mount(L"", modUserPath / *iter, VFS_MOUNT_MUST_EXIST) < 0)
ps/ArchiveBuilder.cpp:	m_VFS->Mount(L"cache/", m_TempDir/"_archivecache"/"");
ps/ArchiveBuilder.cpp:	// Mount with highest priority so base mods do not overwrite files in this mod
ps/ArchiveBuilder.cpp:	m_VFS->Mount(L"", mod/"", VFS_MOUNT_MUST_EXIST | VFS_MOUNT_KEEP_DELETED, (size_t)-1);
ps/ArchiveBuilder.cpp:	m_VFS->Mount(L"", mod/"", VFS_MOUNT_MUST_EXIST, ++m_NumBaseMods);

I suppose I could test it on VS2015 VM, on the other hand that's slow af and you probably tested this diff on VS2015.

Accepting based on the fact that this string contains a path separator thats not present anywhere else inside a string passed to VFS separator.

I suppose this only fails on windows since that doesnt use slash as the path separator.

This revision is now accepted and ready to land.Sep 17 2019, 10:00 AM
Stan added a subscriber: Stan.Sep 17 2019, 10:09 AM

Yeah I guess, though I believe it might work if it used the overloaded '/' operator instead.

It's strange though that it stops working because of that.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/217/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/218/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/219/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/220/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/221/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/222/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/223/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/224/display/redirect

Itms accepted this revision.Sep 17 2019, 9:21 PM
Itms added a subscriber: Itms.

This works on Jenkins and locally. The build failures above are mostly failed tests of the latest iteration of D1946 ?

This revision was automatically updated to reflect the committed changes.