Ticket #4419: fix_cache_creation.patch

File fix_cache_creation.patch, 1.6 KB (added by Itms, 7 years ago)

Fix the creation of binaries/data/cache by using _testcache everywhere

  • source/simulation2/components/tests/test_Pathfinder.h

     
    3737        g_VFS = CreateVfs(20 * MiB);
    3838        g_VFS->Mount(L"", DataDir()/"mods"/"mod", VFS_MOUNT_MUST_EXIST);
    3939        g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST, 1); // ignore directory-not-found errors
    40         g_VFS->Mount(L"cache/", DataDir() / "cache");
     40        TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
    4141
    4242        CXeromyces::Startup();
    4343
     
    5252        delete &g_TexMan;
    5353        CXeromyces::Terminate();
    5454        g_VFS.reset();
     55        DeleteDirectory(DataDir()/"_testcache");
    5556    }
    5657
    5758    void test_namespace()
  • source/simulation2/tests/test_Serializer.h

     
    826826
    827827        g_VFS = CreateVfs(20 * MiB);
    828828        TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST));
    829         TS_ASSERT_OK(g_VFS->Mount(L"cache/", DataDir()/"cache"));
     829        TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache"));
    830830
    831831        // Need some stuff for terrain movement costs:
    832832        // (TODO: this ought to be independent of any graphics code)
     
    879879        // Shut down the world
    880880        delete &g_TexMan;
    881881        g_VFS.reset();
     882        DeleteDirectory(DataDir()/"_testcache");
    882883        CXeromyces::Terminate();
    883884    }
    884885