Skip to content

Test TESTOUT support for test/install and test/build - #110

Open
jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:testout-support
Open

jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:testout-support

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Tests for Postgres-Extensions/pgxntool#145: make test with a TESTOUT different from TESTDIR.

  • test-test-install.bats, in the existing schedule test (no Postgres needed): _test-install-output-link makes $(TESTOUT)/install a symlink to $(TESTDIR)/install, and it fails, leaving the directory alone, when a real directory is already at that path.
  • test-test-install.bats, in the existing PG-backed test: make test TESTOUT=<tmpdir> passes on the template, with main-suite results in <tmpdir>/results/ (commit 1) and test-build results in <tmpdir>/build/results/ (commit 2).
  • test-test-build.bats: a make -n check that test-build's --outputdir follows TESTOUT (commit 2).

No new helpers, environments or template changes. The second commit pairs with the separable test/build commit in the pgxntool PR. Drop both together if that one is dropped.

Merge the pgxntool PR first: these tests exercise rules that don't exist on pgxntool master yet.

Add tests for pgxntool commit ad8cde4 (`test/install` when `TESTOUT`
differs from `TESTDIR`):
- `_test-install-output-link` makes `$(TESTOUT)/install` a symlink to
  `$(TESTDIR)/install`, and fails rather than replace a pre-existing
  directory there (no Postgres needed)
- `make test TESTOUT=<dir>` passes on the template, with results in
  that directory

Both are folded into existing tests in `test-test-install.bats`.
Add tests for pgxntool commit fb1b256 (`test-build` output follows
`TESTOUT`):
- `make -n test-build TESTOUT=...` passes `--outputdir=<TESTOUT>/build`
- `make test TESTOUT=<dir>` leaves test-build output in
  `<dir>/build/results/`
@coderabbitai

coderabbitai Bot commented Oct 23, 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: dfb20a30-0af1-46e1-b5ee-bb465161ffd2

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 15s —— View job


Review of PR #110

I found no blocking issues. The code-review skill failed to run, so I read the two commits by hand. I did not run the tests, because the new rules only exist in the unmerged pgxntool PR.

  • Coverage: The tests check what pgxntool owns: the symlink wiring, the refusal to replace a real directory, and --outputdir following TESTOUT. The make -n check for test-build keeps the Makefile-wiring test cheap. The new checks are folded into existing @test blocks, as CLAUDE.md asks.
  • Setup assumption: In test-test-install.bats, the first make _test-install-output-link TESTOUT="$out" runs when $out doesn't exist yet. The test only passes if the pgxntool rule creates $TESTOUT itself (for example with mkdir -p). If it doesn't, the test would fail in a confusing way. If creating the directory is the rule's job, the test is a good check of that. If not, add mkdir -p "$out" first.
  • Error-message check: echo "$output" | grep -q "exists and is not a symlink to $target" ties the test to exact wording from the pgxntool PR. That's fine, but keep the two messages in sync if the wording changes.
  • Merge order: As the description says, merge the pgxntool PR first. Otherwise unrelated pgxntool-test PRs will fail CI against pgxntool master, as they did in the Cover test-build ordering, build-results, and test/install ON_ERROR_STOP #79/Test verify-tap.sh, the standalone TAP output checker #109 case.
  • Unrelated working-tree changes: .claude/skills/test/SKILL.md and .claude/skills/test/scripts/run-tests.sh show as modified in the local checkout. They aren't part of this PR's diff, so make sure they don't get committed by accident.

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