tests/run-tests.py
branchstable
changeset 1268 6133577ca4f6
parent 1267 663143c0a5e2
child 1269 a11176ad8001
equal deleted inserted replaced
1267:663143c0a5e2 1268:6133577ca4f6
   958         replacements.append((re.escape(testtmp), '$TESTTMP'))
   958         replacements.append((re.escape(testtmp), '$TESTTMP'))
   959 
   959 
   960     env = createenv(options, testtmp, threadtmp, port)
   960     env = createenv(options, testtmp, threadtmp, port)
   961     createhgrc(env['HGRCPATH'], options)
   961     createhgrc(env['HGRCPATH'], options)
   962 
   962 
   963     if options.time:
   963     starttime = time.time()
   964         starttime = time.time()
       
   965     try:
   964     try:
   966         ret, out = runner(testpath, testtmp, options, replacements, env)
   965         ret, out = runner(testpath, testtmp, options, replacements, env)
   967     except KeyboardInterrupt:
   966     except KeyboardInterrupt:
   968         msg = ''
   967         endtime = time.time()
   969         if options.time:
   968         msg = '(after %d seconds)' % (endtime - starttime)
   970             endtime = time.time()
       
   971             msg = '(after %d seconds)' % (endtime - starttime)
       
   972         log('INTERRUPTED:', test, msg)
   969         log('INTERRUPTED:', test, msg)
   973         raise
   970         raise
   974     if options.time:
   971     endtime = time.time()
   975         endtime = time.time()
   972     times.append((test, endtime - starttime))
   976         times.append((test, endtime - starttime))
       
   977     vlog("# Ret was:", ret)
   973     vlog("# Ret was:", ret)
   978 
   974 
   979     killdaemons(env['DAEMON_PIDS'])
   975     killdaemons(env['DAEMON_PIDS'])
   980 
   976 
   981     skipped = (ret == SKIPPED_STATUS)
   977     skipped = (ret == SKIPPED_STATUS)