Use manifest-driven SQL test ordering and manifest coverage guard#54
Merged
Merged
Conversation
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.
Motivation
TESTS := ...list inmakefilewith a single authoritative source of truth so test order is deterministic and easier to update.test/sql/*_test.sqlfiles without registering them in the execution order.Description
test/sql/manifest.txtas the authoritative, ordered list of tests and include bootstrap entries liketest/sql/init.sql.makefileto readTESTSfromTEST_MANIFEST := test/sql/manifest.txtusingsedand preserve ordered execution by feeding that list topg_prove.check-test-manifestmake target that fails when any discoveredtest/sql/*_test.sqlfile is missing from the manifest, using acomm/find/sedcheck, and maketestdepend on this guard.README.mdTesting section to document the manifest-driven mechanism andmake testinvocation, and updateCONTRIBUTING.mdwith guidance to add new tests by adding the file and registering its path intest/sql/manifest.txtand runningmake check-test-manifest.Testing
make check-test-manifestandmake -n testbut the local environment lacks the PGXS include path (error:/usr/lib/postgresql/16/lib/pgxs/src/makefiles/pgxs.mk) so the Makefile-based run could not complete.comm -23 <(find test/sql -maxdepth 1 -type f -name '*_test.sql' | sort) <(sed -e '/^[[:space:]]*#/d' -e '/^[[:space:]]*$$/d' test/sql/manifest.txt | sort), which initially reported one missing entry.test/sql/search_path_qualification_test.sqltotest/sql/manifest.txtand re-ran the samecomm/find/sedvalidation, which returned no missing files (guard logic passes).Codex Task