comparison tests/run-tests.py @ 31010:09ec648cd2a9

runtests: always set web.ipv6 Previously, we only set web.ipv6 if IPv6 is used, but not on the IPv4 case. Since we already have set web.address, it makes sense to move "web.ipv6" out from "extra config options".
author Jun Wu <quark@fb.com>
date Thu, 16 Feb 2017 08:43:59 -0800
parents 161ab32b44a1
children 01eebb65a61d
comparison
equal deleted inserted replaced
31009:161ab32b44a1 31010:09ec648cd2a9
597 self._out = None 597 self._out = None
598 self._skipped = None 598 self._skipped = None
599 self._testtmp = None 599 self._testtmp = None
600 self._chgsockdir = None 600 self._chgsockdir = None
601 601
602 # If IPv6 is used, set web.ipv6=1 in hgrc so servers will use IPv6
603 if useipv6:
604 self._extraconfigopts = list(self._extraconfigopts)
605 self._extraconfigopts.append('web.ipv6 = True')
606
607 # If we're not in --debug mode and reference output file exists, 602 # If we're not in --debug mode and reference output file exists,
608 # check test output against it. 603 # check test output against it.
609 if debug: 604 if debug:
610 self._refout = None # to match "out is None" 605 self._refout = None # to match "out is None"
611 elif os.path.exists(self.refpath): 606 elif os.path.exists(self.refpath):
933 hgrc.write(b'[largefiles]\n') 928 hgrc.write(b'[largefiles]\n')
934 hgrc.write(b'usercache = %s\n' % 929 hgrc.write(b'usercache = %s\n' %
935 (os.path.join(self._testtmp, b'.cache/largefiles'))) 930 (os.path.join(self._testtmp, b'.cache/largefiles')))
936 hgrc.write(b'[web]\n') 931 hgrc.write(b'[web]\n')
937 hgrc.write(b'address = localhost\n') 932 hgrc.write(b'address = localhost\n')
933 hgrc.write(b'ipv6 = %s\n' % self._useipv6)
938 934
939 for opt in self._extraconfigopts: 935 for opt in self._extraconfigopts:
940 section, key = opt.split('.', 1) 936 section, key = opt.split('.', 1)
941 assert '=' in key, ('extra config opt %s must ' 937 assert '=' in key, ('extra config opt %s must '
942 'have an = for assignment' % opt) 938 'have an = for assignment' % opt)