Ignore:
Timestamp:
Nov 25, 2016, 8:04:54 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/script/autobuild.py

    r988 r989  
    561561
    562562def email_failure(status, failed_task, failed_stage, failed_tag, errstr,
    563                   elapsed_time, log_base=None):
     563                  elapsed_time, log_base=None, add_log_tail=True):
    564564    '''send an email to options.email about the failure'''
    565565    elapsed_minutes = elapsed_time / 60.0
     
    599599''' % (log_base, failed_tag, log_base, failed_tag, log_base, top_commit_msg)
    600600
     601    if add_log_tail:
     602        f = open("%s/%s.stdout" % (gitroot, failed_tag), 'r')
     603        lines = f.readlines()
     604        log_tail = "".join(lines[-50:])
     605        num_lines = len(lines)
     606        if num_lines < 50:
     607            # Also include stderr (compile failures) if < 50 lines of stdout
     608            f = open("%s/%s.stderr" % (gitroot, failed_tag), 'r')
     609            log_tail += "".join(f.readlines()[-(50-num_lines):])
     610
     611        text += '''
     612The last 50 lines of log messages:
     613
     614%s
     615    ''' % log_tail
     616        f.close()
     617
    601618    logs = os.path.join(gitroot, 'logs.tar.gz')
    602     send_email('autobuild failure on %s for task %s during %s'
    603                % (platform.node(), failed_task, failed_stage),
     619    send_email('autobuild[%s] failure on %s for task %s during %s'
     620               % (options.branch, platform.node(), failed_task, failed_stage),
    604621               text, logs)
    605622
     
    632649
    633650    logs = os.path.join(gitroot, 'logs.tar.gz')
    634     send_email('autobuild sucess on %s ' % platform.node(),
     651    send_email('autobuild[%s] success on %s' % (options.branch, platform.node()),
    635652               text, logs)
    636653
     
    734751AUTOBUILD FAILURE
    735752
    736 Your autobuild on %s failed after %.1f minutes
     753Your autobuild[%s] on %s failed after %.1f minutes
    737754when trying to test %s with the following error:
    738755
     
    743760####################################################################
    744761
    745 ''' % (platform.node(), elapsed_minutes, failed_task, errstr)
     762''' % (options.branch, platform.node(), elapsed_minutes, failed_task, errstr)
    746763
    747764cleanup()
Note: See TracChangeset for help on using the changeset viewer.