[PATCH] Make test suite more immune to environment variables

Dr Rainer Woitok rainer.woitok at gmail.com
Mon Feb 20 17:27:29 UTC 2017


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.

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]


More information about the Mercurial-devel mailing list