remove engine debug output 155/head
authorWillenst <willenst@gmail.com>
Tue, 27 Aug 2024 11:32:03 +0000 (13:32 +0200)
committerWillenst <willenst@gmail.com>
Tue, 27 Aug 2024 13:40:37 +0000 (15:40 +0200)
remove unused libs

Remove engine debug output

kernel_hardening_checker/test_engine.py

index a25a364bfa0bf3903d8452bd5c205e37fb1ee5c3..10cc2e7958f7f180d68af53c7a580d4f6be20d6f 100755 (executable)
@@ -15,8 +15,6 @@ import unittest
 from unittest import mock
 import io
 import sys
-import json
-import inspect
 from typing import Union, Optional, List, Dict, Tuple
 from .engine import StrOrBool, ChecklistObjType, KconfigCheck, CmdlineCheck, SysctlCheck, VersionCheck, OR, AND
 from .engine import populate_with_data, perform_checks, override_expected_value, print_unknown_options, colorize_result
@@ -80,21 +78,6 @@ class TestEngine(unittest.TestCase):
         # now everything is ready, perform the checks
         perform_checks(checklist)
 
-        # print the table with the results
-        print(f'\n{inspect.stack()[1].function}():')
-        print('=' * 121)
-        for opt in checklist:
-            opt.table_print('verbose', True) # verbose mode, with_results
-            print()
-            print('=' * 121)
-
-        # print the results in JSON
-        result = []
-        for opt in checklist:
-            result.append(opt.json_dump(True)) # with_results
-        print(json.dumps(result))
-        print()
-
     @staticmethod
     def get_engine_result(checklist: List[ChecklistObjType], result: ResultType, result_type: str) -> None:
         assert(result_type in ('json', 'stdout', 'stdout_verbose')), \