comparison tests/run-tests.py @ 16890:4d95878712ad

tests/run-tests: use $TMP on Windows (issue3490) This is just a short-term workaround for that issue. More work needs to be done on scmutil.canonpath & friends. $TMP on Windows is specified to be defined, and it has correct casing, so we can use that as the default dir for tempfile.mkdtemp on Windows.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 08 Jun 2012 15:11:05 +0200
parents a3ea092203a5
children 2774576dee4d
comparison
equal deleted inserted replaced
16889:0074c2babb13 16890:4d95878712ad
1244 # or "--tmpdir=$HOME". 1244 # or "--tmpdir=$HOME".
1245 #vlog("# Removing temp dir", tmpdir) 1245 #vlog("# Removing temp dir", tmpdir)
1246 #shutil.rmtree(tmpdir) 1246 #shutil.rmtree(tmpdir)
1247 os.makedirs(tmpdir) 1247 os.makedirs(tmpdir)
1248 else: 1248 else:
1249 tmpdir = tempfile.mkdtemp('', 'hgtests.') 1249 d = None
1250 if os.name == 'nt':
1251 # without this, we get the default temp dir location, but
1252 # in all lowercase, which causes troubles with paths (issue3490)
1253 d = os.getenv('TMP')
1254 tmpdir = tempfile.mkdtemp('', 'hgtests.', d)
1250 HGTMP = os.environ['HGTMP'] = os.path.realpath(tmpdir) 1255 HGTMP = os.environ['HGTMP'] = os.path.realpath(tmpdir)
1251 DAEMON_PIDS = None 1256 DAEMON_PIDS = None
1252 HGRCPATH = None 1257 HGRCPATH = None
1253 1258
1254 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"' 1259 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'