From: Alexander Popov Date: Tue, 12 Mar 2019 14:29:20 +0000 (+0300) Subject: Improve the final result output X-Git-Tag: v0.5.2~36 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=43920b20672cd603f7d5e02544a951eec914636b;p=kconfig-hardened-check.git Improve the final result output Refers to issue #13. --- diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 5ef937c..64f6efb 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -423,13 +423,11 @@ if __name__ == '__main__': construct_checklist(arch) check_config_file(args.config) error_count = len(list(filter(lambda opt: opt.result and opt.result.startswith('FAIL'), checklist))) + ok_count = len(list(filter(lambda opt: opt.result and opt.result.startswith('OK'), checklist))) if debug_mode: sys.exit(0) - if error_count == 0: - print('[+] config check is PASSED') - sys.exit(0) - else: - sys.exit('[-] config check is NOT PASSED: {} errors'.format(error_count)) + print('[+] config check is finished: \'OK\' - {} / \'FAIL\' - {}'.format(ok_count, error_count)) + sys.exit(0) if args.print: arch = args.print