aboutsummaryrefslogtreecommitdiff
path: root/zenutil
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-09-16 16:21:16 +0200
committerGitHub <[email protected]>2021-09-16 16:21:16 +0200
commitb166d4081655c4c181ed915ec5475ed535c67a9d (patch)
tree2a7d6dd512dc3cfb106442f656bdc65a2650dcac /zenutil
parentclang-format fixes (diff)
downloadzen-b166d4081655c4c181ed915ec5475ed535c67a9d.tar.xz
zen-b166d4081655c4c181ed915ec5475ed535c67a9d.zip
Compact binary package caching support (#9)
Diffstat (limited to 'zenutil')
-rw-r--r--zenutil/include/zenserverprocess.h2
-rw-r--r--zenutil/zenserverprocess.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/zenutil/include/zenserverprocess.h b/zenutil/include/zenserverprocess.h
index b81d61c25..7b41c8aba 100644
--- a/zenutil/include/zenserverprocess.h
+++ b/zenutil/include/zenserverprocess.h
@@ -51,7 +51,7 @@ struct ZenServerInstance
m_TestDir = TestDir;
}
- void SpawnServer(int BasePort = 0);
+ void SpawnServer(int BasePort = 0, std::string_view AdditionalServerArgs = std::string_view());
void AttachToRunningServer(int BasePort = 0);
diff --git a/zenutil/zenserverprocess.cpp b/zenutil/zenserverprocess.cpp
index 00f5d4c0d..7f4be2368 100644
--- a/zenutil/zenserverprocess.cpp
+++ b/zenutil/zenserverprocess.cpp
@@ -367,7 +367,7 @@ ZenServerInstance::Shutdown()
}
void
-ZenServerInstance::SpawnServer(int BasePort)
+ZenServerInstance::SpawnServer(int BasePort, std::string_view AdditionalServerArgs)
{
ZEN_ASSERT(!m_Process.IsValid()); // Only spawn once
@@ -386,7 +386,7 @@ ZenServerInstance::SpawnServer(int BasePort)
zen::ExtendableStringBuilder<32> LogId;
LogId << "Zen" << ChildId;
- zen::ExtendableWideStringBuilder<128> CommandLine;
+ zen::ExtendableWideStringBuilder<512> CommandLine;
CommandLine << "\"";
CommandLine.Append(Executable.c_str());
CommandLine << "\"";
@@ -417,6 +417,11 @@ ZenServerInstance::SpawnServer(int BasePort)
CommandLine << " --mesh";
}
+ if (!AdditionalServerArgs.empty())
+ {
+ CommandLine << " " << AdditionalServerArgs;
+ }
+
std::filesystem::path CurrentDirectory = std::filesystem::current_path();
ZEN_DEBUG("Spawning server '{}'", LogId);