comparison tests/run-tests.py @ 21457:12dd94e32102

run-tests: move errpath deletion to setUp()
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Apr 2014 15:53:25 -0700
parents a06a4142ad1f
children c42219733f30
comparison
equal deleted inserted replaced
21456:a06a4142ad1f 21457:12dd94e32102
396 396
397 self._testtmp = os.path.join(self._threadtmp, 397 self._testtmp = os.path.join(self._threadtmp,
398 os.path.basename(self._path)) 398 os.path.basename(self._path))
399 os.mkdir(self._testtmp) 399 os.mkdir(self._testtmp)
400 400
401 # Remove any previous output files.
402 if os.path.exists(self._errpath):
403 os.remove(self._errpath)
404
401 def run(self): 405 def run(self):
402 """Run this test instance. 406 """Run this test instance.
403 407
404 This will return a tuple describing the result of the test. 408 This will return a tuple describing the result of the test.
405 """ 409 """
427 else: 431 else:
428 return self.ignore("doesn't match keyword") 432 return self.ignore("doesn't match keyword")
429 433
430 if not os.path.basename(self.name.lower()).startswith('test-'): 434 if not os.path.basename(self.name.lower()).startswith('test-'):
431 return self.skip('not a test file') 435 return self.skip('not a test file')
432
433 # Remove any previous output files.
434 if os.path.exists(self._errpath):
435 os.remove(self._errpath)
436 436
437 replacements, port = self._getreplacements() 437 replacements, port = self._getreplacements()
438 env = self._getenv(port) 438 env = self._getenv(port)
439 self._daemonpids.append(env['DAEMON_PIDS']) 439 self._daemonpids.append(env['DAEMON_PIDS'])
440 self._createhgrc(env['HGRCPATH']) 440 self._createhgrc(env['HGRCPATH'])