summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2023-12-22 07:30:49 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2023-12-22 07:30:49 +0100
commitd2a80e3ab4115c03670bd4dcb50538749309fa3b (patch)
tree01078469497857cbf113502cdc441048674575aa
parent878347e4b777481038e7d58b7251fde11858f358 (diff)
analyze-archive, analyze-kconfig: add --export-json-unparam support
-rwxr-xr-xbin/analyze-archive.py3
-rwxr-xr-xbin/analyze-kconfig.py3
-rw-r--r--lib/cli.py1
3 files changed, 7 insertions, 0 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index 684108a..30b96cc 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -448,6 +448,9 @@ if __name__ == "__main__":
if args.export_pgf_unparam:
dfatool.cli.export_pgf_unparam(model, args.export_pgf_unparam)
+ if args.export_json_unparam:
+ dfatool.cli.export_json_unparam(model, args.export_json_unparam)
+
if args.cross_validate:
xv_method, xv_count = args.cross_validate.split(":")
xv_count = int(xv_count)
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index a1a8e6a..ec673e8 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -374,6 +374,9 @@ def main():
if args.export_pgf_unparam:
dfatool.cli.export_pgf_unparam(model, args.export_pgf_unparam)
+ if args.export_json_unparam:
+ dfatool.cli.export_json_unparam(model, args.export_json_unparam)
+
if args.boxplot_unparam:
title = None
if args.filter_param:
diff --git a/lib/cli.py b/lib/cli.py
index 462e988..41bbe6a 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -266,6 +266,7 @@ def export_json_unparam(model, filename):
}
with open(filename, "w") as f:
json.dump(ret, f, cls=NpEncoder)
+ logger.info(f"JSON unparam data saved to {filename}")
def add_standard_arguments(parser):