##// END OF EJS Templates
py3: ensure run-tests environment is uniformly str...
Matt Harbison -
r39682:f3d12295 default
parent child Browse files
Show More
@@ -1004,7 +1004,7 b' class Test(unittest.TestCase):'
1004 1004 environment."""
1005 1005 # Put the restoreenv script inside self._threadtmp
1006 1006 scriptpath = os.path.join(self._threadtmp, b'restoreenv.sh')
1007 testenv['HGTEST_RESTOREENV'] = scriptpath
1007 testenv['HGTEST_RESTOREENV'] = _strpath(scriptpath)
1008 1008
1009 1009 # Only restore environment variable names that the shell allows
1010 1010 # us to export.
@@ -1036,15 +1036,16 b' class Test(unittest.TestCase):'
1036 1036 env = os.environ.copy()
1037 1037 env['PYTHONUSERBASE'] = sysconfig.get_config_var('userbase') or ''
1038 1038 env['HGEMITWARNINGS'] = '1'
1039 env['TESTTMP'] = self._testtmp
1039 env['TESTTMP'] = _strpath(self._testtmp)
1040 1040 env['TESTNAME'] = self.name
1041 env['HOME'] = self._testtmp
1041 env['HOME'] = _strpath(self._testtmp)
1042 1042 # This number should match portneeded in _getport
1043 1043 for port in xrange(3):
1044 1044 # This list should be parallel to _portmap in _getreplacements
1045 1045 defineport(port)
1046 env["HGRCPATH"] = os.path.join(self._threadtmp, b'.hgrc')
1047 env["DAEMON_PIDS"] = os.path.join(self._threadtmp, b'daemon.pids')
1046 env["HGRCPATH"] = _strpath(os.path.join(self._threadtmp, b'.hgrc'))
1047 env["DAEMON_PIDS"] = _strpath(os.path.join(self._threadtmp,
1048 b'daemon.pids'))
1048 1049 env["HGEDITOR"] = ('"' + sys.executable + '"'
1049 1050 + ' -c "import sys; sys.exit(0)"')
1050 1051 env["HGMERGE"] = "internal:merge"
@@ -1069,7 +1070,7 b' class Test(unittest.TestCase):'
1069 1070
1070 1071 # LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw
1071 1072 # IP addresses.
1072 env['LOCALIP'] = self._localip()
1073 env['LOCALIP'] = _strpath(self._localip())
1073 1074
1074 1075 # Reset some environment variables to well-known values so that
1075 1076 # the tests produce repeatable output.
General Comments 0
You need to be logged in to leave comments. Login now