Hi all, d1029bb5a26c has switched the in-core tests suited based on pg_regress to do path substitutions based on the set of environment variables listed in $subject, rather than replacements based on input and output files, generating new files.
These can be really useful for extension developers who maintain SQL test suites, so how about documenting them? I'd like to propose the attached patch, for HEAD, so as one does not need to guess their existence from the SQL files or pg_regress.c. Thoughts or comments? -- Michael
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index d80dd46c5fdb..e3c4a0525ad7 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -444,6 +444,59 @@ make check LANG=C ENCODING=EUC_JP
</para>
</sect2>
+ <sect2 id="regress-run-path-substitution">
+ <title>Path Substitution</title>
+
+ <para>
+ The test suites driven by <command>pg_regress</command> can use the
+ following environment variables for path substitutions:
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>PG_ABS_SRCDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to the source directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_ABS_BUILDDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to the build directory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_DLSUFFIX</literal></term>
+ <listitem>
+ <para>
+ Name of extension for dynamically-loadable modules (e.g.
+ <literal>.so</literal> on Linux).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>PG_LIBDIR</literal></term>
+ <listitem>
+ <para>
+ Absolute path to dynamic libraries.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ These are useful when dealing with function and object loading
+ that require specific paths to work, like paths defined in a
+ <command>CREATE FUNCTION</command> or <command>LOAD</command>
+ command, for example.
+ </para>
+ </sect2>
+
<sect2 id="regress-run-custom-settings">
<title>Custom Server Settings</title>
signature.asc
Description: PGP signature
