Skip to content

Commit ce2bedc

Browse files
committed
purge artifact cache for tests
1 parent c48e0f4 commit ce2bedc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/docbuilder/rustwide_builder.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ impl RustwideBuilder {
7070
};
7171
builder = builder.sandbox_image(image);
7272
}
73+
74+
let artifact_cache = ArtifactCache::new(config.prefix.join("artifact_cache"))?;
75+
7376
if cfg!(test) {
7477
builder = builder.fast_init(true);
78+
artifact_cache.purge()?;
7579
}
7680

7781
let workspace = builder.init().map_err(FailureError::compat)?;
@@ -93,7 +97,7 @@ impl RustwideBuilder {
9397
Ok(RustwideBuilder {
9498
workspace,
9599
toolchain,
96-
artifact_cache: ArtifactCache::new(config.prefix.join("artifact_cache"))?,
100+
artifact_cache,
97101
config,
98102
db: context.pool()?,
99103
storage: context.storage()?,

0 commit comments

Comments
 (0)