Problem
pgxntool auto-creates empty test/expected/*.out files for test/sql/*.sql files via a touch rule (base.mk:372-373). But this doesn't cover tests that come from .source files (test/input/*.source).
The .source workflow:
- User creates
test/input/foo.source
- pg_regress converts it to
test/sql/foo.sql at runtime
- pg_regress needs
test/expected/foo.out to diff against
Since test/sql/foo.sql doesn't exist when Make evaluates wildcards, the touch rule never fires for it. pg_regress aborts because it can't find the expected file.
TEST__SOURCE__EXPECTED_FILES (base.mk:64) exists but only covers the case where users also provide test/output/*.source. If a user has test/input/*.source without a corresponding test/output/*.source, the expected file is never created.
Current workaround
The install persistence test manually touches the file:
touch test/expected/pgxntool-test.out
Fix
Add a touch rule for .source-derived expected files:
TEST__SOURCE__RESULT_FILES = $(patsubst $(TESTDIR)/input/%.source,$(TESTDIR)/expected/%.out,$(TEST__SOURCE__INPUT_FILES))
$(TEST__SOURCE__RESULT_FILES): | $(TESTDIR)/expected/
@touch $@
And add $(TEST__SOURCE__RESULT_FILES) to the installcheck prerequisites.
Ref: https://github.com/Postgres-Extensions/pgxntool-test/pull/7/files#diff-94df59c75ccd1d8edf305cc2d63981f309dfb4c74037a647b83f4e9d4b002ba5R48
Problem
pgxntool auto-creates empty
test/expected/*.outfiles fortest/sql/*.sqlfiles via a touch rule (base.mk:372-373). But this doesn't cover tests that come from.sourcefiles (test/input/*.source).The
.sourceworkflow:test/input/foo.sourcetest/sql/foo.sqlat runtimetest/expected/foo.outto diff againstSince
test/sql/foo.sqldoesn't exist when Make evaluates wildcards, the touch rule never fires for it. pg_regress aborts because it can't find the expected file.TEST__SOURCE__EXPECTED_FILES(base.mk:64) exists but only covers the case where users also providetest/output/*.source. If a user hastest/input/*.sourcewithout a correspondingtest/output/*.source, the expected file is never created.Current workaround
The install persistence test manually touches the file:
Fix
Add a touch rule for
.source-derived expected files:And add
$(TEST__SOURCE__RESULT_FILES)to theinstallcheckprerequisites.Ref: https://github.com/Postgres-Extensions/pgxntool-test/pull/7/files#diff-94df59c75ccd1d8edf305cc2d63981f309dfb4c74037a647b83f4e9d4b002ba5R48