]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add ability to mark jobs as 'dead'
authorZack Cerza <zack@cerza.org>
Fri, 20 Dec 2013 15:52:12 +0000 (09:52 -0600)
committerZack Cerza <zack@cerza.org>
Fri, 20 Dec 2013 16:01:03 +0000 (10:01 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
scripts/report.py
teuthology/report.py

index c649c4d6d89fbd44fc3f4610bf2141e6cab3db56..3540df8b3632f1eeab313bce3022aef6bef759c9 100644 (file)
@@ -6,7 +6,7 @@ doc = """
 usage:
     teuthology-report -h
     teuthology-report [-v] [-R] [-n] [-s SERVER] [-a ARCHIVE] -r RUN ...
-    teuthology-report [-v] [-R] [-n] [-s SERVER] [-a ARCHIVE] -r RUN -j JOB ...
+    teuthology-report [-v] [-s SERVER] [-a ARCHIVE] [-D] -r RUN -j JOB ...
     teuthology-report [-v] [-R] [-n] [-s SERVER] [-a ARCHIVE] --all-runs
 
 Submit test results to a web service
@@ -31,6 +31,7 @@ optional arguments:
                         last successful submission in a file called
                         'last_successful_run'. Pass this flag to disable that
                         behavior.
+  -D, --dead            Mark all given jobs with status 'dead'
   -v, --verbose         be more verbose
 """.format(archive_base=teuthology.config.config.archive_base)
 
index d06380ac9b1590c7ec7f78e83c6c0e194c4da0c4..29970633b2a406bf4f6af95df227306ff9d8e91a 100644 (file)
@@ -24,7 +24,11 @@ def main(args):
                                save=save, refresh=args['--refresh'])
     run = args['--run']
     job = args['--job']
-    if len(run) == 1 and job:
+    dead = args['--dead']
+    if dead and len(run) == 1 and job:
+        for job_id in job:
+            try_push_job_info(dict(name=run[0], job_id=job_id, status='dead'))
+    elif len(run) == 1 and job:
         reporter.report_jobs(run[0], job)
     elif run and len(run) > 1:
         reporter.report_runs(run)