[PATCH 02 of 10 ipv6 V2] runtests: export HGIPV6 to hint test scripts whether to use IPv6
Jun Wu
quark at fb.com
Fri Feb 17 18:51:16 UTC 2017
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1487221422 28800
# Wed Feb 15 21:03:42 2017 -0800
# Node ID a16166a6c56f6289252a9c2e72117385756a45c3
# Parent 85e1f03110abeaab9a82517f5716a1cab7044042
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r a16166a6c56f
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
@@ -589,4 +589,5 @@ class Test(unittest.TestCase):
self._hgcommand = hgcommand or b'hg'
self._usechg = usechg
+ self._useipv6 = useipv6
self._aborted = False
@@ -879,4 +880,5 @@ class Test(unittest.TestCase):
env["HGENCODING"] = "ascii"
env["HGENCODINGMODE"] = "strict"
+ env['HGIPV6'] = str(int(self._useipv6))
# Reset some environment variables to well-known values so that
More information about the Mercurial-devel
mailing list