From 2204f46b0b488967184c3add50d3fe28f131bf18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 30 Jul 2021 19:59:20 +0200 Subject: Remove expected/ The intention was to catch functional regressions in non-matching functions but this doesn't actually work well because referenced code and data may have moved after a function was dumped, in which case the reference checker is unable to verify that function calls and data references are still correct. Considering this increases the amount of complexity in the checker and makes the workflow more complicated for contributors, let's just drop this mechanism. It isn't worth it. Putting binary files in the repo is also pretty meh. --- tools/dump_function.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 tools/dump_function.py (limited to 'tools/dump_function.py') diff --git a/tools/dump_function.py b/tools/dump_function.py deleted file mode 100755 index f95f3b7a..00000000 --- a/tools/dump_function.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python3 - -import argparse - -import util.elf -from util import utils - - -def dump_fn(name: str) -> None: - expected_dir = utils.get_repo_root() / "expected" - try: - fn = util.elf.get_fn_from_my_elf(name) - path = expected_dir / f"{name}.bin" - path.parent.mkdir(exist_ok=True) - path.write_bytes(fn.data) - except KeyError: - utils.fail("could not find function") - - -def main() -> None: - parser = argparse.ArgumentParser() - parser.add_argument("function_name", help="Name of the function to dump") - args = parser.parse_args() - - dump_fn(args.function_name) - - -if __name__ == "__main__": - main() -- cgit v1.2.3