Repository navigation
Support TESTOUT for test/install and test/build - #145
Open
jnasbyupgrade wants to merge 2 commits into
Open
jnasbyupgrade wants to merge 2 commits into
jnasbyupgrade wants to merge 2 commits into
Conversation
`pg_regress` writes `test/install` actual output to `$(TESTOUT)/results/../install/<name>.out` but reads its expected output from `$(TESTDIR)/expected/../install/<name>.out`. Those are the same file only when `TESTOUT` equals `TESTDIR`; otherwise `make test` aborted with "Directory nonexistent" and "Bail out!". When `test/install` is enabled and `TESTOUT` differs from `TESTDIR`, the new `_test-install-output-link` (an order-only prerequisite of `installcheck`) makes `$(TESTOUT)/install` a symlink to `$(TESTDIR)/install`, so test/install output always lands in `$(TESTDIR)/install/`. Anything else already at that path fails the build rather than being replaced. Related changes in pgxntool-test: - Test that the rule creates the symlink for a separate `TESTOUT` and fails on a pre-existing directory - Test that `make test TESTOUT=<dir>` passes on the template
`test-build` now passes `--outputdir=$(TESTOUT)/build` instead of `$(TESTDIR)/build`, so its `results/` and `regression.diffs` go to the same place as the main suite's output. `results-build` reads its diffs and copies its actual output from `$(TESTOUT)/build/` to match. Input `.sql` files and expected output stay in `$(TESTDIR)/build/`, and nothing changes with the default `TESTOUT`. Related changes in pgxntool-test: - Dry-run check that `test-build`'s `--outputdir` follows `TESTOUT` - `make test TESTOUT=<dir>` leaves test-build output in `<dir>/build/`
|
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 |
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.
make test TESTOUT=<dir>now works whentest/installis in use, andtest-build's actual output followsTESTOUTas well.test/install (bug fix). Each
test/installfile's actual output goes to$(TESTOUT)/results/../install/<name>.out, but its expected output is read from$(TESTDIR)/expected/../install/<name>.out. The two are the same file only whenTESTOUTequalsTESTDIR. With any otherTESTOUT,make testaborted with "Directory nonexistent" and then "Bail out!". Whentest/installis enabled andTESTOUTdiffers, a new order-only prerequisite ofinstallcheck(_test-install-output-link) makes$(TESTOUT)/installa symlink to$(TESTDIR)/install. If anything else is already at that path, the build fails instead of replacing it. Nothing changes whenTESTOUTequalsTESTDIR. Sotest/installoutput always lands in$(TESTDIR)/install/, which is gitignored.test/build (behavior change, separate commit).
test-buildpasses--outputdir=$(TESTOUT)/buildinstead of$(TESTDIR)/build.results-buildfollows the same path: it readsregression.diffsand copies from$(TESTOUT)/build/results/. Input.sqlfiles and expected output stay in$(TESTDIR)/build/. This commit can be dropped at review without affecting the test/install fix.README.asc's
TESTOUTsection now says exactly whatTESTOUTmoves and what it does not. HISTORY.asc has an entry for each change.Verification
The scratch reproduction builds a repo from the pgxntool-test template and runs
make test TESTOUT=$(mktemp -d):rc=2. The run fails withcannot create .../results/../install/create_install_marker.out: Directory nonexistent, thenBail out!.rc=0, with all 4 main-suite tests and both test-build tests passing.<dir>/installis a symlink totest/install. test-build output is in<dir>/build/results/, andtest/build/gets noresults/.Coordination
#144 also edits README.asc's test/install section. Whichever of the two PRs merges second will probably need a conflict fix there, and in README.html.
Paired pgxntool-test PR to follow. Merge this PR first.