From 5412568cde29f839e230e7ba260c4f0f74c6e6fb Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 17 Sep 2023 19:42:47 +0300 Subject: [PATCH] test_engine: improve the output --- kconfig_hardened_check/test_engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kconfig_hardened_check/test_engine.py b/kconfig_hardened_check/test_engine.py index 8927cdd..8dcc587 100644 --- a/kconfig_hardened_check/test_engine.py +++ b/kconfig_hardened_check/test_engine.py @@ -15,6 +15,7 @@ import io import sys from collections import OrderedDict import json +import inspect 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): perform_checks(checklist) # print the table with the results - print('TABLE:') + 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 - print('JSON:') result = [] for opt in checklist: result.append(opt.json_dump(True)) # with_results -- 2.31.1