# HG changeset patch # User Jun Wu # Date 2017-02-16 05:03:42 # Node ID 225f574e064586197f94554f612d093e5d3f06be # Parent a489ee9b2852e907a9f714e9fd723f5ea7eb9d48 runtests: export HGIPV6 to hint test scripts whether to use IPv6 Previously, run-tests.py only exports HGPORT, and scripts in tests do not know if IPv6 should be used. And that breaks scripts like dumbhttp.py which always uses IPv4. This patch makes run-tests.py export HGIPV6, which can help test scripts like dumbhttp.py and tinyproxy.py to decide whether to use IPv6 or not. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -588,6 +588,7 @@ class Test(unittest.TestCase): self._shell = _bytespath(shell) self._hgcommand = hgcommand or b'hg' self._usechg = usechg + self._useipv6 = useipv6 self._aborted = False self._daemonpids = [] @@ -878,6 +879,7 @@ class Test(unittest.TestCase): env["HGUSER"] = "test" env["HGENCODING"] = "ascii" env["HGENCODINGMODE"] = "strict" + env['HGIPV6'] = str(int(self._useipv6)) # Reset some environment variables to well-known values so that # the tests produce repeatable output.