From: Ian Jackson Date: Mon, 3 May 2021 23:02:56 +0000 (+0100) Subject: apitest: Split up prepare_gameserver X-Git-Tag: otter-0.6.0~417 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f7ca9d4c463e5c8d371805350dcb01d7bafd2b9c;p=otter.git apitest: Split up prepare_gameserver Signed-off-by: Ian Jackson --- diff --git a/apitest/apitest.rs b/apitest/apitest.rs index 1186261b..93c779e3 100644 --- a/apitest/apitest.rs +++ b/apitest/apitest.rs @@ -628,6 +628,12 @@ _ = "error" # rocket fs::write(CONFIG, &config) .context(CONFIG).context("create server config")?; + start_gameserver(cln, ds)? +} + +#[throws(AE)] +fn start_gameserver(cln: &cleanup_notify::Handle, ds: &DirSubst) + -> (MgmtChannel, Child) { let server_exe = ds.subst("@target@/debug/daemon-otter")?; let mut cmd = Command::new(&server_exe); cmd