From: Alexander Popov Date: Thu, 22 Oct 2020 16:59:00 +0000 (+0300) Subject: Improve AND check reports X-Git-Tag: v0.5.9~9 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=1a789f4bc5276dfc41bedd60056f1c10c2adaab7;hp=45bb1e8f0e193715e0b0072929f063b765b78287;p=kconfig-hardened-check.git Improve AND check reports --- diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 3e6e609..f82c07c 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -225,9 +225,11 @@ class AND(ComplexOptCheck): if not ret: # This FAIL is caused by additional checks, # and not by the main option that this AND-check is about. - if opt.result.startswith('FAIL: \"'): - # Describe the reason of the FAIL. + # Describe the reason of the FAIL. + if opt.result.startswith('FAIL: \"') or opt.result == 'FAIL: not found': self.result = 'FAIL: CONFIG_{} not "{}"'.format(opt.name, opt.expected) + elif opt.result == 'FAIL: not present': + self.result = 'FAIL: CONFIG_{} not present'.format(opt.name) else: # This FAIL message is self-explaining. self.result = opt.result