Repository navigation
run-tests.sh (Claude /test skill): fail on non-zero exit, zero tests, or plan mismatch - #106
Merged
jnasbyupgrade merged 2 commits intoOct 16, 2026
Conversation
…Postgres-Extensions#95) The command's exit status is now captured in the parent shell, and STATUS is FAIL when the command exited non-zero, no tests ran, or the TAP plans declare more tests than were reported. A REASON line explains the failure. The Makefile gains a test/bats/bin/bats target that initializes the submodule; every target that runs bats (and run-tests.sh's direct .bats path) depends on it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The command is built as an argv array and run directly, so a bats filter such as 'foo|wc -l' stays one argument. For direct .bats runs, 'make test/bats/bin/bats' runs as its own step first. Also reads a final unterminated log line, derives the Makefile-wiring test's target list from make's rule database, and tightens two test assertions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jnasbyupgrade
added a commit
to jnasbyupgrade/pgxntool-test
that referenced
this pull request
Oct 16, 2026
A bare Postgres-Extensions#106 in pgxntool-test resolves to this repo's PR, so the reference now names Postgres-Extensions/pgxntool#106.
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.
Fix issues with
run-tests.sh(in the /test claude skill) reportingSTATUS: PASSwith exit 0 when the make/bats command failed before producing TAP (for example with thetest/batssubmodule uninitialized).Runner
PIPESTATUSin the parent shell (a zero there underpipefailstill counts as failure).STATUS: FAILwhen the command exited non-zero, no tests ran, the TAP plans (1..N) sum to a different count than was reported, or any test failed. The command's own non-zero code is kept; otherwise FAIL exits 1.REASON:line followsSTATUS:on FAIL. With nonot oklines, FAILURES shows the last 20 log lines.Makefile
test/bats/bin/batstarget runsgit submodule update --init --recursive test/bats;foundation,test-recursion,test-setup,test,test-extraandtest-alldepend on it. The runner's direct.batspath runsmake test/bats/bin/batsfirst.Tests
test/standard/run-tests-script.batsruns the runner from a scratch directory with a stubmake/bats(no foundation or Postgres), plus a dry-run check of the Makefile wiring. Against the previous runner 8 of its 10 tests fail.Evidence
Same input (
run-tests.sh no-such-target, make exits 2 with no TAP):STATUS: PASS,TOTAL: 0,EXIT_CODE: 0STATUS: FAIL,REASON: command exited 2; no tests ran,EXIT_CODE: 2Full
test-allon the final commit (11cae60):STATUS: PASS,TOTAL: 338 PASSED: 338 FAILED: 0 SKIPPED: 0,EXIT_CODE: 0.Fixes #95
Fixes Postgres-Extensions/pgxntool#139
🤖 Generated with Claude Code