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
(parent:
9297ada
)
engine: implement override_expected_value()
author
Alexander Popov
<alex.popov@linux.com>
Sat, 22 Apr 2023 22:23:38 +0000
(
01:23
+0300)
committer
Alexander Popov
<alex.popov@linux.com>
Sat, 22 Apr 2023 22:23:38 +0000
(
01:23
+0300)
kconfig_hardened_check/engine.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/engine.py
b/kconfig_hardened_check/engine.py
index e88781e5cfbf19f9c5ecd274bfa7a7e2d2d8171c..67912857e479792a2420133bb71ceb6df2ad7668 100644
(file)
--- a/
kconfig_hardened_check/engine.py
+++ b/
kconfig_hardened_check/engine.py
@@
-283,6
+283,14
@@
def populate_with_data(checklist, data, data_type):
populate_opt_with_data(opt, data, data_type)
+def override_expected_value(checklist, name, new_val):
+ for opt in checklist:
+ if opt.name == name:
+ assert(opt.type in ('kconfig', 'cmdline')), \
+ f'overriding an expected value for "{opt.type}" checks is not supported yet'
+ opt.expected = new_val
+
+
def perform_checks(checklist):
for opt in checklist:
opt.check()