Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
5412568c
Commit
5412568c
authored
Sep 17, 2023
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_engine: improve the output
parent
8e779471
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
test_engine.py
kconfig_hardened_check/test_engine.py
+3
-2
No files found.
kconfig_hardened_check/test_engine.py
View file @
5412568c
...
@@ -15,6 +15,7 @@ import io
...
@@ -15,6 +15,7 @@ import io
import
sys
import
sys
from
collections
import
OrderedDict
from
collections
import
OrderedDict
import
json
import
json
import
inspect
from
.engine
import
KconfigCheck
,
CmdlineCheck
,
SysctlCheck
,
VersionCheck
,
OR
,
AND
,
populate_with_data
,
perform_checks
,
override_expected_value
from
.engine
import
KconfigCheck
,
CmdlineCheck
,
SysctlCheck
,
VersionCheck
,
OR
,
AND
,
populate_with_data
,
perform_checks
,
override_expected_value
...
@@ -68,14 +69,14 @@ class TestEngine(unittest.TestCase):
...
@@ -68,14 +69,14 @@ class TestEngine(unittest.TestCase):
perform_checks
(
checklist
)
perform_checks
(
checklist
)
# print the table with the results
# print the table with the results
print
(
'TABLE:'
)
print
(
f
'
\n
{inspect.stack()[1].function}():'
)
print
(
'='
*
121
)
for
opt
in
checklist
:
for
opt
in
checklist
:
opt
.
table_print
(
'verbose'
,
True
)
# verbose mode, with_results
opt
.
table_print
(
'verbose'
,
True
)
# verbose mode, with_results
print
()
print
()
print
(
'='
*
121
)
print
(
'='
*
121
)
# print the results in JSON
# print the results in JSON
print
(
'JSON:'
)
result
=
[]
result
=
[]
for
opt
in
checklist
:
for
opt
in
checklist
:
result
.
append
(
opt
.
json_dump
(
True
))
# with_results
result
.
append
(
opt
.
json_dump
(
True
))
# with_results
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment