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:
466b9a8
)
Add 'type' for PresenceCheck and VersionCheck
author
Alexander Popov
<alex.popov@linux.com>
Mon, 14 Feb 2022 18:23:58 +0000
(21:23 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Mon, 14 Feb 2022 22:03:06 +0000
(
01:03
+0300)
kconfig_hardened_check/__init__.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/__init__.py
b/kconfig_hardened_check/__init__.py
index 1e3b94d8c024196b6ce21425b69c53508284be93..02d02818d893fc082309f141ec2a6e1ea3374739 100644
(file)
--- a/
kconfig_hardened_check/__init__.py
+++ b/
kconfig_hardened_check/__init__.py
@@
-128,6
+128,10
@@
class VersionCheck:
self.ver = ()
self.result = None
+ @property
+ def type(self):
+ return 'version'
+
def check(self):
if self.ver[0] > self.ver_expected[0]:
self.result = 'OK: version >= ' + str(self.ver_expected[0]) + '.' + str(self.ver_expected[1])
@@
-150,7
+154,8
@@
class VersionCheck:
class PresenceCheck:
def __init__(self, name, type):
- if type == 'kconfig':
+ self.type = type
+ if self.type == 'kconfig':
self.name = 'CONFIG_' + name
else:
self.name = name