[PATCH V3] tests: make run-tests.py invokes tests with needed variables only (issue5069)
mpm at selenic.com
Wed Apr 27 16:12:56 EDT 2016
On Tue, 2016-04-26 at 19:12 +0200, liscju wrote:
> # HG changeset patch
> # User liscju <piotr.listkiewicz at gmail.com>
> # Date 1459165803 -7200
> # Mon Mar 28 13:50:03 2016 +0200
> # Branch stable
> # Node ID 32d476e8526d460da85af3ae6f0415d5e94de67c
> # Parent 38292b227debf6393dc1e2c6ff886f85f6673646
> tests: make run-tests.py invokes tests with needed variables only (issue5069)
> It introduces usedenvvariables list which contains all used environment
> variables used in run-tests.py and in tests directory. It gives third
> party extension option to include additional environment variables by
> setting them with HGTEST_ prefix.
The whitelist shouldn't contain variables:
> + 'TESTTMP',
..that we already create or clobber in run-tests:
> env['TESTTMP'] = self._testtmp
> env['HOME'] = self._testtmp
That's most of your list.
The point of the whitelist is to simplify. It should only have the very small
set of external variables that are required for test scripts to run correctly.
It doesn't need (a) the standard things like LANG we already sanitize (b) the
variables that are added for internal use like DAEMON_PIDS or (c) things that
start with HGTEST_.
The list should be almost empty. In fact, the only ones I currently see are
MSYSTEM and PYTHONHASHSEED.
We should also be able to significantly shorten the (a) list afterwards.
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel