diff options
| author | Per Larsson <[email protected]> | 2021-11-01 14:36:39 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-11-01 14:36:39 +0100 |
| commit | ff676a3e570563b2de32b61563b46a828437e4aa (patch) | |
| tree | 2c7799b8f525c26f18b1cccfaeefa8355f0f9798 /zenserver/zenserver.cpp | |
| parent | Upload cache record before blobs and call finalize when processing upstream t... (diff) | |
| parent | Moved declaration of ZenDiskCacheLayer::CacheBucket in the .h (diff) | |
| download | zen-ff676a3e570563b2de32b61563b46a828437e4aa.tar.xz zen-ff676a3e570563b2de32b61563b46a828437e4aa.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/zenserver.cpp')
| -rw-r--r-- | zenserver/zenserver.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index 80bc6a6d4..9a8090fc0 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -627,7 +627,7 @@ ZenServer::InitializeStructuredCache(ZenServiceConfig& ServiceConfig) auto ValueOrDefault = [](std::string_view Value, std::string_view Default) { return Value.empty() ? Default : Value; }; ZEN_INFO("instantiating structured cache service"); - m_CacheStore = std::make_unique<ZenCacheStore>(*m_CasStore, m_DataRoot / "cache"); + m_CacheStore = std::make_unique<ZenCacheStore>(m_DataRoot / "cache"); std::unique_ptr<zen::UpstreamCache> UpstreamCache; if (ServiceConfig.UpstreamCacheConfig.CachePolicy != UpstreamCachePolicy::Disabled) @@ -890,6 +890,22 @@ ZenWindowsService::Run() return 0; } +#if ZEN_WITH_TESTS +int +test_main(int argc, char** argv) +{ + zen::zencore_forcelinktests(); + zen::zenhttp_forcelinktests(); + zen::zenstore_forcelinktests(); + + zen::logging::InitializeLogging(); + + spdlog::set_level(spdlog::level::debug); + + return doctest::Context(argc, argv).run(); +} +#endif + int main(int argc, char* argv[]) { @@ -899,6 +915,16 @@ main(int argc, char* argv[]) mi_version(); #endif +#if ZEN_WITH_TESTS + if (argc >= 2) + { + if (argv[1] == "test"sv) + { + return test_main(argc, argv); + } + } +#endif + try { ZenServerOptions GlobalOptions; |