summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-02-18 16:15:00 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2022-02-18 16:15:00 +0100
commit32213cdb49a08bd0f2012baaefb031d0726dc4bf (patch)
tree4be470e660b0ce66de4a12b503a2e102f0f5789f /bin
parent05ef7cf244c84be698cdf83c5e18104d4ed5dc70 (diff)
move dataref export to cli.py
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-archive.py10
-rwxr-xr-xbin/analyze-kconfig.py10
2 files changed, 2 insertions, 18 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index f48afd8..7fb5719 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -1036,15 +1036,7 @@ if __name__ == "__main__":
)
dref["constructor duration"] = (constructor_duration, r"\second")
dref["regression duration"] = (fit_duration, r"\second")
- with open(args.export_dref, "w") as f:
- for k, v in sorted(dref.items()):
- if type(v) is not tuple:
- v = (v, None)
- if v[1] is None:
- prefix = r"\drefset{"
- else:
- prefix = r"\drefset" + f"[unit={v[1]}]" + "{"
- print(f"{prefix}/{k}" + "}{" + str(v[0]) + "}", file=f)
+ dfatool.cli.export_dataref(args.export_dref, dref)
if args.export_webconf:
if not pta:
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index e8b946a..db6cf40 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -330,15 +330,7 @@ def main():
)
dref["constructor duration"] = (constructor_duration, r"\second")
dref["regression duration"] = (fit_duration, r"\second")
- with open(args.export_dref, "w") as f:
- for k, v in sorted(dref.items()):
- if type(v) is not tuple:
- v = (v, None)
- if v[1] is None:
- prefix = r"\drefset{"
- else:
- prefix = r"\drefset" + f"[unit={v[1]}]" + "{"
- print(f"{prefix}/{k}" + "}{" + str(v[0]) + "}", file=f)
+ dfatool.cli.export_dataref(args.export_dref, dref)
if args.config:
kconf = kconfiglib.Kconfig(args.kconfig_path)