diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index dc9837012c..4a6353a2e0 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -55,9 +55,6 @@ stage3-release/bin/zig build test docs \ stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug -# Ensure that reduce compiles -stage3-release/bin/zig reduce -h - # Ensure that stage3 and stage4 are byte-for-byte identical. stage3-release/bin/zig build \ --maxrss ${ZSF_MAX_RSS:-0} \ diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index c1ab202347..c69231ea63 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -77,9 +77,6 @@ stage3-release/bin/zig build test docs \ stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug -# Ensure that reduce compiles -stage3-release/bin/zig reduce -h - # Ensure that stage3 and stage4 are byte-for-byte identical. stage3-release/bin/zig build \ --prefix stage4-release \ diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index 181474a290..14d0681898 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -61,10 +61,6 @@ CheckLastExitCode # stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug # CheckLastExitCode -# Ensure that reduce compiles -stage3-release\bin\zig.exe build reduce -h -CheckLastExitCode - # Ensure that stage3 and stage4 are byte-for-byte identical. Write-Output "Build and compare stage4..." stage3-release\bin\zig.exe build ` diff --git a/lib/compiler/std-docs.zig b/lib/compiler/std-docs.zig index e1ef5178a8..213c0b826e 100644 --- a/lib/compiler/std-docs.zig +++ b/lib/compiler/std-docs.zig @@ -18,7 +18,7 @@ fn usage(io: Io) noreturn { \\ By default, enabled unless a port is specified. \\ ) catch {}; - std.process.exit(1); + std.process.exit(0); } pub fn main(init: std.process.Init) !void { diff --git a/test/tests.zig b/test/tests.zig index bdb3a782ca..28cb147cf8 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2237,6 +2237,24 @@ pub fn addCliTests(b: *std.Build) *Step { const step = b.step("test-cli", "Test the command line interface"); const s = std.fs.path.sep_str; + { + // Test that all JIT'd commands compile. + for (&[_][]const u8{ + "libc", + "objcopy", + "objdump", + "rc", + "reduce", + "std", + }) |cmd| { + const run_help = b.addSystemCommand(&.{ b.graph.zig_exe, cmd, "--help" }); + run_help.setName(b.fmt("zig {s} --help", .{cmd})); + run_help.expectStdErrEqual(""); + run_help.expectExitCode(0); + step.dependOn(&run_help.step); + } + } + { // Test `zig init`. const tmp_path = b.tmpPath();