comparison tests/run-tests.py @ 47310:9a3aa54774ff

persistent-nodemap: add a way to make the picked uid predictable This will make the test less volatile and therefore easier to maintain. I am setting this is for the persistent nodemap docket first, but my target is to use similar logic for the revlogv2 (and co) test. For persisent nodemap, they are too many different in how each test variants (with rust, without rust, etc) needs new uid for this be really useful (right now). However it will be directly useful for the revlogv2 logic. Differential Revision: https://phab.mercurial-scm.org/D10753
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 19 May 2021 17:19:46 +0200
parents af4d1a177548
children 7ea39d633cf3
comparison
equal deleted inserted replaced
47309:af4d1a177548 47310:9a3aa54774ff
1384 1384
1385 env = os.environ.copy() 1385 env = os.environ.copy()
1386 env['PYTHONUSERBASE'] = sysconfig.get_config_var('userbase') or '' 1386 env['PYTHONUSERBASE'] = sysconfig.get_config_var('userbase') or ''
1387 env['HGEMITWARNINGS'] = '1' 1387 env['HGEMITWARNINGS'] = '1'
1388 env['TESTTMP'] = _bytes2sys(self._testtmp) 1388 env['TESTTMP'] = _bytes2sys(self._testtmp)
1389 docket_id_file = os.path.join(_bytes2sys(self._testtmp), 'DOCKETID')
1390 env['HGTEST_DOCKETIDFILE'] = docket_id_file
1389 env['TESTNAME'] = self.name 1391 env['TESTNAME'] = self.name
1390 env['HOME'] = _bytes2sys(self._testtmp) 1392 env['HOME'] = _bytes2sys(self._testtmp)
1391 if os.name == 'nt': 1393 if os.name == 'nt':
1392 env['REALUSERPROFILE'] = env['USERPROFILE'] 1394 env['REALUSERPROFILE'] = env['USERPROFILE']
1393 # py3.8+ ignores HOME: https://bugs.python.org/issue36264 1395 # py3.8+ ignores HOME: https://bugs.python.org/issue36264