Skip to content

Commit

Permalink
Fail early if the local daemon doesn't start properly during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium authored and sylvestre committed Nov 14, 2023
1 parent 78ce03c commit 01bfa41
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/harness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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() {
Expand Down

0 comments on commit 01bfa41

Please sign in to comment.