From f339c1fd91baaff1d727cda1a30b0963423dcb5b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 22 Sep 2012 02:40:19 +0200 Subject: script/autobuild.py: add --log-base option metze Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Sat Sep 22 23:21:59 CEST 2012 on sn-devel-104 --- script/autobuild.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'script') diff --git a/script/autobuild.py b/script/autobuild.py index ec1868ad47..9fdea3b1a6 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -487,6 +487,8 @@ parser.add_option("", "--daemon", help="daemonize after initial setup", action="store_true") parser.add_option("", "--branch", help="the branch to work on (default=master)", default="master", type='str') +parser.add_option("", "--log-base", help="location where the logs can be found (default=cwd)", + default=None, type='str') def email_failure(status, failed_task, failed_stage, failed_tag, errstr, log_base=None): '''send an email to options.email about the failure''' @@ -622,7 +624,8 @@ while True: cleanup_list.append(gitroot + "/autobuild.pid") cleanup() email_failure(-1, 'rebase', 'rebase', 'rebase', - 'rebase on %s failed' % options.branch) + 'rebase on %s failed' % options.branch, + log_base=options.log_base) sys.exit(1) blist = buildlist(tasks, args, rebase_url, rebase_branch=options.branch) if options.tail: @@ -655,7 +658,7 @@ if status == 0: blist.tarlogs("logs.tar.gz") print("Logs in logs.tar.gz") if options.always_email: - email_success() + email_success(log_base=options.log_base) blist.remove_logs() cleanup() print(errstr) @@ -665,7 +668,7 @@ if status == 0: blist.tarlogs("logs.tar.gz") if options.email is not None: - email_failure(status, failed_task, failed_stage, failed_tag, errstr) + email_failure(status, failed_task, failed_stage, failed_tag, errstr, log_base=options.log_base) cleanup() print(errstr) -- cgit