Skip to content

Commit 574f764

Browse files
committed
pg_regress: Allow overriding diff options
By setting the environment variable PG_REGRESS_DIFF_OPTS, custom diff options can be passed. reviewed by Jeevan Chalke
1 parent 5bb2ddc commit 574f764

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

doc/src/sgml/regress.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ gmake check EXTRA_TESTS=collate.linux.utf8 LANG=en_US.utf8
285285
file against the reference outputs stored in the
286286
<filename>src/test/regress/expected</filename> directory. Any
287287
differences are saved for your inspection in
288-
<filename>src/test/regress/regression.diffs</filename>. (Or you
288+
<filename>src/test/regress/regression.diffs</filename>. If you don't
289+
like the <command>diff</command> options that are used by default, set the
290+
environment variable <envar>PG_REGRESS_DIFF_OPTS</envar>, for
291+
instance <literal>PG_REGRESS_DIFF_OPTS='-u'</literal>. (Or you
289292
can run <command>diff</command> yourself, if you prefer.)
290293
</para>
291294

src/test/regress/pg_regress.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,9 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
19701970
*/
19711971
ifunc();
19721972

1973+
if (getenv("PG_REGRESS_DIFF_OPTS"))
1974+
pretty_diff_opts = getenv("PG_REGRESS_DIFF_OPTS");
1975+
19731976
while ((c = getopt_long(argc, argv, "hV", long_options, &option_index)) != -1)
19741977
{
19751978
switch (c)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy