diff -r 1f803482844a -r f07ca071a058 tests/run-tests.py --- a/tests/run-tests.py Wed Feb 15 16:22:22 2017 -0800 +++ b/tests/run-tests.py Wed Feb 15 16:43:27 2017 -0800 @@ -535,7 +535,8 @@ timeout=defaults['timeout'], startport=defaults['port'], extraconfigopts=None, py3kwarnings=False, shell=None, hgcommand=None, - slowtimeout=defaults['slowtimeout'], usechg=False): + slowtimeout=defaults['slowtimeout'], usechg=False, + useipv6=False): """Create a test from parameters. path is the full path to the file defining the test. @@ -593,6 +594,11 @@ self._testtmp = None self._chgsockdir = None + # If IPv6 is used, set web.ipv6=1 in hgrc so servers will use IPv6 + if useipv6: + self._extraconfigopts = list(self._extraconfigopts) + self._extraconfigopts.append('web.ipv6 = True') + # If we're not in --debug mode and reference output file exists, # check test output against it. if debug: @@ -2317,7 +2323,8 @@ py3kwarnings=self.options.py3k_warnings, shell=self.options.shell, hgcommand=self._hgcommand, - usechg=bool(self.options.with_chg or self.options.chg)) + usechg=bool(self.options.with_chg or self.options.chg), + useipv6=useipv6) t.should_reload = True return t