Skip to content

Commit

Permalink
purge artifact cache for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jun 4, 2023
1 parent c48e0f4 commit ce2bedc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ impl RustwideBuilder {
};
builder = builder.sandbox_image(image);
}

let artifact_cache = ArtifactCache::new(config.prefix.join("artifact_cache"))?;

if cfg!(test) {
builder = builder.fast_init(true);
artifact_cache.purge()?;
}

let workspace = builder.init().map_err(FailureError::compat)?;
Expand All @@ -93,7 +97,7 @@ impl RustwideBuilder {
Ok(RustwideBuilder {
workspace,
toolchain,
artifact_cache: ArtifactCache::new(config.prefix.join("artifact_cache"))?,
artifact_cache,
config,
db: context.pool()?,
storage: context.storage()?,
Expand Down

0 comments on commit ce2bedc

Please sign in to comment.