##// END OF EJS Templates
run-tests: establish TestRunner.run()...
Gregory Szorc -
r21366:50472485 default
parent child Browse files
Show More
@@ -1014,6 +1014,22 b' class TestRunner(object):'
1014 1014 self.abort = [False]
1015 1015 self._createdfiles = []
1016 1016
1017 def run(self, tests):
1018 """Run the test suite."""
1019 return self._run(tests)
1020
1021 def _run(self, tests):
1022 vlog("# Using TESTDIR", self.testdir)
1023 vlog("# Using HGTMP", self.hgtmp)
1024 vlog("# Using PATH", os.environ["PATH"])
1025 vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH])
1026
1027 try:
1028 return self._runtests(tests) or 0
1029 finally:
1030 time.sleep(.1)
1031 self._cleanup()
1032
1017 1033 def findtests(self, args):
1018 1034 """Finds possible test files from arguments.
1019 1035
@@ -1033,7 +1049,7 b' class TestRunner(object):'
1033 1049 if os.path.basename(t).startswith('test-')
1034 1050 and (t.endswith('.py') or t.endswith('.t'))]
1035 1051
1036 def runtests(self, tests):
1052 def _runtests(self, tests):
1037 1053 try:
1038 1054 if self.inst:
1039 1055 self.installhg()
@@ -1105,7 +1121,7 b' class TestRunner(object):'
1105 1121
1106 1122 return testcls(self, test, count, refpath)
1107 1123
1108 def cleanup(self):
1124 def _cleanup(self):
1109 1125 """Clean up state from this test invocation."""
1110 1126
1111 1127 if self.options.keep_tmpdir:
@@ -1445,16 +1461,7 b' def main(args, runner=None, parser=None)'
1445 1461
1446 1462 runner.coveragefile = os.path.join(runner.testdir, ".coverage")
1447 1463
1448 vlog("# Using TESTDIR", runner.testdir)
1449 vlog("# Using HGTMP", runner.hgtmp)
1450 vlog("# Using PATH", os.environ["PATH"])
1451 vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH])
1452
1453 try:
1454 return runner.runtests(tests) or 0
1455 finally:
1456 time.sleep(.1)
1457 runner.cleanup()
1464 return runner.run(tests)
1458 1465
1459 1466 if __name__ == '__main__':
1460 1467 sys.exit(main(sys.argv[1:]))
General Comments 0
You need to be logged in to leave comments. Login now