Repo: pgxntool-test
test/standard/multi-extension.bats:110-121 ("make generates versioned SQL
files") runs make pgtle against a template with two control files
(ext_alpha.control, ext_beta.control) — the only place in the suite that
exercises base.mk's pgtle target's $(foreach ext,$(_PGXNTOOL_EXTENSIONS),...)
loop with more than one extension. But the test only asserts:
run make pgtle
assert_success
It never checks that pgtle.sh actually ran for both extensions. Compare
to the adjacent make all assertions in the same file (lines 123-137),
which do check both sql/ext_alpha--1.0.0.sql and sql/ext_beta--2.5.0.sql
exist.
If the pgtle target's multi-extension loop silently dropped to processing
only one extension (e.g. a regression in _PGXNTOOL_EXTENSIONS, née
PGXNTOOL_EXTENSIONS, or in the pgtle recipe's $(foreach ...)), this
test would still pass, since make pgtle only needs to exit 0.
Suggested fix: add assertions that both pg_tle/*/ext_alpha.sql and
pg_tle/*/ext_beta.sql exist after make pgtle (mirroring the versioned-SQL
assertions already in the file).
Found while auditing internal-variable naming conventions for #87 in
pgxntool (checking whether pgxntool-test has test coverage tied to
PGXNTOOL_EXTENSIONS by name — it doesn't, and this is the closest thing,
which turned out to have its own gap).
Repo: pgxntool-test
test/standard/multi-extension.bats:110-121("make generates versioned SQLfiles") runs
make pgtleagainst a template with two control files(
ext_alpha.control,ext_beta.control) — the only place in the suite thatexercises
base.mk'spgtletarget's$(foreach ext,$(_PGXNTOOL_EXTENSIONS),...)loop with more than one extension. But the test only asserts:
It never checks that
pgtle.shactually ran for both extensions. Compareto the adjacent
make allassertions in the same file (lines 123-137),which do check both
sql/ext_alpha--1.0.0.sqlandsql/ext_beta--2.5.0.sqlexist.
If the
pgtletarget's multi-extension loop silently dropped to processingonly one extension (e.g. a regression in
_PGXNTOOL_EXTENSIONS, néePGXNTOOL_EXTENSIONS, or in thepgtlerecipe's$(foreach ...)), thistest would still pass, since
make pgtleonly needs to exit 0.Suggested fix: add assertions that both
pg_tle/*/ext_alpha.sqlandpg_tle/*/ext_beta.sqlexist aftermake pgtle(mirroring the versioned-SQLassertions already in the file).
Found while auditing internal-variable naming conventions for #87 in
pgxntool (checking whether pgxntool-test has test coverage tied to
PGXNTOOL_EXTENSIONSby name — it doesn't, and this is the closest thing,which turned out to have its own gap).