Require every shell for the parity tests in the Linux unit job

The Linux unit test job installs zsh, so it now sets `FX_SHELL_PARITY_ALL_SHELLS` and the shell parity tests fail there instead of skipping when sh, dash, bash, or zsh is missing.
This commit is contained in:
Pranit committed 2026-10-22 11:54:35 -04:00
1 parent 2e9a945fb9
commit 6d8193f2c6
2 files changed
+10 -4

No files matched your search

+6 -1
View File
@@ -64,7 +64,9 @@ jobs:
# The zsh user profile tests in src/core/execution/command_runner.zig
# skip without /bin/zsh. They start interactive zsh with no terminal,
# where Ubuntu's global zshrc runs compinit, and on this runner compinit
# aborts and writes an error to stderr, so the job turns it off.
# aborts and writes an error to stderr, so the job turns it off. The
# shell parity tests in src/core/shell_command/command_effect.zig use
# zsh too.
- name: Install zsh
run: |
command -v zsh >/dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq zsh; }
@@ -73,6 +75,9 @@ jobs:
- name: Test
env:
TEST_TIMEOUT_SECONDS: ${{ matrix.test_timeout_seconds }}
# Ubuntu has sh, dash, and bash, and the step above adds zsh, so the
# shell parity tests fail here if any of them is missing.
FX_SHELL_PARITY_ALL_SHELLS: "1"
run: |
started_at=$SECONDS
trap 'printf "Unit tests elapsed: %ss\n" "$((SECONDS - started_at))"' EXIT
+4 -3
View File
@@ -2073,9 +2073,10 @@ fn checkShellParity(command: []const u8, mode: ParityMode) !void {
}
}
/// Finds the shell, or returns null to skip it. The nightly Fuzz workflow
/// installs every shell and sets `FX_SHELL_PARITY_ALL_SHELLS`, so a missing
/// shell there fails instead of quietly narrowing the check.
/// Finds the shell, or returns null to skip it. The Linux unit test job and
/// the nightly Fuzz workflow install every shell and set
/// `FX_SHELL_PARITY_ALL_SHELLS`, so a missing shell there fails instead of
/// quietly narrowing the check.
fn parityShellPath(shell: ParityShell) !?[]const u8 {
for (shell.paths) |path| {
std.Io.Dir.accessAbsolute(std.testing.io, path, .{}) catch continue;