Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3916,6 +3916,7 @@ dependencies = [
"anyhow",
"clap",
"crossterm",
"fs-err",
"futures",
"futures-concurrency",
"initrd_cpio",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ impl SimpleFlowNode for Node {
built_artifacts,
is_repo_root: test_content_dir_as_repo_root,
needs_release_igvm,
needs_incubator_profiles: needs_incubator,
done: v,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ impl SimpleFlowNode for Node {
built_artifacts,
is_repo_root: true,
needs_release_igvm,
needs_incubator_profiles: incubator_profile.is_some(),
Comment thread
tjones60 marked this conversation as resolved.
done: v,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ flowey_request! {
pub is_repo_root: bool,
/// Whether the tests require that release igvm files are downloaded
pub needs_release_igvm: bool,
/// Whether to copy incubator profiles into the test content directory.
pub needs_incubator_profiles: bool,

pub done: WriteVar<SideEffect>
}
Expand All @@ -166,6 +168,7 @@ impl SimpleFlowNode for Node {
built_artifacts,
is_repo_root,
needs_release_igvm,
needs_incubator_profiles,
done,
} = request;

Expand Down Expand Up @@ -335,7 +338,7 @@ impl SimpleFlowNode for Node {
test_content_dir.join(&crate_cargo_toml_file),
)?;

if incubator.is_some() {
if needs_incubator_profiles {
let incubator_profile_dir = incubator_profile_dir();
fs_err::create_dir_all(test_content_dir.join(&incubator_profile_dir))?;
for entry in
Expand Down
1 change: 1 addition & 0 deletions petri/incubator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rust-version.workspace = true
anyhow.workspace = true
clap = { workspace = true, features = ["derive", "env"] }
crossterm = { workspace = true, features = ["windows"] }
fs-err.workspace = true
futures.workspace = true
futures-concurrency.workspace = true
initrd_cpio.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion petri/incubator/src/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pub struct QemuTcgConfig {
impl IncubatorProfile {
/// Load a profile from a TOML file.
pub fn from_file(path: &Path) -> anyhow::Result<Self> {
let contents = std::fs::read_to_string(path).context("failed to read incubator profile")?;
let contents = fs_err::read_to_string(path).context("failed to read incubator profile")?;
Self::from_toml(&contents)
}

Expand Down
Loading