diff options
| -rw-r--r-- | example/disasm/file.py (renamed from example/disasm_file.py) | 0 | ||||
| -rw-r--r-- | example/disasm/full.py (renamed from example/disasm_full.py) | 0 | ||||
| -rw-r--r-- | example/disasm/function.py (renamed from example/disasm_function.py) | 0 | ||||
| -rw-r--r-- | example/disasm/single_instr.py (renamed from example/disasm_single_instr.py) | 0 | ||||
| -rw-r--r-- | test/test_all.py | 29 |
5 files changed, 21 insertions, 8 deletions
diff --git a/example/disasm_file.py b/example/disasm/file.py index 5bae0e89..5bae0e89 100644 --- a/example/disasm_file.py +++ b/example/disasm/file.py diff --git a/example/disasm_full.py b/example/disasm/full.py index f7ca6780..f7ca6780 100644 --- a/example/disasm_full.py +++ b/example/disasm/full.py diff --git a/example/disasm_function.py b/example/disasm/function.py index 0d443c26..0d443c26 100644 --- a/example/disasm_function.py +++ b/example/disasm/function.py diff --git a/example/disasm_single_instr.py b/example/disasm/single_instr.py index 0e29dcee..0e29dcee 100644 --- a/example/disasm_single_instr.py +++ b/example/disasm/single_instr.py diff --git a/test/test_all.py b/test/test_all.py index 0bd6ccb3..65172a2d 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -134,26 +134,38 @@ testset += test_armt testset += test_box_enc testset += test_msp430 testset += test_mips32 -for script in [["disasm_single_instr.py"], - ["disasm_function.py"], - ["disasm_file.py", Example.get_sample("box_upx.exe"), - "0x410f90"], + + +class ExampleDisassembler(ExampleDir): + """Disassembler examples specificities: + - script path begins with "disasm/" + """ + example_dir = "disasm" + + +for script in [["single_instr.py"], + ["function.py"], + ["file.py", Example.get_sample("box_upx.exe"), "0x410f90"], ]: - testset += Example(script) + testset += ExampleDisassembler(script) + class ExampleDisasmFull(Example): - """TestDis specificities: - - script: disasm_full.py + """DisasmFull specificities: + - script: disasm/full.py - flags: -g -s - @products: graph_execflow.txt, graph_irflow.txt, lines.txt, out.txt """ def __init__(self, *args, **kwargs): super(ExampleDisasmFull, self).__init__(*args, **kwargs) - self.command_line = ["disasm_full.py", "-g", "-s"] + self.command_line + self.command_line = [os.path.join(ExampleDisassembler.example_dir, + "full.py"), + "-g", "-s"] + self.command_line self.products += ["graph_execflow.txt", "graph_irflow.txt", "lines.txt", "out.txt"] + testset += ExampleDisasmFull(["arml", "demo_arm_l.bin", "0"], depends=[test_arm]) testset += ExampleDisasmFull(["armb", "demo_arm_b.bin", "0"], @@ -172,6 +184,7 @@ testset += ExampleDisasmFull(["mips32l", "mips32_sc_l.bin", "0"], testset += ExampleDisasmFull(["mips32b", "mips32_sc_b.bin", "0"], depends=[test_mips32]) + ## Expression class ExampleExpression(ExampleDir): """Expression examples specificities: |