comparison tests/run-tests.py @ 46091:af3a6900f893

run-tests: fix `HGTESTEXTRAEXTENSIONS` with py3 Since `extensions` was a str and `section` bytes, it never populated anything. If it had, it would have put bytes into the environment dictionary that is all str. As everything starts and ends as str, remove the incomplete attempt at byteification. It doesn't appear that we had any test coverage of this bit of code, so also add a non-extension config to make sure it is filtered out properly. Differential Revision: https://phab.mercurial-scm.org/D9557
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 09 Dec 2020 12:57:40 -0500
parents 9e785d940525
children 08fd76a553c9
comparison
equal deleted inserted replaced
46090:9eb07ab3f2d4 46091:af3a6900f893
1362 'HGCATAPULTSERVERPIPE', os.devnull 1362 'HGCATAPULTSERVERPIPE', os.devnull
1363 ) 1363 )
1364 1364
1365 extraextensions = [] 1365 extraextensions = []
1366 for opt in self._extraconfigopts: 1366 for opt in self._extraconfigopts:
1367 section, key = _sys2bytes(opt).split(b'.', 1) 1367 section, key = opt.split('.', 1)
1368 if section != 'extensions': 1368 if section != 'extensions':
1369 continue 1369 continue
1370 name = key.split(b'=', 1)[0] 1370 name = key.split('=', 1)[0]
1371 extraextensions.append(name) 1371 extraextensions.append(name)
1372 1372
1373 if extraextensions: 1373 if extraextensions:
1374 env['HGTESTEXTRAEXTENSIONS'] = b' '.join(extraextensions) 1374 env['HGTESTEXTRAEXTENSIONS'] = ' '.join(extraextensions)
1375 1375
1376 # LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw 1376 # LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw
1377 # IP addresses. 1377 # IP addresses.
1378 env['LOCALIP'] = _bytes2sys(self._localip()) 1378 env['LOCALIP'] = _bytes2sys(self._localip())
1379 1379