Commit d8aa1269 by Alexander Popov

Prevent populating the checklist with empty data

parent f8fb03be
......@@ -254,6 +254,8 @@ def populate_simple_opt_with_data(opt, data, data_type):
f'invalid opt type "{opt.type}"'
assert(data_type in SIMPLE_OPTION_TYPES), \
f'invalid data type "{data_type}"'
assert(data), \
f'empty data'
if data_type != opt.type:
return
......
......@@ -53,8 +53,11 @@ class TestEngine(unittest.TestCase):
parsed_kconfig_options, parsed_cmdline_options, kernel_version,
result):
# populate the checklist with data
if parsed_kconfig_options:
populate_with_data(checklist, parsed_kconfig_options, 'kconfig')
if parsed_cmdline_options:
populate_with_data(checklist, parsed_cmdline_options, 'cmdline')
if kernel_version:
populate_with_data(checklist, kernel_version, 'version')
# now everything is ready, perform the checks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment