def disassemble_example(self, config): path = Path(config["path"]) / config["name"] binary = config.get("binary", config["name"]) args = { "extra_compile_flags": config["build"]["flags"], "extra_reassemble_flags": config["reassemble"]["flags"], "extra_link_flags": config.get("link", {}).get("flags", []), "linker": config.get("link", {}).get("linker"), "reassembly_compiler": config["reassemble"]["compiler"], "c_compilers": config["build"]["c"], "cxx_compilers": config["build"]["cpp"], "optimizations": config["build"]["optimizations"], "strip_exe": config["test"]["strip_exe"], "strip": config["test"].get("strip", False), "sstrip": config["test"].get("sstrip", False), "skip_test": config["test"].get("skip", False), "check_cfg": config["test"].get("check_cfg", False), "exec_wrapper": config["test"].get("wrapper"), "arch": config.get("arch"), "extra_ddisasm_args": config.get("disassemble", {}).get("args", []), } if config["reassemble"].get("skip", False): args["reassemble_function"] = skip_reassemble self.assertTrue(drt(path, binary, **args))
def test_1(self): self.assertTrue( drt( "examples/ex1", "ex", skip_test=True, reassemble_function=skip_reassemble, optimizations=[], ))