]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
run: Use job config's archive dir if specified
authorZack Cerza <zack@redhat.com>
Thu, 11 Jul 2024 16:06:28 +0000 (10:06 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 11 Jul 2024 22:48:31 +0000 (16:48 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/run.py

index e465b6a31d148291ee35d777764671f4527abb0e..643955d375c979d78baf5c838317a70ffa66d782 100644 (file)
@@ -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)