Skip to content

Add coverage for PGXNTOOL_ENABLE_FS_INSTALL / PGXNTOOL_ENABLE_PGXN_INSTALL - #70

Open
jnasbyupgrade wants to merge 6 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-55-fs-install
Open

Add coverage for PGXNTOOL_ENABLE_FS_INSTALL / PGXNTOOL_ENABLE_PGXN_INSTALL#70
jnasbyupgrade wants to merge 6 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-55-fs-install

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

  • Adds BATS coverage for pgxntool PR Add PGXNTOOL_ENABLE_FS_INSTALL and PGXNTOOL_ENABLE_PGXN_INSTALL pgxntool#91, which adds PGXNTOOL_ENABLE_FS_INSTALL (gates install out of test/verify-results/installcheck/test-build, for existing-mode/pg_tle-style testing -- issues util.sh: micro-optimize array_not_empty comparison #55, #90) and PGXNTOOL_ENABLE_PGXN_INSTALL (independently gates pgtap's own pgxn install --sudo auto-install, defaulting to follow PGXNTOOL_ENABLE_FS_INSTALL).
  • Extends test/standard/make-test.bats: default/override/independent-override behavior, structural proof via make -p -n that install/pgtap prerequisites are genuinely removed, a dry-run proof (fake DESTDIR) that the pgxn install pgtap --sudo recipe disappears when disabled, and end-to-end proof that make test PGXNTOOL_ENABLE_FS_INSTALL=no succeeds against an already-installed tree but fails against a genuinely uninstalled one.
  • Also tightens two installcheck prerequisite-list assertions (the pre-existing issue Cover test-build ordering, build-results, and test/install ON_ERROR_STOP #79 one and the new one) to match the exact install token instead of a grep -w substring, which false-matched inside the unrelated test/install/schedule path.

Test plan

  • test/standard/make-test.bats (35/35 passed)
  • Full test-all suite (257/257 passed, 0 skipped)

…STALL

Add tests/updates for pgxntool commit 6966d3c (adds PGXNTOOL_ENABLE_FS_INSTALL /
PGXNTOOL_ENABLE_PGXN_INSTALL):
- `install` is now conditionally gated out of `test`/`verify-results`/
  `installcheck`/`test-build` via `PGXNTOOL_ENABLE_FS_INSTALL`, for
  existing-mode/pg_tle-style testing (issues Postgres-Extensions#55, #90)
- pgtap's own `pgxn install --sudo` auto-install is independently gated via
  `PGXNTOOL_ENABLE_PGXN_INSTALL`, defaulting to follow
  `PGXNTOOL_ENABLE_FS_INSTALL`

Extends `test/standard/make-test.bats` with: default/override/independent-
override behavior (via `print-%`); structural proof via `make -p -n` that
`install`/`pgtap` prerequisites are genuinely removed from `installcheck`'s
parsed rule, not just skipped at runtime; a dry-run proof (via a fake
`DESTDIR`) that the `pgxn install pgtap --sudo` recipe disappears when
disabled; and end-to-end proof that `make test PGXNTOOL_ENABLE_FS_INSTALL=no`
succeeds against an already-installed tree but fails against a genuinely
uninstalled one. Also tightens two `installcheck` prerequisite-list
assertions (the pre-existing issue Postgres-Extensions#79 one and the new one) to match the
exact `install` token instead of a `grep -w` substring, which false-matched
inside the unrelated `test/install/schedule` path.

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

coderabbitai Bot commented Aug 1, 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: Advanced

Run ID: eeccfbbf-54c9-403e-bd9c-2662dda54520

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.

Comment thread test/standard/make-test.bats Outdated
Comment thread test/standard/make-test.bats
jnasbyupgrade and others added 5 commits September 8, 2026 16:15
…tall-state churn

Add a comment explaining why the install-recipe dry-run test needs no
DESTDIR faking (install's own target has no file to gate on, unlike
pgtap's), and reorder the FS_INSTALL install/uninstall tests so the
extension's install state flips once each direction instead of
install/uninstall/install.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Paired pgxntool PR #91 rebases onto upstream/master, which pulls in
pgxntool issue #93's rename of internal-only override variables to a
_PGXNTOOL_ prefix, including _CHECK_STALE_EXPECTED_SCRIPT ->
_PGXNTOOL_CHECK_STALE_EXPECTED_SCRIPT. Without this, the stub override
in the exit-status/output propagation test silently no-ops and the
real script runs instead of the stub.

Mirrors pgxntool-test#72's rename fix, scoped to just this branch's own
test file (that PR's CLAUDE.md/helpers.bash/04-pgtle.bats changes are
unrelated pre-existing content, untouched by this branch).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…dry-run behavior, drop a second uninstall

Document that install's dry-run visibility comes from having no on-disk
file named "install" rather than a .PHONY declaration (checked pgxs.mk
and base.mk -- neither marks it phony), per reviewer request to verify
rather than assume.

Merge the FS_INSTALL=no negative-case check into the existing issue Postgres-Extensions#79
uninstalled-tree test so both share a single uninstall instead of each
test uninstalling separately.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…led state

The prior version relied on a claim about install's .PHONY status that
turned out to be wrong (it IS declared .PHONY via PGXS's Makefile.global,
pulled in through pgxs.mk's include chain) -- so the assertion wasn't
actually evidence about anything either way. Move the check into the
existing genuinely-uninstalled-tree test instead of asserting anything
about .PHONY status at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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