Mercurial > hg
comparison tests/run-tests.py @ 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 | d4916aebf3d0 |
comparison
equal
deleted
inserted
replaced
31002:a489ee9b2852 | 31003:225f574e0645 |
---|---|
586 self._extraconfigopts = extraconfigopts or [] | 586 self._extraconfigopts = extraconfigopts or [] |
587 self._py3kwarnings = py3kwarnings | 587 self._py3kwarnings = py3kwarnings |
588 self._shell = _bytespath(shell) | 588 self._shell = _bytespath(shell) |
589 self._hgcommand = hgcommand or b'hg' | 589 self._hgcommand = hgcommand or b'hg' |
590 self._usechg = usechg | 590 self._usechg = usechg |
591 self._useipv6 = useipv6 | |
591 | 592 |
592 self._aborted = False | 593 self._aborted = False |
593 self._daemonpids = [] | 594 self._daemonpids = [] |
594 self._finished = None | 595 self._finished = None |
595 self._ret = None | 596 self._ret = None |
876 + ' -c "import sys; sys.exit(0)"') | 877 + ' -c "import sys; sys.exit(0)"') |
877 env["HGMERGE"] = "internal:merge" | 878 env["HGMERGE"] = "internal:merge" |
878 env["HGUSER"] = "test" | 879 env["HGUSER"] = "test" |
879 env["HGENCODING"] = "ascii" | 880 env["HGENCODING"] = "ascii" |
880 env["HGENCODINGMODE"] = "strict" | 881 env["HGENCODINGMODE"] = "strict" |
882 env['HGIPV6'] = str(int(self._useipv6)) | |
881 | 883 |
882 # Reset some environment variables to well-known values so that | 884 # Reset some environment variables to well-known values so that |
883 # the tests produce repeatable output. | 885 # the tests produce repeatable output. |
884 env['LANG'] = env['LC_ALL'] = env['LANGUAGE'] = 'C' | 886 env['LANG'] = env['LC_ALL'] = env['LANGUAGE'] = 'C' |
885 env['TZ'] = 'GMT' | 887 env['TZ'] = 'GMT' |