Include better context for "already exists" error in compiletest
This commit is contained in:
parent
3603a84a3d
commit
6b7b7758d0
@ -723,6 +723,7 @@ dependencies = [
|
||||
name = "compiletest"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"build_helper",
|
||||
"colored",
|
||||
"diff",
|
||||
|
@ -20,6 +20,7 @@ once_cell = "1.16.0"
|
||||
walkdir = "2"
|
||||
glob = "0.3.0"
|
||||
lazycell = "1.3.0"
|
||||
anyhow = "1"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2"
|
||||
|
@ -32,6 +32,7 @@ use std::process::{Child, Command, ExitStatus, Output, Stdio};
|
||||
use std::str;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Context;
|
||||
use glob::glob;
|
||||
use once_cell::sync::Lazy;
|
||||
use tracing::*;
|
||||
@ -131,7 +132,11 @@ pub fn run(config: Arc<Config>, testpaths: &TestPaths, revision: Option<&str>) {
|
||||
}
|
||||
|
||||
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
||||
create_dir_all(&cx.output_base_dir()).unwrap();
|
||||
create_dir_all(&cx.output_base_dir())
|
||||
.with_context(|| {
|
||||
format!("failed to create output base directory {}", cx.output_base_dir().display())
|
||||
})
|
||||
.unwrap();
|
||||
if props.incremental {
|
||||
cx.init_incremental_test();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user