Repository navigation
Retire the shell script; hold the binary to its recorded output - #75
Merged
Merged
Conversation
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.
…cript # Conflicts: # src/main.zig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The binary is the one implementation; the shell script
eb-keep-logs(0.1.0) leaves the repository.Coverage it gave stays:
tests/differential.shran the script and the binary on the same 62 invocations. It becomestests/test_cases.sh, which compares the binary with expected files undertests/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=1rewrites them.test_output_stability.shcomparedfailedandrotatebyte for byte with the script; it compares with the script's recorded output intests/golden/stability.test_eb_keep_logs.shbuilt the option list of--helpfrom 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.shandtest_metrics.shneedTOOL_BINinstead of falling back to the script. The block oftest_metrics.shthat ran only for a#!script goes.test_tutorial_which.shdrops 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 all27/27 steps, shellcheck -S warning on the changed scripts,tests/test_tutorial_which.sh, andtests/test_cases.sh3 runs with 0 differences.