summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-05-19 16:20:21 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-05-19 16:20:21 +0200
commit2f462bab0385e809acbb6d22d5f65dddcbfffcfa (patch)
treee1f1e2da253f09d863d4dc8ae68165a5fa4e89c1
parent04fe14fde4a6c563fa72b29d6ed4380115334904 (diff)
analyze-kconfig: add --boolean-parameters option for enum to bool conversion
-rwxr-xr-xbin/analyze-kconfig.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index 8aa8c93..9c3d814 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -30,6 +30,11 @@ def main():
)
dfatool.cli.add_standard_arguments(parser)
parser.add_argument(
+ "--boolean-parameters",
+ action="store_true",
+ help="Use boolean (not categorial) parameters when building the NFP model",
+ )
+ parser.add_argument(
"--show-failing-symbols",
action="store_true",
help="Show Kconfig symbols related to build failures. Must be used with an experiment result directory.",
@@ -168,6 +173,9 @@ def main():
with lzma.open(args.model, "rt") as f:
observations = json.load(f)
+ if args.boolean_parameters:
+ dfatool.utils.observations_enum_to_bool(observations, kconfig=True)
+
by_name, parameter_names = dfatool.utils.observations_to_by_name(observations)
# Release memory