# HG changeset patch # User Christian Ebert # Date 1339342342 -3600 # Node ID 25db33023e4ed05e15e0740cbe15cff3aa34c224 # Parent 06fb629c6195b8e4cbe81d3bee1f5c1673b2c8ae# Parent 15dc93f78ecd6c3f535ada48f4ca0d8f840c4163 Merge with stable diff -r 06fb629c6195 -r 25db33023e4e tests/hghave --- a/tests/hghave Tue Jun 05 00:20:53 2012 +0100 +++ b/tests/hghave Sun Jun 10 16:32:22 2012 +0100 @@ -202,7 +202,7 @@ os.rmdir(d) def has_pyflakes(): - return matchoutput('echo "import re" 2>&1 | pyflakes', + return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"", r":1: 're' imported but unused", True) @@ -241,6 +241,8 @@ return os.getenv('MSYSTEM') checks = { + "true": (lambda: True, "yak shaving"), + "false": (lambda: False, "nail clipper"), "baz": (has_baz, "GNU Arch baz client"), "bzr": (has_bzr, "Canonical's Bazaar client"), "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"), diff -r 06fb629c6195 -r 25db33023e4e tests/run-tests.py --- a/tests/run-tests.py Tue Jun 05 00:20:53 2012 +0100 +++ b/tests/run-tests.py Sun Jun 10 16:32:22 2012 +0100 @@ -599,8 +599,9 @@ def hghave(reqs): # TODO: do something smarter when all other uses of hghave is gone + tdir = TESTDIR.replace('\\', '/') proc = Popen4('%s -c "%s/hghave %s"' % - (options.shell, TESTDIR, ' '.join(reqs)), TESTDIR, 0) + (options.shell, tdir, ' '.join(reqs)), TESTDIR, 0) proc.communicate() ret = proc.wait() if wifexited(ret): @@ -909,7 +910,7 @@ # Make a tmp subdirectory to work in testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \ - os.path.join(HGTMP, os.path.basename(test)).replace('\\', '/') + os.path.join(HGTMP, os.path.basename(test)) replacements = [ (r':%s\b' % options.port, ':$HGPORT'), @@ -1229,7 +1230,7 @@ del os.environ[k] global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE - TESTDIR = os.environ["TESTDIR"] = os.getcwd().replace('\\', '/') + TESTDIR = os.environ["TESTDIR"] = os.getcwd() if options.tmpdir: options.keep_tmpdir = True tmpdir = options.tmpdir @@ -1246,7 +1247,12 @@ #shutil.rmtree(tmpdir) os.makedirs(tmpdir) else: - tmpdir = tempfile.mkdtemp('', 'hgtests.') + d = None + if os.name == 'nt': + # without this, we get the default temp dir location, but + # in all lowercase, which causes troubles with paths (issue3490) + d = os.getenv('TMP') + tmpdir = tempfile.mkdtemp('', 'hgtests.', d) HGTMP = os.environ['HGTMP'] = os.path.realpath(tmpdir) DAEMON_PIDS = None HGRCPATH = None