On Fri, Feb 11, 2022 at 12:34:31PM -0500, Tom Lane wrote: > Justin Pryzby <pry...@telsasoft.com> writes: >> Or, is it okay to use ABS_SRCDIR? > > Don't see why not --- other tests certainly do.
Another solution would be to rely on TESTDIR, which is always set as of the Makefile invocations and vcregress.pl, but that's doomed for VPATH builds as this points to the build directory, not the source directory so we would not have access to the sample file. The root issue here is that we don't have access to top_srcdir when running the TAP tests, if we want to keep this stuff as a TAP test. libpq's regress.pl tweaks things by passing down a SRCDIR to take care of the VPATH problem, but there is nothing in %ENV that points to the source directory in the context of a TAP test by default, if we cannot rely on pg_config to find where the sample file is located. That's different than this thread, but should we make an effort and expand the data available here for TAP tests? Hmm. Relying on ABS_SRCDIR in the main test suite would be fine, though. It also looks that there would be nothing preventing the addition of the three tests in the TAP test, as of three SQL queries instead. These had better be written with one or more CTEs, for readability, at least, with the inner query reading the contents of the sample file to grab the list of all the GUCs. I guess that it would be better to revert the TAP test and rework all that for the time being, then. -- Michael
signature.asc
Description: PGP signature