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.
--- 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.