diff options
| author | Ajax <commial@gmail.com> | 2015-11-16 11:04:51 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-16 11:25:39 +0100 |
| commit | a014d17db74a0de84efbf7a8a21ea58739dbb39d (patch) | |
| tree | 3939330b05e2712508cd8c77391300dc6d813386 /test/test_all.py | |
| parent | 8a856751eedac2d6d6ca8ceaec285ad0cf873478 (diff) | |
| download | miasm-a014d17db74a0de84efbf7a8a21ea58739dbb39d.tar.gz miasm-a014d17db74a0de84efbf7a8a21ea58739dbb39d.zip | |
Test/QEMU: test the python jitter too
Diffstat (limited to 'test/test_all.py')
| -rw-r--r-- | test/test_all.py | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/test/test_all.py b/test/test_all.py index 95c880e3..4dff7ed7 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -60,28 +60,61 @@ class QEMUTest(RegressionTest): SAMPLE_NAME = "test-i386" EXPECTED_PATH = "expected" - def __init__(self, name, *args, **kwargs): + def __init__(self, name, jitter, *args, **kwargs): super(QEMUTest, self).__init__([self.SCRIPT_NAME], *args, **kwargs) self.base_dir = os.path.join(self.base_dir, "arch", "x86", "qemu") test_name = "test_%s" % name expected_output = os.path.join(self.EXPECTED_PATH, test_name) + ".exp" self.command_line += [self.SAMPLE_NAME, - test_name, - expected_output, + test_name, + expected_output, + "--jitter", + jitter, ] -for test_name in ( - # Operations - "btr", "bts", "bt", "shrd", "shld", "rcl", "rcr", "ror", - "rol", "sar", "shr", "shl", "not", "neg", "dec", "inc", - "sbb", "adc", "cmp", "or", "and", "xor", "sub", "add", - # Specifics - "bsx", "mul", "lea", "conv" - # Unsupported - # "jcc", "loop", "floats", "bcd", "xchg", "string", "misc", - # "segs", "code16", "exceptions", "self_modifying_code", "single_step", -): - testset += QEMUTest(test_name) +# Test name -> supported jitter engines +QEMU_TESTS = { + # Operations + "btr": ("tcc", "python"), + "bts": ("tcc", "python"), + "bt": ("tcc", "python"), + "shrd": ("tcc", "python"), + "shld": ("tcc", "python"), + "rcl": ("tcc", "python"), + "rcr": ("tcc", "python"), + "ror": ("tcc", "python"), + "rol": ("tcc", "python"), + "sar": ("tcc", "python"), + "shr": ("tcc", "python"), + "shl": ("tcc", "python"), + "not": ("tcc", "python"), + "neg": ("tcc", "python"), + "dec": ("tcc", "python"), + "inc": ("tcc", "python"), + "sbb": ("tcc", "python"), + "adc": ("tcc", "python"), + "cmp": ("tcc", "python"), + "or": ("tcc", "python"), + "and": ("tcc", "python"), + "xor": ("tcc", "python"), + "sub": ("tcc", "python"), + "add": ("tcc", "python"), + # Specifics + "bsx": ("tcc", "python"), + "mul": ("tcc", "python"), + "jcc": ("tcc", "python"), + "loop": ("tcc", "python"), + "lea": ("tcc", "python"), + "conv": ("tcc", "python"), + # Unsupported + # "floats", "bcd", "xchg", "string", "misc", "segs", "code16", "exceptions", + # "self_modifying_code", "single_step" +} + + +for test_name, jitters in QEMU_TESTS.iteritems(): + for jitter_engine in jitters: + testset += QEMUTest(test_name, jitter_engine) ## Semantic |