# HG changeset patch # User Jun Wu # Date 1487221422 28800 # 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 -r a489ee9b2852 -r 225f574e0645 tests/run-tests.py --- a/tests/run-tests.py Fri Feb 17 00:59:09 2017 -0800 +++ b/tests/run-tests.py Wed Feb 15 21:03:42 2017 -0800 @@ -588,6 +588,7 @@ 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 @@ 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.