]> xenbits.xensource.com Git - people/aperard/xtf.git/commitdiff
xtf-runner: Support multiple quiet settings
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 Nov 2019 15:29:45 +0000 (15:29 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 Nov 2019 15:29:45 +0000 (15:29 +0000)
Particularly useful for './xtf-runner -aqq' for "run all tests" and trying to
spot problems amongst the output.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xtf-runner

index 518a70a279e752457c58a5fbe158209d017c7fac..2a8df0c24acc5bd0b8f3137a814a4aceb10cb515 100755 (executable)
@@ -572,6 +572,10 @@ def run_tests(opts):
     print("Combined test results:")
 
     for test, res in zip(tests, results):
+
+        if res == "SUCCESS" and opts.quiet >= 2:
+            continue
+
         print("{0:<40} {1}".format(str(test), res))
 
     return exit_code(all_results[rc])
@@ -706,9 +710,11 @@ def main():
                       help = ('Specify the log file name pattern, '
                               'defaults to "guest-%s.log"'),
                       )
-    parser.add_option("-q", "--quiet", action = "store_true",
+    parser.add_option("-q", "--quiet", action = "count",
                       dest = "quiet",
-                      help = "Print only test results, without console output",
+                      help = ("Progressively make the output less verbose.  "
+                              "1) No console logs, only test results.  "
+                              "2) Not even SUCCESS results."),
                       )
 
     opts, args = parser.parse_args()