From db5eb72878032e40e71afe0b592a7eaffd24c7ae Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 11 Jul 2024 10:06:28 -0600 Subject: [PATCH] run: Use job config's archive dir if specified Signed-off-by: Zack Cerza --- teuthology/run.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index e465b6a31..643955d37 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -93,7 +93,7 @@ def fetch_tasks_if_needed(job_config): return suite_path -def setup_config(config_paths): +def setup_config(config_paths) -> dict: """ Takes a list of config yaml files and combines them into a single dictionary. Processes / validates the dictionary and then @@ -326,8 +326,6 @@ def main(args): os_version = args["--os-version"] interactive_on_error = args["--interactive-on-error"] - set_up_logging(verbose, archive) - # print the command being ran log.debug("Teuthology command: {0}".format(get_teuthology_command(args))) @@ -338,6 +336,10 @@ def main(args): if archive is not None and 'archive_path' not in config: config['archive_path'] = archive + elif archive is None and 'archive_path' in config: + archive = args['--archive'] = config['archive_path'] + + set_up_logging(verbose, archive) write_initial_metadata(archive, config, name, description, owner) report.try_push_job_info(config, dict(status='running')) @@ -400,7 +402,7 @@ def main(args): # FIXME this should become more generic, and the keys should use # '_' uniformly if fake_ctx.config.get('interactive-on-error'): - teuthology.config.config.ctx = fake_ctx + teuth_config.config.ctx = fake_ctx try: run_tasks(tasks=config['tasks'], ctx=fake_ctx) -- 2.47.3