From 1a789f4bc5276dfc41bedd60056f1c10c2adaab7 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Thu, 22 Oct 2020 19:59:00 +0300 Subject: [PATCH] Improve AND check reports --- kconfig_hardened_check/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.31.1