Environment variable to disable diffs file output - Mailing list pgsql-hackers

From Илья Чердаков
Subject Environment variable to disable diffs file output
Date
Msg-id ba567012-bff5-465a-8ee7-913b32f45d89@gmail.com
Whole thread Raw
Responses Re: Environment variable to disable diffs file output
Re: Environment variable to disable diffs file output
List pgsql-hackers
Greetings!

I'd like to add a environment variable to the patch to
disable diff output. Sometimes you have to be creative
with exploratory testing, modifying test files, etc.,
and multiple diff outputs can become a nuisance. This
doesn't change the default behavior, but it does give
you control over diff output in tests for specific
scenarios where a large number of failures are expected
(mass runs or exploratory testing with changing tests).

The env usage and implementation are somewhat similar
to PG_REGRESS_DIFF_OPTS
     PG_REGRESS_DISABLE_DIFFS_OUTPUT=1 make check -s.

For now, I suggest to simply disabling it, but I'm also
considering passing the number of lines to output via env
or via flag pg_regress instead of completely disabling it.
Something like
     PG_REGRESS_DIFFS_NUMBER_LINES_OUTPUT=20 make check
and then when an error occurs, 20 lines will be output
instead of the default 80. Setting it to 0 disables
diffs output.


I think this small addition will be useful for many
developers, especially testers.
---
This is my first patch. I welcome critique and comments.
Best regards,
Ilya Cherdakov, PostgresPro
Attachment

pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: Implement waiting for wal lsn replay: reloaded
Next
From: Richard Guo
Date:
Subject: Clean up remove_rel_from_query() after self-join elimination commit