MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / test_exec_harness

Function test_exec_harness

src/executor/tests.rs:356–379  ·  view source on GitHub ↗
(#[case] cmd: &str)

Source from the content-addressed store, hash-verified

354 #[rstest::rstest]
355 #[test_log::test(tokio::test)]
356 async fn test_exec_harness(#[case] cmd: &str) {
357 use exec_harness::walltime::WalltimeExecutionArgs;
358
359 let (_permit, mut executor) = get_walltime_executor().await;
360
361 let walltime_args = WalltimeExecutionArgs {
362 warmup_time: Some("0s".to_string()),
363 max_time: None,
364 min_time: None,
365 max_rounds: Some(3),
366 min_rounds: None,
367 };
368
369 let cmd = cmd.split(" ").map(|s| s.to_owned()).collect::<Vec<_>>();
370 let wrapped_command = wrap_with_exec_harness(&walltime_args, &cmd);
371
372 // Unset GITHUB_ACTIONS to force LocalProvider which supports repository_override
373 temp_env::async_with_vars(&[("GITHUB_ACTIONS", None::<&str>)], async {
374 let config = walltime_config(&wrapped_command, true);
375 let (execution_context, _temp_dir) = create_test_setup(config).await;
376 executor.run(&execution_context, &None).await.unwrap();
377 })
378 .await;
379 }
380}
381
382#[cfg(target_os = "linux")]

Callers

nothing calls this directly

Calls 5

get_walltime_executorFunction · 0.85
wrap_with_exec_harnessFunction · 0.85
walltime_configFunction · 0.85
create_test_setupFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected