From 01bfa41f3a20a9f1154711a31c187d973d281dcb Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 14 Nov 2023 11:55:14 +0900 Subject: [PATCH] Fail early if the local daemon doesn't start properly during tests --- tests/harness/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/harness/mod.rs b/tests/harness/mod.rs index 27351c279..1e828cc9a 100644 --- a/tests/harness/mod.rs +++ b/tests/harness/mod.rs @@ -43,7 +43,7 @@ const TC_CACHE_SIZE: u64 = 1024 * 1024 * 1024; // 1 gig pub fn start_local_daemon(cfg_path: &Path, cached_cfg_path: &Path) { // Don't run this with run() because on Windows `wait_with_output` // will hang because the internal server process is not detached. - let _ = sccache_command() + if !sccache_command() .arg("--start-server") // Uncomment following lines to debug locally. .env("SCCACHE_LOG", "debug") @@ -52,7 +52,10 @@ pub fn start_local_daemon(cfg_path: &Path, cached_cfg_path: &Path) { .env("SCCACHE_CACHED_CONF", cached_cfg_path) .status() .unwrap() - .success(); + .success() + { + panic!("Failed to start local daemon"); + } } pub fn stop_local_daemon() {