tests/run-tests.py
branchstable
changeset 899 97ec5d659039
parent 895 1a9cd0b534a0
child 902 fb867941518c
equal deleted inserted replaced
897:2ffafb688274 899:97ec5d659039
   618             ret = proc.wait()
   618             ret = proc.wait()
   619             if wifexited(ret):
   619             if wifexited(ret):
   620                 ret = os.WEXITSTATUS(ret)
   620                 ret = os.WEXITSTATUS(ret)
   621         except Timeout:
   621         except Timeout:
   622             vlog('# Process %d timed out - killing it' % proc.pid)
   622             vlog('# Process %d timed out - killing it' % proc.pid)
   623             ret = cleanup()
   623             cleanup()
       
   624             ret = 'timeout'
   624             output += ("\n### Abort: timeout after %d seconds.\n"
   625             output += ("\n### Abort: timeout after %d seconds.\n"
   625                        % options.timeout)
   626                        % options.timeout)
   626         except KeyboardInterrupt:
   627         except KeyboardInterrupt:
   627             vlog('# Handling keyboard interrupt')
   628             vlog('# Handling keyboard interrupt')
   628             cleanup()
   629             cleanup()
   750             skipped = False
   751             skipped = False
   751         else:
   752         else:
   752             skip(missing[-1])
   753             skip(missing[-1])
   753     elif out != refout:
   754     elif out != refout:
   754         mark = '!'
   755         mark = '!'
   755         if ret:
   756         if ret == 'timeout':
       
   757             fail("timed out")
       
   758         elif ret:
   756             fail("output changed and returned error code %d" % ret)
   759             fail("output changed and returned error code %d" % ret)
   757         else:
   760         else:
   758             fail("output changed")
   761             fail("output changed")
   759         if not options.nodiff:
   762         if ret != 'timeout' and not options.nodiff:
   760             if options.view:
   763             if options.view:
   761                 os.system("%s %s %s" % (options.view, ref, err))
   764                 os.system("%s %s %s" % (options.view, ref, err))
   762             else:
   765             else:
   763                 showdiff(refout, out, ref, err)
   766                 showdiff(refout, out, ref, err)
   764         ret = 1
   767         ret = 1