From 0695f1f4c48d891a5741099f988cd8274d744d1a Mon Sep 17 00:00:00 2001 From: Rot127 Date: Tue, 21 Nov 2023 14:52:01 -0500 Subject: [PATCH] Add RzIL tests. --- Conf.py | 1 + LLVMImporter.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Conf.py b/Conf.py index 1444e95e..4e8fd76a 100644 --- a/Conf.py +++ b/Conf.py @@ -23,6 +23,7 @@ class OutputFile(StrEnum): ANA_TESTS = "/rizin/test/db/analysis/hexagon" ASM_TESTS = "/rizin/test/db/asm/hexagon" + RZIL_TESTS = "/rizin/test/db/rzil/hexagon" ANALYSIS_HEXAGON_C = "/rizin/librz/analysis/p/analysis_hexagon.c" ASM_HEXAGON_C = "/rizin/librz/asm/p/asm_hexagon.c" CC_HEXAGON_32_SDB_TXT = "/rizin/librz/analysis/d/cc-hexagon-32.sdb.txt" diff --git a/LLVMImporter.py b/LLVMImporter.py index 5d53b6e3..bc8347c5 100755 --- a/LLVMImporter.py +++ b/LLVMImporter.py @@ -1072,6 +1072,13 @@ def copy_tests() -> None: with open(path, "w+") as g: set_pos_after_license(g) g.writelines(f.readlines()) + + with open("handwritten/rzil-tests/hexagon") as f: + path = Conf.get_path(OutputFile.RZIL_TESTS) + Conf.check_path(path.absolute()) + with open(path, "w+") as g: + set_pos_after_license(g) + g.writelines(f.readlines()) log("Copied test files to ./rizin/test/db/", LogLevel.DEBUG) # RIZIN SPECIFIC