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

Function setup_executor

src/cli/setup.rs:73–103  ·  view source on GitHub ↗

Set up a single executor based on its support level on the current system. Unsupported executors or executors that require manual installation are skipped, not treated as fatal.

(
    executor: &dyn Executor,
    system_info: &SystemInfo,
    setup_cache_dir: Option<&Path>,
)

Source from the content-addressed store, hash-verified

71/// Unsupported executors or executors that require manual installation are
72/// skipped, not treated as fatal.
73async fn setup_executor(
74 executor: &dyn Executor,
75 system_info: &SystemInfo,
76 setup_cache_dir: Option<&Path>,
77) -> Result<()> {
78 match executor.support_level(system_info) {
79 ExecutorSupport::Unsupported => {
80 info!(
81 "Skipping setup for the {} executor: not supported on {}",
82 executor.name(),
83 system_info.os
84 );
85 }
86 ExecutorSupport::RequiresManualInstallation => {
87 info!(
88 "Skipping automatic setup for the {} executor on {}; install required tooling manually.",
89 executor.name(),
90 system_info.os
91 );
92 }
93 ExecutorSupport::FullySupported => {
94 info!(
95 "Setting up the environment for the executor: {}",
96 executor.name()
97 );
98 executor.setup(system_info, setup_cache_dir).await?;
99 executor.grant_privileges()?;
100 }
101 }
102 Ok(())
103}
104
105pub fn status(modes: &[RunnerMode]) -> Result<()> {
106 let system_info = SystemInfo::new()?;

Callers 1

setupFunction · 0.85

Calls 3

support_levelMethod · 0.45
setupMethod · 0.45
grant_privilegesMethod · 0.45

Tested by

no test coverage detected