##// END OF EJS Templates
catch KeyboardInterrupt in run-tests
Benoit Boissinot -
r2258:7e43d68f default
parent child Browse files
Show More
@@ -242,24 +242,28 b' PYTHONDIR = os.path.join(INST, "lib", "p'
242 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
242 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
243
243
244 try:
244 try:
245 install_hg()
245 try:
246 install_hg()
246
247
247 tests = 0
248 tests = 0
248 failed = 0
249 failed = 0
249
250
250 if len(args) == 0:
251 if len(args) == 0:
251 args = os.listdir(".")
252 args = os.listdir(".")
252 for test in args:
253 for test in args:
253 if test.startswith("test-"):
254 if test.startswith("test-"):
254 if '~' in test or re.search(r'\.(out|err)$', test):
255 if '~' in test or re.search(r'\.(out|err)$', test):
255 continue
256 continue
256 if not run_one(test):
257 if not run_one(test):
257 failed += 1
258 failed += 1
258 tests += 1
259 tests += 1
259
260
260 print "\n# Ran %d tests, %d failed." % (tests, failed)
261 print "\n# Ran %d tests, %d failed." % (tests, failed)
261 if coverage:
262 if coverage:
262 output_coverage()
263 output_coverage()
264 except KeyboardInterrupt:
265 failed = True
266 print "\ninterrupted!"
263 finally:
267 finally:
264 cleanup_exit()
268 cleanup_exit()
265
269
General Comments 0
You need to be logged in to leave comments. Login now