From: Zack Cerza Date: Thu, 3 Jul 2014 00:39:47 +0000 (-0600) Subject: Allow setting results_email in teuthology.yaml X-Git-Tag: v0.94.10~27^2^2~364^2~61 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dbadcd0d56baedb498250f45027c482fa2cc2847;p=ceph.git Allow setting results_email in teuthology.yaml (Instead of passing --email to teuthology-suite) Signed-off-by: Zack Cerza --- diff --git a/scripts/suite.py b/scripts/suite.py index 5646363247e9..842416a619b9 100644 --- a/scripts/suite.py +++ b/scripts/suite.py @@ -50,7 +50,9 @@ Standard arguments: Scheduler arguments: --owner Job owner -e , --email - When tests finish or time out, send an email here + When tests finish or time out, send an email + here. May also be specified in ~/.teuthology.yaml + as 'results_email' -N , --num Number of times to run/queue the job [default: 1] -l , --limit Queue at most this many jobs diff --git a/teuthology/suite.py b/teuthology/suite.py index 9ce500f85e1e..40782716bef1 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -48,7 +48,6 @@ def main(args): owner = args['--owner'] email = args['--email'] if email: - config.email_specified = True config.results_email = email timeout = args['--timeout'] @@ -75,7 +74,6 @@ def main(args): machine_type=machine_type, suite_repo_path=suite_repo_path, base_yaml_paths=base_yaml_paths, - email=email, priority=priority, limit=limit, num=num, @@ -219,14 +217,15 @@ def create_initial_config(nice_suite, ceph_branch, teuthology_branch, def prepare_and_schedule(owner, name, suite, machine_type, suite_repo_path, - base_yaml_paths, email, priority, limit, num, timeout, + base_yaml_paths, priority, limit, num, timeout, dry_run, verbose): """ Puts together some "base arguments" with which to execute teuthology-schedule for each job, then passes them and other parameters to schedule_suite(). Finally, schedules a "last-in-suite" job that sends an - email to the specified address (if one is specified). + email to the specified address (if one is configured). """ + email = config.results_email arch = get_arch(machine_type) base_args = [ @@ -258,8 +257,7 @@ def prepare_and_schedule(owner, name, suite, machine_type, suite_repo_path, if email and num_jobs: arg = copy.deepcopy(base_args) arg.append('--last-in-suite') - if email: - arg.extend(['--email', email]) + arg.extend(['--email', email]) if timeout: arg.extend(['--timeout', timeout]) if dry_run: