]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite: failed runs might not have durations
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 20 Mar 2012 14:48:45 +0000 (07:48 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 20 Mar 2012 14:50:08 +0000 (07:50 -0700)
This was one cause of emails not being sent - stale /tmp/cephtest dirs
fail without recording a duration.

teuthology/suite.py

index aaaa8cc45b11fb26ee2a4ae65e30a52ffaa5222f..a0d33d60fabea91fa87bcca5e4ce1a6ba3f0387a 100644 (file)
@@ -201,7 +201,7 @@ def ls():
             owner=summary.get('owner', '-'),
             desc=summary.get('description', '-'),
             success='pass' if summary['success'] else 'FAIL',
-            duration=int(summary.get('duration', 0))
+            duration=int(summary.get('duration', 0)),
             )
         if args.verbose and 'failure_reason' in summary:
             print '    {reason}'.format(reason=summary['failure_reason'])
@@ -333,7 +333,7 @@ def _results(args):
             for new in g:
                 summary.update(new)
         desc = '{test}: ({duration}s) {desc}'.format(
-            duration=int(summary['duration']),
+            duration=int(summary.get('duration', 0)),
             desc=summary['description'],
             test=j,
             )