Skip to content

Commit e1c9580

Browse files
zackeesclaude
andcommitted
test: locate the fastled CLI at runtime when run from a nextest archive
cache_upgrade_cli started the CLI from env!("CARGO_BIN_EXE_fastled"), a path fixed when the test was compiled. The macOS lane cross-builds the tests on Linux and runs them on a Mac, where that path does not exist ("No such file or directory"). Prefer nextest's runtime NEXTEST_BIN_EXE_fastled and keep the compile-time path for plain `cargo test`. The other 303 archived tests already passed on macOS. The macOS lane also runs the viewer render and Safari smoke when a Rust test fails, so one cycle reports every result. Refs #242 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VfXV1EpgAvMZzXJfbGZPRG
1 parent 43568d8 commit e1c9580

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎.github/workflows/macos-arm-live-test.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ jobs:
137137
--archive-file "macos-arm-live-inputs/$TEST_ARCHIVE"
138138
--workspace-remap .
139139
140+
# The render and Safari checks still run when a Rust test fails, so one
141+
# cycle reports every macOS result.
140142
- name: Enable Safari automation
143+
if: ${{ !cancelled() }}
141144
run: sudo safaridriver --enable
142145

143146
- name: Live viewer render and Safari smoke of the installed wheel
147+
if: ${{ !cancelled() }}
144148
env:
145149
FASTLED_SAFARI_SMOKE: "1"
146150
run: |

‎crates/fastled-cli/tests/cache_upgrade_cli.rs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
use std::fs;
22
use std::process::{Command, Output};
33

4+
/// The CLI under test. `CARGO_BIN_EXE_fastled` is fixed at compile time, so a
5+
/// test binary built on one machine and run from a nextest archive elsewhere
6+
/// (the macOS lane cross-builds on Linux) must use nextest's runtime path.
7+
fn fastled_exe() -> std::ffi::OsString {
8+
std::env::var_os("NEXTEST_BIN_EXE_fastled")
9+
.unwrap_or_else(|| env!("CARGO_BIN_EXE_fastled").into())
10+
}
11+
412
fn run_fastled(root: &std::path::Path) -> Output {
5-
Command::new(env!("CARGO_BIN_EXE_fastled"))
13+
Command::new(fastled_exe())
614
.arg("--version")
715
.env("FASTLED_HOME", root)
816
.env("FASTLED_MANAGED_RUNTIME", "1")

0 commit comments

Comments
 (0)