tests/run-tests.py
changeset 853 65ec857290ab
parent 852 fb1e8925292d
child 856 e1a5259b3d03
equal deleted inserted replaced
851:211c681fd634 853:65ec857290ab
   602             vlog('# Handling keyboard interrupt')
   602             vlog('# Handling keyboard interrupt')
   603             cleanup()
   603             cleanup()
   604             raise
   604             raise
   605 
   605 
   606     for s, r in replacements:
   606     for s, r in replacements:
   607         output = output.replace(s, r)
   607         output = re.sub(s, r, output)
   608     return ret, splitnewlines(output)
   608     return ret, splitnewlines(output)
   609 
   609 
   610 def runone(options, test, skips, fails):
   610 def runone(options, test, skips, fails):
   611     '''tristate output:
   611     '''tristate output:
   612     None -> skipped
   612     None -> skipped
   675 
   675 
   676     if options.timeout > 0:
   676     if options.timeout > 0:
   677         signal.alarm(options.timeout)
   677         signal.alarm(options.timeout)
   678 
   678 
   679     ret, out = runner(testpath, options, [
   679     ret, out = runner(testpath, options, [
   680         (testtmp, '$TESTTMP'),
   680         (re.escape(testtmp), '$TESTTMP'),
   681         (':%s' % options.port, ':$HGPORT'),
   681         (r':%s\b' % options.port, ':$HGPORT'),
   682         (':%s' % (options.port + 1), ':$HGPORT1'),
   682         (r':%s\b' % (options.port + 1), ':$HGPORT1'),
   683         (':%s' % (options.port + 2), ':$HGPORT2'),
   683         (r':%s\b' % (options.port + 2), ':$HGPORT2'),
   684         ])
   684         ])
   685     vlog("# Ret was:", ret)
   685     vlog("# Ret was:", ret)
   686 
   686 
   687     if options.timeout > 0:
   687     if options.timeout > 0:
   688         signal.alarm(0)
   688         signal.alarm(0)