Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0086ee3

Browse files
committed
Use installed postgresql.conf.sample for GUC sanity TAP test
The current code looks for the sample file in the source directory, but it seems better to test against the installed sample file. Backpatch to release 15 where the test was introduced. Discussion: https://postgr.es/m/73eea68e-3b6f-5f63-6024-25ed26b52016@dunslane.net Reviewed by Tom Lane, Alvaro Herrera, Michael Paquier.
1 parent 7a387f5 commit 0086ee3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/modules/test_misc/t/003_check_guc.pl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@
3333
ORDER BY 1");
3434
my @not_in_sample_array = split("\n", lc($not_in_sample));
3535

36-
# TAP tests are executed in the directory of the test, in the source tree,
37-
# even for VPATH builds, so rely on that to find postgresql.conf.sample.
38-
my $rootdir = "../../../..";
39-
my $sample_file = "$rootdir/src/backend/utils/misc/postgresql.conf.sample";
36+
# use the sample file from the temp install
37+
my $share_dir = $node->config_data('--sharedir');
38+
my $sample_file = "$share_dir/postgresql.conf.sample";
4039

4140
# List of all the GUCs found in the sample file.
4241
my @gucs_in_file;

0 commit comments

Comments
 (0)