diff options
| author | Ajax <commial@gmail.com> | 2015-11-16 10:54:12 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-16 11:20:36 +0100 |
| commit | 8a856751eedac2d6d6ca8ceaec285ad0cf873478 (patch) | |
| tree | 00d1493c1b928a7fe2cb94a263c7470a7152bafd /test/test_all.py | |
| parent | 13e21aadf41423596d1e446961092aa779c4b780 (diff) | |
| download | miasm-8a856751eedac2d6d6ca8ceaec285ad0cf873478.tar.gz miasm-8a856751eedac2d6d6ca8ceaec285ad0cf873478.zip | |
Test/TestALL: add QEMU tests
Diffstat (limited to 'test/test_all.py')
| -rw-r--r-- | test/test_all.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/test_all.py b/test/test_all.py index 28da3d5a..95c880e3 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -51,6 +51,38 @@ for script in ["x86/sem.py", ]: testset += RegressionTest([script], base_dir="arch") +### QEMU regression tests +class QEMUTest(RegressionTest): + """Test against QEMU regression tests + An expected output is provided, computed on a x86 host""" + + SCRIPT_NAME = "testqemu.py" + SAMPLE_NAME = "test-i386" + EXPECTED_PATH = "expected" + + def __init__(self, name, *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, + ] + +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) + ## Semantic class SemanticTestAsm(RegressionTest): |