Patchwork Make test suite more immune to environment variables

login
register
mail settings
Submitter Dr Rainer Woitok
Date Feb. 20, 2017, 5:27 p.m.
Message ID <22699.9985.231000.821534@woitok.gmail.com>
Download mbox | patch
Permalink /patch/18687/
State Accepted
Headers show

Comments

Dr Rainer Woitok - Feb. 20, 2017, 5:27 p.m.
tests: make test suite more immune to environment variables

Plenty of tests break when "make tests" is run while environment
variables "HGPLAIN" or "HGPLAINEXCEPT" are set (test "test-obsolete-
checkheads.t" is just a single example).

This patch causes script "run-tests.py" to also remove these two
variables from the environment the tests are executed in.
Bryan O'Sullivan - Feb. 20, 2017, 5:43 p.m.
On Mon, Feb 20, 2017 at 9:27 AM, Dr Rainer Woitok <rainer.woitok@gmail.com>
wrote:

> tests: make test suite more immune to environment variables
>

Good catch!
Yuya Nishihara - Feb. 21, 2017, 3:06 p.m.
On Mon, 20 Feb 2017 09:43:09 -0800, Bryan O'Sullivan wrote:
> On Mon, Feb 20, 2017 at 9:27 AM, Dr Rainer Woitok <rainer.woitok@gmail.com>
> wrote:
> 
> > tests: make test suite more immune to environment variables
> >
> 
> Good catch!

Indeed. Queued, thanks.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -849,6 +849,7 @@ 
         env['TERM'] = 'xterm'
 
         for k in ('HG HGPROF CDPATH GREP_OPTIONS http_proxy no_proxy ' +
+                  'HGPLAIN HGPLAINEXCEPT ' +
                   'NO_PROXY CHGDEBUG').split():
             if k in env:
                 del env[k]