Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/run-tests.py @ 4361:46280c004f22
change tests to use simplemerge by default
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 16 Apr 2007 20:17:39 -0300 |
parents | 99184c6fd88f |
children | 93a4e72b4f83 |
comparison
equal
deleted
inserted
replaced
4360:d5c3a70f8422 | 4361:46280c004f22 |
---|---|
17 import signal | 17 import signal |
18 import sys | 18 import sys |
19 import tempfile | 19 import tempfile |
20 import time | 20 import time |
21 | 21 |
22 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed", "merge"] | 22 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"] |
23 | 23 |
24 parser = optparse.OptionParser("%prog [options] [tests]") | 24 parser = optparse.OptionParser("%prog [options] [tests]") |
25 parser.add_option("-v", "--verbose", action="store_true", | 25 parser.add_option("-v", "--verbose", action="store_true", |
26 help="output verbose messages") | 26 help="output verbose messages") |
27 parser.add_option("-t", "--timeout", type="int", | 27 parser.add_option("-t", "--timeout", type="int", |
338 # Reset some environment variables to well-known values so that | 338 # Reset some environment variables to well-known values so that |
339 # the tests produce repeatable output. | 339 # the tests produce repeatable output. |
340 os.environ['LANG'] = os.environ['LC_ALL'] = 'C' | 340 os.environ['LANG'] = os.environ['LC_ALL'] = 'C' |
341 os.environ['TZ'] = 'GMT' | 341 os.environ['TZ'] = 'GMT' |
342 | 342 |
343 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"' | |
344 os.environ["HGMERGE"] = sys.executable + ' -c "import sys; sys.exit(0)"' | |
345 os.environ["HGUSER"] = "test" | |
346 os.environ["HGENCODING"] = "ascii" | |
347 os.environ["HGENCODINGMODE"] = "strict" | |
348 | |
349 TESTDIR = os.environ["TESTDIR"] = os.getcwd() | 343 TESTDIR = os.environ["TESTDIR"] = os.getcwd() |
350 HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.") | 344 HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.") |
351 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids') | 345 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids') |
352 HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc') | 346 HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc') |
347 | |
348 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"' | |
349 os.environ["HGMERGE"] = 'python "%s"' % os.path.join(TESTDIR, os.path.pardir, | |
350 'contrib', 'simplemerge') | |
351 os.environ["HGUSER"] = "test" | |
352 os.environ["HGENCODING"] = "ascii" | |
353 os.environ["HGENCODINGMODE"] = "strict" | |
353 | 354 |
354 vlog("# Using TESTDIR", TESTDIR) | 355 vlog("# Using TESTDIR", TESTDIR) |
355 vlog("# Using HGTMP", HGTMP) | 356 vlog("# Using HGTMP", HGTMP) |
356 | 357 |
357 INST = os.path.join(HGTMP, "install") | 358 INST = os.path.join(HGTMP, "install") |