-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.sqlat runtime - pg_regress needs
test/expected/foo.outto 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.outFix
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.