-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexecute.rs
More file actions
55 lines (48 loc) · 1.44 KB
/
execute.rs
File metadata and controls
55 lines (48 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#[path = "execute/artifact.rs"]
mod artifact;
#[path = "execute/dag.rs"]
mod dag;
#[path = "execute/loading.rs"]
mod loading;
#[path = "execute/repro.rs"]
mod repro;
#[path = "execute/result.rs"]
mod result;
use anyhow::Result;
use crate::config;
use self::dag::{execute_eval_fixture_dag, EvalFixtureDagConfig};
use self::loading::prepare_fixture_execution;
use self::result::build_fixture_result;
use super::super::{EvalFixtureResult, LoadedEvalFixture};
pub(in super::super) use self::artifact::EvalFixtureArtifactContext;
pub(crate) fn describe_eval_fixture_graph(
repro_validate: bool,
) -> crate::core::dag::DagGraphContract {
self::dag::describe_eval_fixture_graph(repro_validate)
}
pub(in super::super) async fn run_eval_fixture(
config: &config::Config,
loaded_fixture: LoadedEvalFixture,
repro_validate: bool,
repro_max_comments: usize,
artifact_context: Option<&EvalFixtureArtifactContext>,
) -> Result<EvalFixtureResult> {
let prepared = prepare_fixture_execution(loaded_fixture)?;
let outcome = execute_eval_fixture_dag(
config,
prepared,
EvalFixtureDagConfig {
repro_validate,
repro_max_comments,
artifact_context: artifact_context.cloned(),
},
)
.await?;
Ok(build_fixture_result(
outcome.prepared,
outcome.total_comments,
outcome.match_summary,
outcome.benchmark_metrics,
outcome.details,
))
}