From: Andrew Cooper Date: Fri, 29 Nov 2019 15:29:45 +0000 (+0000) Subject: xtf-runner: Support multiple quiet settings X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ad0b727e1fb14595cfc84b7a3d0b959eb26e7e57;p=people%2Fandrewcoop%2Fxen-test-framework.git xtf-runner: Support multiple quiet settings Particularly useful for './xtf-runner -aqq' for "run all tests" and trying to spot problems amongst the output. Signed-off-by: Andrew Cooper --- diff --git a/xtf-runner b/xtf-runner index 518a70a..2a8df0c 100755 --- a/xtf-runner +++ b/xtf-runner @@ -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()