Skip to content

Commit 1e1e48d

Browse files
--wip-- [skip ci]
1 parent 4d1a814 commit 1e1e48d

7 files changed

Lines changed: 12 additions & 31 deletions

File tree

src/cli/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async fn setup(setup_cache_dir: Option<&Path>) -> Result<()> {
3939
system_info.os
4040
);
4141
}
42-
ExecutorSupport::RequiresManualSetup => {
42+
ExecutorSupport::RequiresManualInstallation => {
4343
info!(
4444
"Skipping automatic setup for the {} executor on {}; install required tooling manually.",
4545
executor.name(),

src/executor/memory/executor.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ impl Executor for MemoryExecutor {
7979

8080
fn support_level(&self, os: &Os) -> ExecutorSupport {
8181
match os {
82-
Os::SupportedLinux { .. } => ExecutorSupport::FullySupported,
83-
Os::OtherLinux { .. } => ExecutorSupport::RequiresManualSetup,
82+
Os::SupportedLinux { .. } | Os::OtherLinux { .. } => ExecutorSupport::FullySupported,
8483
Os::MacOs { .. } | Os::Unsupported { .. } => ExecutorSupport::Unsupported,
8584
}
8685
}

src/executor/mod.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ pub enum ToolInstallStatus {
7878
pub enum ExecutorSupport {
7979
/// The executor cannot run on this OS at all — `run_executor` hard-bails.
8080
Unsupported,
81-
/// The executor runs on this OS, but the user is responsible for installing the required
82-
/// tooling themselves; `setup()` is skipped.
83-
RequiresManualSetup,
81+
/// The executor runs on this OS, but the user is responsible for installing the required tooling themselves.
82+
RequiresManualInstallation,
8483
/// The executor runs on this OS and `setup()` knows how to auto-install tooling.
8584
FullySupported,
8685
}
@@ -90,7 +89,7 @@ pub trait Executor {
9089
fn name(&self) -> ExecutorName;
9190

9291
/// Report the installation status of the tool(s) this executor depends on.
93-
fn tool_status(&self) -> ToolStatus;
92+
fn tool_status(&self) -> Option<ToolStatus>;
9493

9594
/// Declare how well this executor runs on the host OS. Drives whether `setup()` is invoked
9695
/// (only when [`ExecutorSupport::FullySupported`]) and whether we bail out of running the
@@ -132,16 +131,7 @@ pub async fn run_executor(
132131
orchestrator.system_info.os
133132
);
134133
}
135-
ExecutorSupport::RequiresManualSetup => {
136-
if !execution_context.config.skip_setup {
137-
info!(
138-
"Skipping automatic setup for the {} executor on {}; ensure required tooling is installed manually.",
139-
executor.name(),
140-
orchestrator.system_info.os
141-
);
142-
}
143-
}
144-
ExecutorSupport::FullySupported => {
134+
ExecutorSupport::RequiresManualInstallation | ExecutorSupport::FullySupported => {
145135
if !execution_context.config.skip_setup {
146136
executor
147137
.setup(&orchestrator.system_info, setup_cache_dir)

src/executor/valgrind/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl Executor for ValgrindExecutor {
2626
fn support_level(&self, os: &Os) -> ExecutorSupport {
2727
match os {
2828
Os::SupportedLinux { .. } => ExecutorSupport::FullySupported,
29-
Os::OtherLinux { .. } => ExecutorSupport::RequiresManualSetup,
29+
Os::OtherLinux { .. } => ExecutorSupport::RequiresManualInstallation,
3030
Os::MacOs { .. } | Os::Unsupported { .. } => ExecutorSupport::Unsupported,
3131
}
3232
}

src/executor/wall_time/executor.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,14 @@ impl Executor for WallTimeExecutor {
121121
ExecutorName::WallTime
122122
}
123123

124-
fn tool_status(&self) -> ToolStatus {
125-
if self.perf.is_some() {
126-
super::perf::setup::get_perf_status()
127-
} else {
128-
// No profiler tool wired up on this OS yet — report as not installed.
129-
ToolStatus {
130-
tool_name: "perf".to_string(),
131-
status: crate::executor::ToolInstallStatus::NotInstalled,
132-
}
133-
}
124+
fn tool_status(&self) -> Option<ToolStatus> {
125+
self.perf.map(|_| super::perf::setup::get_perf_status())
134126
}
135127

136128
fn support_level(&self, os: &Os) -> ExecutorSupport {
137129
match os {
138130
Os::SupportedLinux { .. } | Os::MacOs { .. } => ExecutorSupport::FullySupported,
139-
Os::OtherLinux { .. } => ExecutorSupport::RequiresManualSetup,
131+
Os::OtherLinux { .. } => ExecutorSupport::RequiresManualInstallation,
140132
Os::Unsupported { .. } => ExecutorSupport::Unsupported,
141133
}
142134
}

src/system/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use super::{Os, SystemInfo};
77
/// This is a blunt global check; per-executor support is handled separately via
88
/// [`crate::executor::Executor::support_level`].
99
pub fn check_system(system_info: &SystemInfo) -> Result<()> {
10-
debug!("System info: {system_info:#?}");
10+
dbg!("System info: {system_info:#?}");
1111

1212
match &system_info.os {
1313
Os::SupportedLinux { .. } | Os::MacOs { .. } => Ok(()),

0 commit comments

Comments
 (0)