From 2082a3b1d5ecb4ce4f2426e8b55251c6e04003cf Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 2 Apr 2023 12:39:49 +0300 Subject: [PATCH] test_engine: test the non-verbose output mode --- kconfig_hardened_check/test_engine.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/kconfig_hardened_check/test_engine.py b/kconfig_hardened_check/test_engine.py index 0b3fca9..acb47b2 100644 --- a/kconfig_hardened_check/test_engine.py +++ b/kconfig_hardened_check/test_engine.py @@ -306,7 +306,7 @@ class TestEngine(unittest.TestCase): ["CONFIG_NAME_4", "kconfig", "expected_4", "decision_4", "reason_4", "OK: version >= 42.43"]] ) - def test_verbose(self): + def test_stdout(self): # 1. prepare the checklist config_checklist = [] config_checklist += [OR(KconfigCheck('reason_1', 'decision_1', 'NAME_1', 'expected_1'), @@ -332,6 +332,17 @@ class TestEngine(unittest.TestCase): ["name_4", "cmdline", "expected_4", "decision_4", "reason_4", "FAIL: is not found"]] ) + stdout_result = [] + self.get_engine_result(config_checklist, stdout_result, 'stdout') + self.assertEqual( + stdout_result, + [ +"\ +CONFIG_NAME_1 |kconfig| expected_1 |decision_1| reason_1 | FAIL: is not found\ +name_4 |cmdline| expected_4 |decision_4| reason_4 | FAIL: is not found\ +" ] + ) + stdout_result = [] self.get_engine_result(config_checklist, stdout_result, 'stdout_verbose') self.assertEqual( -- 2.31.1