From 080151636129de434b787b8a3133d3f8bdc14d58 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Mon, 13 Mar 2017 09:25:56 +0100 Subject: [PATCH] run.py: Provide --os-{type,version} values to get_initial_tasks We want to be able to check the final values of os_type and os_version in get_initial_tasks, so move the command-line override up to before the get_initial_tasks() method call. Signed-off-by: Nathan Cutler --- teuthology/run.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index 3addee227..5be014d16 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -349,6 +349,13 @@ def main(args): if suite_repo: teuth_config.ceph_qa_suite_git_url = suite_repo + # overwrite the config values of os_{type,version} if corresponding + # command-line arguments are provided + if os_type: + config["os_type"] = os_type + if os_version: + config["os_version"] = os_version + config["tasks"] = validate_tasks(config) init_tasks = get_initial_tasks(lock, config, machine_type) @@ -362,14 +369,6 @@ def main(args): # fetches the tasks and returns a new suite_path if needed config["suite_path"] = fetch_tasks_if_needed(config) - # overwrite the config value of os_type if --os-type is provided - if os_type: - config["os_type"] = os_type - - # overwrite the config value of os_version if --os-version is provided - if os_version: - config["os_version"] = os_version - # If the job has a 'use_shaman' key, use that value to override the global # config's value. if config.get('use_shaman') is not None: -- 2.47.3