]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
teuthology-ls: show reasons for failures with -v
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 3 Oct 2011 23:32:42 +0000 (16:32 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 4 Oct 2011 00:07:41 +0000 (17:07 -0700)
teuthology/suite.py

index 364704f0b277baf12e59abbefa0b4b922673428c..1ff9e33367ffdc59c5d12ea22b395f31e49629a6 100644 (file)
@@ -159,6 +159,11 @@ def ls():
         help='path under which to archive results',
         required=True,
         )
+    parser.add_argument(
+        '-v', '--verbose',
+        action='store_true', default=False,
+        help='show reasons tests failed',
+        )
     args = parser.parse_args()
 
     for j in sorted(os.listdir(args.archive_dir)):
@@ -184,6 +189,8 @@ def ls():
             desc=summary.get('description', '-'),
             success='pass' if summary['success'] else 'FAIL',
             )
+        if args.verbose and 'failure_reason' in summary:
+            print '    {reason}'.format(reason=summary['failure_reason'])
 
 def results():
     parser = argparse.ArgumentParser(description='Email teuthology suite results')