]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/suite: log correct per-job description 388/head
authorDan Mick <dan.mick@redhat.com>
Tue, 9 Dec 2014 23:43:34 +0000 (15:43 -0800)
committerDan Mick <dan.mick@redhat.com>
Tue, 9 Dec 2014 23:46:39 +0000 (15:46 -0800)
Add 'description' to the items tracked in 'jobs_to_schedule'.
Make it a dict for somewhat clearer item extraction in the actual
scheduling loop.

Also fix an unrelated pep8 formatting error.

Fixes: #10283
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/suite.py

index 0ccb861514cf61a076366b325c64dacccb0e1982..27ed5129138df739ec5dcbcb5e7f3b2e68147687 100644 (file)
@@ -279,7 +279,7 @@ def prepare_and_schedule(job_config, suite_repo_path, base_yaml_paths, limit,
         dry_run=dry_run,
         filter_in=filter_in,
         filter_out=filter_out,
-        )
+    )
 
     if job_config.email and num_jobs:
         arg = copy.deepcopy(base_args)
@@ -535,19 +535,19 @@ def schedule_suite(job_config,
         arg.extend(base_yamls)
         arg.extend(fragment_paths)
 
-        jobs_to_schedule.append((parsed_yaml, arg))
+        jobs_to_schedule.append({'yaml': parsed_yaml, 'desc': description,
+                                'args': arg})
 
-    for job_tuple in jobs_to_schedule:
-        arg = job_tuple[1]
+    for job in jobs_to_schedule:
         log.info(
-            'Scheduling %s', description
+            'Scheduling %s', job['desc']
         )
 
         if dry_run:
             # Quote any individual args so that individual commands can be
             # copied and pasted in order to execute them individually.
             printable_args = []
-            for item in arg:
+            for item in job['args']:
                 if ' ' in item:
                     printable_args.append("'%s'" % item)
                 else:
@@ -555,7 +555,7 @@ def schedule_suite(job_config,
             log.info('dry-run: %s' % ' '.join(printable_args))
         else:
             subprocess.check_call(
-                args=arg,
+                args=job['args'],
             )
 
     count = len(jobs_to_schedule)