Ticket #9316: scripts9316_timeout.patch

File scripts9316_timeout.patch, 2.1 KB (added by wjp, 12 years ago)
  • sage-doctest

    # HG changeset patch
    # User Willem Jan Palenstijn <wpalenst@math.leidenuniv.nl>
    # Date 1277277487 -7200
    # Node ID 7b8f619c329cd1b4140986d579d3af34b3f39dae
    # Parent  41c43d811d77ebc06c2fc223c3bb7bd36c8322c6
    #9316: Add exit code 6 for time out to doctests
    
    diff -r 41c43d811d77 -r 7b8f619c329c sage-doctest
    a b  
    1212# 2: KeyboardInterrupt
    1313# 3: doctest process was terminated by a signal
    1414# 4: the doctesting framework raised an exception
     15# 5: (used internally in sage-ptest)
     16# 6: time out
    1517# 100: failed doctests
    1618####################################################################
    1719
     
    674675        if time.time() - tm >= TIMEOUT:
    675             err += "*** *** Error: TIMED OUT! *** ***"
    676676            print err
     677            sys.exit(6)
    677678
    678679        s, numfail = post_process(out, file, f)
    679680        s += err
  • sage-ptest

    diff -r 41c43d811d77 -r 7b8f619c329c sage-ptest
    a b  
    141141            numfail = ol.count('Expected:') + ol.count('Expected nothing') + ol.count('Exception raised:')
    142142            failed.append(abs(F)+(" # %s doctests failed" % numfail))
    143143            ret = numfail
     144        elif ret == -6:
     145            failed.append(abs(F)+" # Time out")
    144146        elif ret == -4:
    145147            failed.append(abs(F)+" # Exception from doctest framework")
    146148        elif ret == -3:
  • sage-test

    diff -r 41c43d811d77 -r 7b8f619c329c sage-test
    a b  
    9696        failed.append(sage_test_command(F)+" # Killed/crashed")
    9797    elif err == 4: # process exit code 4: Unhandled doctest exception
    9898        failed.append(sage_test_command(F)+" # Exception from doctest framework")
     99    elif err == 6: # process exit code 6: Time out
     100        failed.append(sage_test_command(F)+" # Time out")
    99101    elif err == 100: # process exit code 100: Regular doctest failures
    100102        failed.append(sage_test_command(F))
    101103    elif err != 0: