def upload_logs( tag , runner , user , **unused ): import_utils() from runner import upload_logs upload_logs( regression_results, runner, tag, user )
def regression(tag, local, runner, platform, user, comment, toolsets, book, bjam_options, bjam_toolset, pjl_toolset, incremental, send_bjam_log, force_update, monitored, timeout, mail=None, smtp_login=None, proxy=None, ftp_proxy=None, debug_level=0, v2=1, args=[]): try: mail_subject = 'Boost regression for %s on %s' % ( tag, string.split(socket.gethostname(), '.')[0]) start_time = time.localtime() if mail: log('Sending start notification to "%s"' % mail) send_mail(smtp_login, mail, '%s started at %s.' % (mail_subject, format_time(start_time)), debug_level=debug_level) if local is not None: log('Using local file "%s"' % local) b = os.path.basename(local) tag = b[0:b.find('.')] log('Tag: "%s"' % tag) unpack_tarball(local, regression_root) else: if incremental or force_update: if not incremental: cleanup(['bin']) update_source(user, tag, proxy, []) else: cleanup([]) get_source(user, tag, proxy, []) setup(comment, toolsets, book, bjam_toolset, pjl_toolset, monitored, proxy, v2, []) # Not specifying --toolset in command line is not enough # that would mean to use Boost.Build default ones # We can skip test only we were explictly # told to have no toolsets in command line "--toolset=" if toolsets != '': # --toolset=, test(toolsets, bjam_options, monitored, timeout, v2, []) collect_logs(tag, runner, platform, user, comment, incremental, []) upload_logs(tag, runner, user, ftp_proxy, debug_level, send_bjam_log) if book: build_book() collect_book() upload_book(tag, runner, ftp_proxy, debug_level) update_itself(tag) if mail: log('Sending report to "%s"' % mail) end_time = time.localtime() send_mail(smtp_login, mail, '%s completed successfully at %s.' % (mail_subject, format_time(end_time)), debug_level=debug_level) except: if mail: log('Sending report to "%s"' % mail) traceback_ = '\n'.join( apply(traceback.format_exception, sys.exc_info())) end_time = time.localtime() send_mail( smtp_login, mail, '%s failed at %s.' % (mail_subject, format_time(end_time)), traceback_, debug_level) raise
def regression( tag , local , runner , platform , user , comment , toolsets , bjam_options , bjam_toolset , pjl_toolset , incremental , monitored , timeout , mail = None , proxy = None , args = [] ): try: mail_subject = 'Boost regression for %s on %s ' % ( tag, string.split(socket.gethostname(), '.')[0] ) start_time = time.localtime() if mail: log( 'Sending start notification to "%s"' % mail ) utils.send_mail( mail, mail_subject + ' started at %s.' % format_time( start_time ) ) if local is not None: log( 'Using local file "%s"' % local ) b = os.path.basename( local ) tag = b[ 0: b.find( '.' ) ] log( 'Tag: "%s"' % tag ) if not os.path.isdir( local ): unpack_tarball( local, regression_root ) else: if b != 'boost': log( 'Renaming "%s" into "%s"' % ( local, boost_root ) ) os.rename( local, boost_root ) else: if incremental: update_source( user, tag, proxy, [] ) else: cleanup( [] ) get_source( user, tag, proxy, [] ) setup( comment, toolsets, bjam_toolset, pjl_toolset, monitored, proxy, [] ) test( toolsets, bjam_options, monitored, timeout, [] ) collect_logs( tag, runner, platform, user, comment, incremental, [] ) upload_logs( tag, runner, user ) update_itself() if mail: log( 'Sending report to "%s"' % mail ) end_time = time.localtime() utils.send_mail( mail , mail_subject + ' completed successfully at %s.' % format_time( end_time ) ) except: if mail: log( 'Sending report to "%s"' % mail ) msg = regression_log + [ '' ] + apply( traceback.format_exception, sys.exc_info() ) end_time = time.localtime() utils.send_mail( mail , mail_subject + ' failed at %s.' % format_time( end_time ) , '\n'.join( msg ) ) raise
def regression( tag , local , runner , platform , user , comment , toolsets , bjam_options , bjam_toolset , pjl_toolset , incremental , force_update , monitored , timeout , mail = None , smtp_login = None , proxy = None , ftp_proxy = None , debug_level = 0 , args = [] ): try: mail_subject = 'Boost regression for %s on %s' % ( tag, string.split(socket.gethostname(), '.')[0] ) start_time = time.localtime() if mail: log( 'Sending start notification to "%s"' % mail ) send_mail( smtp_login , mail , '%s started at %s.' % ( mail_subject, format_time( start_time ) ) , debug_level = debug_level ) if local is not None: log( 'Using local file "%s"' % local ) b = os.path.basename( local ) tag = b[ 0: b.find( '.' ) ] log( 'Tag: "%s"' % tag ) unpack_tarball( local, regression_root ) else: if incremental or force_update: if not incremental: cleanup( [ 'bin' ] ) update_source( user, tag, proxy, [] ) else: cleanup( [] ) get_source( user, tag, proxy, [] ) setup( comment, toolsets, bjam_toolset, pjl_toolset, monitored, proxy, [] ) test( toolsets, bjam_options, monitored, timeout, [] ) collect_logs( tag, runner, platform, user, comment, incremental, [] ) upload_logs( tag, runner, user, ftp_proxy, debug_level ) update_itself( tag ) if mail: log( 'Sending report to "%s"' % mail ) end_time = time.localtime() send_mail( smtp_login , mail , '%s completed successfully at %s.' % ( mail_subject, format_time( end_time ) ) , debug_level = debug_level ) except: if mail: log( 'Sending report to "%s"' % mail ) traceback_ = '\n'.join( apply( traceback.format_exception, sys.exc_info() ) ) end_time = time.localtime() send_mail( smtp_login , mail , '%s failed at %s.' % ( mail_subject, format_time( end_time ) ) , traceback_ , debug_level ) raise
def regression( tag, local, runner, platform, user, comment, toolsets, book, bjam_options, bjam_toolset, pjl_toolset, incremental, send_bjam_log, force_update, monitored, timeout, mail=None, smtp_login=None, proxy=None, ftp_proxy=None, debug_level=0, v2=1, args=[], ): try: mail_subject = "Boost regression for %s on %s" % (tag, string.split(socket.gethostname(), ".")[0]) start_time = time.localtime() if mail: log('Sending start notification to "%s"' % mail) send_mail( smtp_login, mail, "%s started at %s." % (mail_subject, format_time(start_time)), debug_level=debug_level ) if local is not None: log('Using local file "%s"' % local) b = os.path.basename(local) tag = b[0 : b.find(".")] log('Tag: "%s"' % tag) unpack_tarball(local, regression_root) else: if incremental or force_update: if not incremental: cleanup(["bin"]) update_source(user, tag, proxy, []) else: cleanup([]) get_source(user, tag, proxy, []) setup(comment, toolsets, book, bjam_toolset, pjl_toolset, monitored, proxy, v2, []) # Not specifying --toolset in command line is not enough # that would mean to use Boost.Build default ones # We can skip test only we were explictly # told to have no toolsets in command line "--toolset=" if toolsets != "": # --toolset=, test(toolsets, bjam_options, monitored, timeout, v2, []) collect_logs(tag, runner, platform, user, comment, incremental, []) upload_logs(tag, runner, user, ftp_proxy, debug_level, send_bjam_log) if book: build_book() collect_book() upload_book(tag, runner, ftp_proxy, debug_level) update_itself(tag) if mail: log('Sending report to "%s"' % mail) end_time = time.localtime() send_mail( smtp_login, mail, "%s completed successfully at %s." % (mail_subject, format_time(end_time)), debug_level=debug_level, ) except: if mail: log('Sending report to "%s"' % mail) traceback_ = "\n".join(apply(traceback.format_exception, sys.exc_info())) end_time = time.localtime() send_mail( smtp_login, mail, "%s failed at %s." % (mail_subject, format_time(end_time)), traceback_, debug_level ) raise