diff options
Diffstat (limited to '')
| -rw-r--r-- | example/jitter/arm.py (renamed from example/jit_arm.py) | 0 | ||||
| -rw-r--r-- | example/jitter/arm_sc.py (renamed from example/jit_arm_sc.py) | 0 | ||||
| -rw-r--r-- | example/jitter/mips32.py (renamed from example/jit_mips32.py) | 0 | ||||
| -rw-r--r-- | example/jitter/msp430.py (renamed from example/jit_msp430.py) | 0 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_32.py (renamed from example/sandbox_pe_x86_32.py) | 0 | ||||
| -rw-r--r-- | example/jitter/unpack_upx.py (renamed from example/unpack_upx.py) | 0 | ||||
| -rw-r--r-- | example/jitter/x86_32.py (renamed from example/jit_x86_32.py) | 0 | ||||
| -rw-r--r-- | test/test_all.py | 47 |
8 files changed, 26 insertions, 21 deletions
diff --git a/example/jit_arm.py b/example/jitter/arm.py index 5342ee6d..5342ee6d 100644 --- a/example/jit_arm.py +++ b/example/jitter/arm.py diff --git a/example/jit_arm_sc.py b/example/jitter/arm_sc.py index 80714641..80714641 100644 --- a/example/jit_arm_sc.py +++ b/example/jitter/arm_sc.py diff --git a/example/jit_mips32.py b/example/jitter/mips32.py index e41096cc..e41096cc 100644 --- a/example/jit_mips32.py +++ b/example/jitter/mips32.py diff --git a/example/jit_msp430.py b/example/jitter/msp430.py index d752ef8c..d752ef8c 100644 --- a/example/jit_msp430.py +++ b/example/jitter/msp430.py diff --git a/example/sandbox_pe_x86_32.py b/example/jitter/sandbox_pe_x86_32.py index 738e0778..738e0778 100644 --- a/example/sandbox_pe_x86_32.py +++ b/example/jitter/sandbox_pe_x86_32.py diff --git a/example/unpack_upx.py b/example/jitter/unpack_upx.py index 313f75a2..313f75a2 100644 --- a/example/unpack_upx.py +++ b/example/jitter/unpack_upx.py diff --git a/example/jit_x86_32.py b/example/jitter/x86_32.py index 1b2aa012..1b2aa012 100644 --- a/example/jit_x86_32.py +++ b/example/jitter/x86_32.py diff --git a/test/test_all.py b/test/test_all.py index 1a80cf46..55eead73 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -199,38 +199,43 @@ for script in [["basic_op.py"], testset += Example(["symbol_exec/single_instr.py"]) ## Jitter -for jitter in ["tcc", "llvm", "python"]: +class ExampleJitter(ExampleDir): + """Jitter examples specificities: + - script path begins with "jitter/" + """ + example_dir = "jitter" + jitter_engines = ["tcc", "llvm", "python"] + +for jitter in ExampleJitter.jitter_engines: # Take 5 min on a Core i5 tags = {"python": [TAGS["long"]], "llvm": [TAGS["llvm"]], } - testset += Example(["unpack_upx.py", Example.get_sample("box_upx.exe")] + - ["--jitter", jitter], - products=[Example.get_sample("box_upx_exe_unupx.bin")], - tags=tags.get(jitter, [])) - -for script, dep in [(["jit_x86_32.py", - Example.get_sample("x86_32_sc.bin")], []), - (["jit_arm.py", Example.get_sample("md5_arm"), "-a", - "A684"], []), - (["jit_msp430.py", "msp430_sc.bin", "0"], - [test_msp430]), - (["jit_mips32.py", "mips32_sc_l.bin", "0"], - [test_mips32]), - (["jit_arm_sc.py", "0", "demo_arm_b.bin", "b", "-a", - "0"], [test_arm]), - (["jit_arm_sc.py", "0", "demo_arm_l.bin", "l", "-a", - "0"], [test_arm]), + testset += ExampleJitter(["unpack_upx.py", + Example.get_sample("box_upx.exe")] + + ["--jitter", jitter], + products=[Example.get_sample("box_upx_exe_unupx.bin")], + tags=tags.get(jitter, [])) + +for script, dep in [(["x86_32.py", Example.get_sample("x86_32_sc.bin")], []), + (["arm.py", Example.get_sample("md5_arm"), "-a", "A684"], + []), + (["msp430.py", "msp430_sc.bin", "0"], [test_msp430]), + (["mips32.py", "mips32_sc_l.bin", "0"], [test_mips32]), + (["arm_sc.py", "0", "demo_arm_b.bin", "b", "-a", "0"], + [test_arm]), + (["arm_sc.py", "0", "demo_arm_l.bin", "l", "-a", "0"], + [test_arm]), (["sandbox_pe_x86_32.py", "box_x86_32_enc.bin"], [test_box_enc]), ] + [(["sandbox_pe_x86_32.py", Example.get_sample("x86_32_" + name + ".bin")], [test_box[name]]) for name in test_box_names]: - for jitter in ["tcc", "llvm", "python"]: + for jitter in ExampleJitter.jitter_engines: tags = [TAGS["llvm"]] if jitter == "llvm" else [] - testset += Example(script + ["--jitter", jitter], - depends=dep, tags=tags) + testset += ExampleJitter(script + ["--jitter", jitter], depends=dep, + tags=tags) if __name__ == "__main__": |