comparison tests/run-tests.py @ 2975:3091b1153e2c

Clear contents of global hgrc for tests before running each test. This fixes running test-mq-qdiff after test-mq, because of changed settings.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 22 Aug 2006 09:55:14 +0200
parents e475fe2a6029
children 53e843840349
comparison
equal deleted inserted replaced
2974:eef469259745 2975:3091b1153e2c
209 vlog("# Test", test) 209 vlog("# Test", test)
210 if not verbose: 210 if not verbose:
211 sys.stdout.write('.') 211 sys.stdout.write('.')
212 sys.stdout.flush() 212 sys.stdout.flush()
213 213
214 # create a fresh hgrc
215 hgrc = file(HGRCPATH, 'w+')
216 hgrc.close()
217
214 err = os.path.join(TESTDIR, test+".err") 218 err = os.path.join(TESTDIR, test+".err")
215 ref = os.path.join(TESTDIR, test+".out") 219 ref = os.path.join(TESTDIR, test+".out")
216 220
217 if os.path.exists(err): 221 if os.path.exists(err):
218 os.remove(err) # Remove any previous output files 222 os.remove(err) # Remove any previous output files
317 os.environ['TZ'] = 'GMT' 321 os.environ['TZ'] = 'GMT'
318 322
319 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"' 323 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
320 os.environ["HGMERGE"] = sys.executable + ' -c "import sys; sys.exit(0)"' 324 os.environ["HGMERGE"] = sys.executable + ' -c "import sys; sys.exit(0)"'
321 os.environ["HGUSER"] = "test" 325 os.environ["HGUSER"] = "test"
322 os.environ["HGRCPATH"] = ""
323 326
324 TESTDIR = os.environ["TESTDIR"] = os.getcwd() 327 TESTDIR = os.environ["TESTDIR"] = os.getcwd()
325 HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.") 328 HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.")
326 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids') 329 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
330 HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
327 331
328 vlog("# Using TESTDIR", TESTDIR) 332 vlog("# Using TESTDIR", TESTDIR)
329 vlog("# Using HGTMP", HGTMP) 333 vlog("# Using HGTMP", HGTMP)
330 334
331 INST = os.path.join(HGTMP, "install") 335 INST = os.path.join(HGTMP, "install")