tests/run-tests.py
changeset 31010 09ec648cd2a9
parent 31009 161ab32b44a1
child 31011 01eebb65a61d
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)