changeset 31003:225f574e0645

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.
author Jun Wu <quark@fb.com>
date Wed, 15 Feb 2017 21:03:42 -0800
parents a489ee9b2852
children d05fefbb5ab3
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.