/// Construct a serializable version of a test run.
Construct a serializable version of a test run.
Construct a serializable version of a test run .
fn construct_serializable_run(run_entry: &EntityEntry) -> directory::TestRunResult {
    let duration_milliseconds = run_entry.run_time_millis();
    let start_time = run_entry.start_time_millis();
    let suites = run_entry
        .children
        .iter()
        .map(|suite_id| {
            let raw_id = match suite_id {
                EntityId::Suite(suite) => suite.0,
                _ => panic!("Test run child should be a suite"),
            };
            directory::SuiteEntryV0 { summary: suite_json_name(raw_id) }
        })
        .collect();
    directory::TestRunResult::V0 {
        artifacts: run_entry
            .artifacts
            .iter()
            .map(|(name, metadata)| (run_entry.artifact_dir.join(name), metadata.clone()))
            .collect(),
        outcome: into_serializable_outcome(run_entry.outcome),
        suites,
        duration_milliseconds,
        start_time,
    }
}
fn construct_serializable_run ( run_entry : & EntityEntry ) -> directory :: TestRunResult { let duration_milliseconds = run_entry . run_time_millis ( ) ; let start_time = run_entry . start_time_millis ( ) ; let suites = run_entry . children . iter ( ) . map ( | suite_id | { let raw_id = match suite_id { EntityId :: Suite ( suite ) => suite . 0 , _ => panic ! ( " " ) , } ; directory :: SuiteEntryV0 { summary : suite_json_name ( raw_id ) } } ) . collect ( ) ; directory :: TestRunResult :: V0 { artifacts : run_entry . artifacts . iter ( ) . map ( | ( name , metadata ) | ( run_entry . artifact_dir . join ( name ) , metadata . clone ( ) ) ) . collect ( ) , outcome : into_serializable_outcome ( run_entry . outcome ) , suites , duration_milliseconds , start_time , } }
Construct a serializable version of a test run.
Construct a serializable version of a test run .
run_entry
&EntityEntry