flowey_lib_hvlite/
test_nextest_unit_tests_archive.rsuse crate::build_nextest_unit_tests::NextestUnitTestArchive;
use crate::run_cargo_nextest_run::NextestProfile;
use flowey::node::prelude::*;
use flowey_lib_common::run_cargo_nextest_run::TestResults;
flowey_request! {
pub struct Request {
pub nextest_archive_file: ReadVar<NextestUnitTestArchive>,
pub nextest_profile: NextestProfile,
pub results: WriteVar<TestResults>,
}
}
new_flow_node!(struct Node);
impl FlowNode for Node {
type Request = Request;
fn imports(ctx: &mut ImportCtx<'_>) {
ctx.import::<crate::run_cargo_nextest_run::Node>();
}
fn emit(requests: Vec<Self::Request>, ctx: &mut NodeCtx<'_>) -> anyhow::Result<()> {
for Request {
nextest_archive_file,
nextest_profile,
results,
} in requests
{
let nextest_archive = nextest_archive_file.map(ctx, |x| x.0);
ctx.req(crate::run_cargo_nextest_run::Request {
friendly_name: "unit-tests".into(),
run_kind: flowey_lib_common::run_cargo_nextest_run::NextestRunKind::RunFromArchive(
nextest_archive,
),
nextest_profile,
nextest_filter_expr: None,
run_ignored: false,
extra_env: None,
pre_run_deps: Vec::new(), results,
})
}
Ok(())
}
}