# HG changeset patch # User Christian Ebert # Date 1370695565 -3600 # Node ID 181e420ff0ac7f23ae69677bbe07fa96a5ffc5f5 # Parent b42c9f1d461a4d5aebeb363c39815abaa25c1fb3# Parent 79e0df6ffaad1128f54230f003063ef42095c035 Merge with stable diff -r b42c9f1d461a -r 181e420ff0ac tests/run-tests.py --- a/tests/run-tests.py Thu Jun 06 22:36:18 2013 +0100 +++ b/tests/run-tests.py Sat Jun 08 13:46:05 2013 +0100 @@ -256,10 +256,6 @@ sys.stderr.write( 'warning: --timeout option ignored with --debug\n') options.timeout = 0 - if options.time: - sys.stderr.write( - 'warning: --time option ignored with --debug\n') - options.time = False if options.py3k_warnings: if sys.version_info[:2] < (2, 6) or sys.version_info[:2] >= (3, 0): parser.error('--py3k-warnings can only be used on Python 2.6+') @@ -333,7 +329,7 @@ def createhgrc(path, options): # create a fresh hgrc - hgrc = open(path, 'w+') + hgrc = open(path, 'w') hgrc.write('[ui]\n') hgrc.write('slash = True\n') hgrc.write('interactive = False\n') @@ -960,12 +956,15 @@ env = createenv(options, testtmp, threadtmp, port) createhgrc(env['HGRCPATH'], options) - if options.time: - starttime = time.time() - ret, out = runner(testpath, testtmp, options, replacements, env) - if options.time: + starttime = time.time() + try: + ret, out = runner(testpath, testtmp, options, replacements, env) + except KeyboardInterrupt: endtime = time.time() - times.append((test, endtime - starttime)) + log('INTERRUPTED: %s (after %d seconds)' % (test, endtime - starttime)) + raise + endtime = time.time() + times.append((test, endtime - starttime)) vlog("# Ret was:", ret) killdaemons(env['DAEMON_PIDS'])