From 561f06cf942196cde1a3fcb8866fdef35a9a257c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 5 Jan 2012 17:27:28 -0800 Subject: [PATCH] suite: make email-on-success the default behavior This way you can tell when a run is complete, instead of wondering if it's stuck in the queue. --- teuthology/queue.py | 2 -- teuthology/run.py | 8 -------- teuthology/suite.py | 14 +------------- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/teuthology/queue.py b/teuthology/queue.py index 3467f03147a29..aec52453b84b2 100644 --- a/teuthology/queue.py +++ b/teuthology/queue.py @@ -90,8 +90,6 @@ describe. One job is run at a time. '--name', job_config['name'], ] - if job_config.get('email_on_success', False): - args.append('--email-on-success') subprocess.Popen(args=args) else: log.debug('Creating archive dir...') diff --git a/teuthology/run.py b/teuthology/run.py index 62b2e855f8822..21d21e6dc6f87 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -208,12 +208,6 @@ def schedule(): '--email', help='where to send the results of a suite (only applies to the last job in a suite)', ) - parser.add_argument( - '--email-on-success', - action='store_true', - default=False, - help='email even if all tests pass', - ) parser.add_argument( '--timeout', help='how many seconds to wait for jobs to finish before emailing results (only applies to the last job in a suite', @@ -245,7 +239,6 @@ def schedule(): if not ctx.last_in_suite: assert not ctx.email, '--email is only applicable to the last job in a suite' assert not ctx.timeout, '--timeout is only applicable to the last job in a suite' - assert not ctx.email_on_success, '--email-on-success is only applicable to the last job in a suite' from teuthology.misc import read_config, get_user if ctx.owner is None: @@ -271,7 +264,6 @@ def schedule(): name=ctx.name, last_in_suite=ctx.last_in_suite, email=ctx.email, - email_on_success=ctx.email_on_success, description=ctx.description, owner=ctx.owner, verbose=ctx.verbose, diff --git a/teuthology/suite.py b/teuthology/suite.py index e23acbaa62b67..c9f69d9bdda88 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -55,12 +55,6 @@ combination, and will override anything in the suite. '--email', help='address to email test failures to', ) - parser.add_argument( - '--email-on-success', - action='store_true', - default=False, - help='email even if all tests pass', - ) parser.add_argument( '--timeout', help='how many seconds to wait for jobs to finish before emailing results', @@ -194,12 +188,6 @@ def results(): '--email', help='address to email test failures to', ) - parser.add_argument( - '--email-on-success', - action='store_true', - default=False, - help='email even if all tests pass', - ) parser.add_argument( '--timeout', help='how many seconds to wait for all tests to finish (default no wait)', @@ -299,7 +287,7 @@ def results(): reason=summary['failure_reason'], )) - if not args.email or not (failures or unfinished or args.email_on_success): + if not args.email: return if failures or unfinished: -- 2.39.5