Skip to content

Retire the shell script; hold the binary to its recorded output - #75

Merged
HaoZeke merged 8 commits into
developfrom
feat/retire-bash-script
Nov 27, 2026
Merged

HaoZeke merged 8 commits into
developfrom
feat/retire-bash-script

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

The binary is the one implementation; the shell script eb-keep-logs (0.1.0) leaves the repository.

Coverage it gave stays:

  • tests/differential.sh ran the script and the binary on the same 62 invocations. It becomes tests/test_cases.sh, which compares the binary with expected files under tests/golden/cases (63, with the killed-mid-compress case). They were recorded from the binary right after the differential run reported 0 differences, so each is the script's output, or the binary's where COMPAT.md lists a deliberate difference. The work directory shows as @WORK@ and the checkout as @REPO@. RECORD=1 rewrites them.
  • test_output_stability.sh compared failed and rotate byte for byte with the script; it compares with the script's recorded output in tests/golden/stability.
  • test_eb_keep_logs.sh built the option list of --help from the script's case patterns and the Zig parser; every option the script names is also in the Zig parser (checked with comm), so the list comes from the parser alone.
  • test_eb_keep_logs.sh and test_metrics.sh need TOOL_BIN instead of falling back to the script. The block of test_metrics.sh that ran only for a #! script goes.
  • test_tutorial_which.sh drops its check for the sentence that the script lacks why and history; the tutorial already builds the binary.

COMPAT.md stays, as the record for a site that ran the script. README, contributing, index, the tutorial and the how-tos stop describing two implementations; the how-tos say 0.2.0 or later where they said the Zig build. CI's first job shellchecks the test scripts and keeps the site-name check.

Checked on one x86_64 host with Zig 0.17.1 and promtool 3.7.3: zig build test --summary all 27/27 steps, shellcheck -S warning on the changed scripts, tests/test_tutorial_which.sh, and tests/test_cases.sh 3 runs with 0 differences.

tests/differential.sh ran the script and the binary on the same
invocations. It becomes tests/test_cases.sh, which compares the binary
with the expected output under tests/golden/cases: the script's own
output, recorded after the differential run reported 0 differences, and
the binary's for the differences COMPAT.md lists as deliberate. RECORD=1
rewrites them. test_output_stability.sh compares failed and rotate with
the script's recorded output in tests/golden/stability. The suites take
the binary from TOOL_BIN only; the option list of --help no longer reads
the script's case patterns, which name no option the Zig parser lacks.
The binary is the one implementation. The CI job that ran the suites
against the script and shellchecked it now shellchecks the test scripts
and keeps the site-name check.
COMPAT.md stays as the record for a site that ran the script 0.1.0; the
how-tos name 0.2.0 or later where they needed the Zig build.
tests/golden/stability/failed.err and rotate.err (both empty) were
recorded but never committed: a global *.err ignore kept them out. In a
fresh checkout the stability test compared against missing files, so
'failed stderr byte-identical' and 'rotate stderr byte-identical' failed
in CI. The repo's .gitignore now keeps *.err under tests/golden.
The develop merge brought back `--help` checks, `failed` and `rotate`
stability checks with their goldens, and nine case goldens that #74
removed. Drop them again.
@HaoZeke
HaoZeke merged commit 4b47254 into develop Nov 27, 2026
8 checks passed
@HaoZeke
HaoZeke deleted the feat/retire-bash-script branch November 27, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant