projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d58e674
)
test_engine: test the non-verbose output mode
author
Alexander Popov
<alex.popov@linux.com>
Sun, 2 Apr 2023 09:39:49 +0000
(12:39 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Sun, 2 Apr 2023 09:39:49 +0000
(12:39 +0300)
kconfig_hardened_check/test_engine.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/test_engine.py
b/kconfig_hardened_check/test_engine.py
index 0b3fca945cc108d5fa045d23390f0a666e6a8e3d..acb47b2544269bb20a36098b28ef7b8969df4279 100644
(file)
--- 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"]]
)
["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'),
# 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"]]
)
["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(
stdout_result = []
self.get_engine_result(config_checklist, stdout_result, 'stdout_verbose')
self.assertEqual(