Skip to content

Combine make-test/make-results/verify-results into one suite - #65

Merged
jnasbyupgrade merged 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:consolidate-make-test-suites
Jul 31, 2026
Merged

Combine make-test/make-results/verify-results into one suite#65
jnasbyupgrade merged 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:consolidate-make-test-suites

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

test, results, and verify-results are one tightly-coupled pipeline -- results/verify-results only exist to safely update the output test checks against. Per review feedback on #59, combines test/standard/make-test.bats, make-results.bats, and test-verify-results.bats into one file (make-test.bats survives, the other two are deleted), sharing a single foundation-copied environment instead of three.

This is a pure reorg -- verified green against real, current Postgres-Extensions/pgxntool master, with no dependency on any unmerged pgxntool change.

  • Deleted 5 dead tests (test/output/test/input directory handling) left behind when pgxntool dropped .source file support (issues Remove .source file support; update template and tests #9/Add CI workflows, /ci skill, and test fixes #22) -- confirmed via grep that base.mk never references either path.
  • Consolidated two separate mismatch-creation steps into one shared mismatch; kept both make results/make verify-results entry points and all three pgtap-detection cases as distinct tests (genuinely separate coverage).
  • Surveyed the rest of test/standard/*.bats for the same fragmented-pipeline pattern: no other files qualify (the closest candidates are independently-toggleable features or deliberate, already-documented layer splits).
  • Fixed a latent missing \set ECHO none issue in template-multi-extension/test/sql/base.sql (pg_regress's psql -a echo mode requires it) -- unrelated to any of the above, just a real independent bug in a test fixture.

#59 (issues #79/#49/#35 fix coverage) is being rebased to build on top of this branch, since its new test coverage depends on the paired pgxntool#83 base.mk fix that this reorg does not.

Test plan

  • Full suite (test-all) run against real, current Postgres-Extensions/pgxntool master (freshly cloned, confirmed unfixed): 236/236 passed, 0 failed, 0 skipped.

🤖 Generated with Claude Code

`test`, `results`, and `verify-results` are one tightly-coupled pipeline --
results/verify-results only exist to safely update the output test checks
against -- so test/standard/make-test.bats, make-results.bats, and
test-verify-results.bats are merged into one file (make-test.bats survives;
the other two are deleted) sharing a single foundation-copied environment
instead of three, per CLAUDE.md's directive to minimize state changes/setup
cost in the suite. The two separate mismatch-creation steps the old files
used (test/expected/pgxntool-test.out vs base.out) are consolidated into one
shared mismatch; the two entry points (`make results` and `make
verify-results` directly) and all three pgtap-detection cases stay as
distinct tests since they're genuinely separate coverage.

Surveyed the rest of test/standard/*.bats for the same "fragmented pipeline"
pattern: none qualify -- the closest candidates (test-test-build.bats vs
test-test-install.bats, dist-clean.bats vs 02-dist.bats, and
check-stale-expected-script.bats vs make-test.bats) are independently
toggleable features or deliberate layer splits (script decision-logic tests
vs Makefile-wiring tests), not fragments of one pipeline.

Deleted 5 dead tests (test/output/test/input directory handling) left behind
when pgxntool dropped .source file support (issues Postgres-Extensions#9/Postgres-Extensions#22): grepped
base.mk and confirmed it never references test/output or test/input
anywhere -- $(TESTOUT) defaults to test/results, a different path. These
tests, and the defensive `rm -rf test/output` added for issue Postgres-Extensions#49, were
purely working around pg_regress's own incidental optional *.source-file
directory convention, which is pg_regress's behavior to own, not pgxntool's
to re-verify.

Added a real structural proof for issue #79 (installcheck must run after
install): `make -p -n installcheck` dumps Make's parsed prerequisite
database independent of runtime scheduling, and confirms `install` is
listed as installcheck's prerequisite. Verified this check actually
discriminates: it lists `install` against the fixed base.mk and omits it
against the unfixed one. The previous behavioral test (`make uninstall &&
make test`) is kept as a secondary sanity check, since Make's actual
scheduling order for two unrelated same-target prerequisites could have
made it pass even against a broken base.mk purely by luck -- it doesn't
prove the fix on its own, only the make -p check does.

Trimmed two overly long inline comments per review: the issue Postgres-Extensions#49 exit-code
assertion now just says "Ensure make exited non-zero"; the confusing
pseudo-syntax quote in the results-blocked test was replaced with one
section-header comment explaining results/verify-results/$(TEST_DEPS) once.
Also fixed a comment that was already factually wrong post-fix (claimed
verify-results depends on `test`, which base.mk no longer does).

Fixed the same missing `\set ECHO none` issue as the main template (see the
paired pgxntool-test fix-79-49 branch) in
template-multi-extension/test/sql/base.sql -- latent since Postgres-Extensions#49's bug hid it,
caught now that make test actually reports failure.

This branch is based on current master and needs no pgxntool code change of
its own, but its new/updated assertions exercise base.mk behavior that only
exists on the pgxntool fix-79-49 branch (Postgres-Extensions/pgxntool#83) --
this repo's own CI falls back to pgxntool master when no same-named paired
branch exists, so this PR's CI will not go green until pgxntool#83 merges.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 54762eea-ca59-400e-b066-b89ffc837b8f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

 fix-dependent content

The reorg in 40c7918 accidentally pulled in test content that only
makes sense once pgxntool PR #83 (fix-79-49) lands, defeating the
purpose of keeping this reorg mergeable against current pgxntool
master on its own:

- Delete the two tests asserting the `installcheck: install` edge
  (issue #79), which doesn't exist in base.mk yet.
- Revert "make test shows diff..." to not assert a non-zero exit
  (issue Postgres-Extensions#49's fix, unmerged); current master's `test` recipe still
  never exits non-zero on a regression.diffs mismatch.
- Revert the verify-results/results section's comments and one test
  name back to describing current master's real wiring
  (`verify-results: test`), not the `verify-results: $(TEST_DEPS)`
  wiring #83 would introduce.

Verified against a fresh clone of real, unmodified
Postgres-Extensions/pgxntool master: full suite green except one
unrelated, pre-existing failure in test/sequential/04-pgtle.bats
caused by this branch's base being behind pgxntool-test's own
upstream master (which already carries bea9b18, a fix for pgxntool's
unrelated PGTLE_VERSION->PGXNTOOL_PGTLE_VERSION rename in #85).
jnasbyupgrade added a commit to jnasbyupgrade/pgxntool-test that referenced this pull request Jul 31, 2026
…stgres-Extensions#49)

Layers the issue #79/Postgres-Extensions#49/Postgres-Extensions#35 test additions on top of the make-test/
make-results/verify-results consolidation (PR Postgres-Extensions#65), building against
pgxntool's fix-79-49 branch (base.mk's installcheck: install edge and
test's real exit-status propagation, pgxntool PR #83):

- "installcheck's parsed prerequisite list includes install (issue #79,
  structural proof)": make -p -n installcheck dump proves the
  installcheck: install edge exists, independent of Make's scheduling
  order for unrelated same-target prerequisites.
- "make test succeeds from a genuinely uninstalled state (issue #79)":
  make uninstall && make test end-to-end sanity check.
- "make test shows diff with modified expected output, and exits
  non-zero (issue Postgres-Extensions#49)": now asserts make test's own exit status
  instead of relying on .IGNORE: installcheck swallowing it.
- Updates the verify-results/results section comments and test names to
  reflect that verify-results depends on $(TEST_DEPS) directly, not on
  the test target -- important now that test's recipe can exit 1 before
  verify-results gets a chance to inspect regression.diffs.

This content was previously built and validated as part of an earlier,
overly-broad version of the make-test.bats reorg (consolidate-make-test-
suites branch, commit 40c7918) and then deliberately split back out
(82c0c7c) so that reorg could land as a pure, dependency-free PR (Postgres-Extensions#65).
This commit re-applies exactly that validated delta on top of the
corrected reorg.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jnasbyupgrade
jnasbyupgrade merged commit 0d749e0 into Postgres-Extensions:master Jul 31, 2026
10 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the consolidate-make-test-suites branch July 31, 2026 21:37
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