about summary refs log tree commit diff stats
path: root/test/arch/x86/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/arch/x86/unit')
-rw-r--r--test/arch/x86/unit/asm_test.py8
-rw-r--r--test/arch/x86/unit/mn_daa.py4
-rw-r--r--test/arch/x86/unit/mn_das.py4
-rw-r--r--test/arch/x86/unit/mn_float.py4
-rw-r--r--test/arch/x86/unit/mn_int.py8
-rw-r--r--test/arch/x86/unit/mn_pcmpeq.py5
-rw-r--r--test/arch/x86/unit/mn_pextr.py5
-rw-r--r--test/arch/x86/unit/mn_pinsr.py5
-rw-r--r--test/arch/x86/unit/mn_pmaxu.py5
-rw-r--r--test/arch/x86/unit/mn_pminu.py5
-rw-r--r--test/arch/x86/unit/mn_pmovmskb.py5
-rw-r--r--test/arch/x86/unit/mn_pshufb.py5
-rw-r--r--test/arch/x86/unit/mn_psrl_psll.py5
-rw-r--r--test/arch/x86/unit/mn_punpck.py7
-rw-r--r--test/arch/x86/unit/mn_pushpop.py10
-rw-r--r--test/arch/x86/unit/mn_stack.py4
-rw-r--r--test/arch/x86/unit/mn_strings.py4
17 files changed, 58 insertions, 35 deletions
diff --git a/test/arch/x86/unit/asm_test.py b/test/arch/x86/unit/asm_test.py
index 118a57b4..4e1d03b8 100644
--- a/test/arch/x86/unit/asm_test.py
+++ b/test/arch/x86/unit/asm_test.py
@@ -23,8 +23,8 @@ reg_and_id = dict(mn_x86.regs.all_regs_ids_byname)
 class Asm_Test(object):
     run_addr = 0x0
 
-    def __init__(self):
-        self.myjit = Machine(self.arch_name).jitter()
+    def __init__(self, jitter_engine):
+        self.myjit = Machine(self.arch_name).jitter(jitter_engine)
         self.myjit.init_stack()
 
         self.myjit.jit.log_regs = False
@@ -84,8 +84,8 @@ class Asm_Test_16(Asm_Test):
     arch_attrib = 16
     ret_addr = 0x1337
 
-    def __init__(self):
-        self.myjit = Machine(self.arch_name).jitter()
+    def __init__(self, jitter_engine):
+        self.myjit = Machine(self.arch_name).jitter(jitter_engine)
         self.myjit.stack_base = 0x1000
         self.myjit.stack_size = 0x1000
         self.myjit.init_stack()
diff --git a/test/arch/x86/unit/mn_daa.py b/test/arch/x86/unit/mn_daa.py
index 7aadf582..d07bf849 100644
--- a/test/arch/x86/unit/mn_daa.py
+++ b/test/arch/x86/unit/mn_daa.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from asm_test import Asm_Test_32
 
 
@@ -73,4 +75,4 @@ array_al_end:
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_DAA]]
+    [test(*sys.argv[1:])() for test in [Test_DAA]]
diff --git a/test/arch/x86/unit/mn_das.py b/test/arch/x86/unit/mn_das.py
index 0828cafe..2d8102d9 100644
--- a/test/arch/x86/unit/mn_das.py
+++ b/test/arch/x86/unit/mn_das.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from asm_test import Asm_Test_32
 
 
@@ -103,4 +105,4 @@ array_al_end:
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_DAS]]
+    [test(*sys.argv[1:])() for test in [Test_DAS]]
diff --git a/test/arch/x86/unit/mn_float.py b/test/arch/x86/unit/mn_float.py
index 81eb518b..d704de73 100644
--- a/test/arch/x86/unit/mn_float.py
+++ b/test/arch/x86/unit/mn_float.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from asm_test import Asm_Test_32
 
 
@@ -19,4 +21,4 @@ class Test_FADD(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_FADD]]
+    [test(*sys.argv[1:])() for test in [Test_FADD]]
diff --git a/test/arch/x86/unit/mn_int.py b/test/arch/x86/unit/mn_int.py
index 0f4a5717..9d964220 100644
--- a/test/arch/x86/unit/mn_int.py
+++ b/test/arch/x86/unit/mn_int.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from miasm2.jitter.csts import EXCEPT_INT_XX
 from asm_test import Asm_Test_32
 
@@ -15,8 +17,8 @@ class Test_INT(Asm_Test_32):
         jitter.cpu.set_exception(0)
         return True
 
-    def __init__(self):
-        super(Test_INT, self).__init__()
+    def __init__(self, jitter):
+        super(Test_INT, self).__init__(jitter)
         self.int_num = 0
         self.myjit.add_exception_handler(EXCEPT_INT_XX,
                                          self.set_int_num)
@@ -28,4 +30,4 @@ class Test_INT(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_INT]]
+    [test(*sys.argv[1:])() for test in [Test_INT]]
diff --git a/test/arch/x86/unit/mn_pcmpeq.py b/test/arch/x86/unit/mn_pcmpeq.py
index 06815e76..5d0a59c6 100644
--- a/test/arch/x86/unit/mn_pcmpeq.py
+++ b/test/arch/x86/unit/mn_pcmpeq.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PCMPEQB(Asm_Test_32):
     TXT = '''
     main:
@@ -61,4 +62,4 @@ class Test_PCMPEQD(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PCMPEQB, Test_PCMPEQW, Test_PCMPEQD]]
+    [test(*sys.argv[1:])() for test in [Test_PCMPEQB, Test_PCMPEQW, Test_PCMPEQD]]
diff --git a/test/arch/x86/unit/mn_pextr.py b/test/arch/x86/unit/mn_pextr.py
index 0469eed7..696f077b 100644
--- a/test/arch/x86/unit/mn_pextr.py
+++ b/test/arch/x86/unit/mn_pextr.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PEXTRB(Asm_Test_32):
     TXT = '''
     main:
@@ -22,4 +23,4 @@ class Test_PEXTRB(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PEXTRB]]
+    [test(*sys.argv[1:])() for test in [Test_PEXTRB]]
diff --git a/test/arch/x86/unit/mn_pinsr.py b/test/arch/x86/unit/mn_pinsr.py
index a10cd286..74120e5c 100644
--- a/test/arch/x86/unit/mn_pinsr.py
+++ b/test/arch/x86/unit/mn_pinsr.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PINSRB(Asm_Test_32):
     TXT = '''
     main:
@@ -22,4 +23,4 @@ class Test_PINSRB(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PINSRB]]
+    [test(*sys.argv[1:])() for test in [Test_PINSRB]]
diff --git a/test/arch/x86/unit/mn_pmaxu.py b/test/arch/x86/unit/mn_pmaxu.py
index 50cbff94..527b966f 100644
--- a/test/arch/x86/unit/mn_pmaxu.py
+++ b/test/arch/x86/unit/mn_pmaxu.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PMAXU(Asm_Test_32):
     TXT = '''
     main:
@@ -22,4 +23,4 @@ class Test_PMAXU(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PMAXU]]
+    [test(*sys.argv[1:])() for test in [Test_PMAXU]]
diff --git a/test/arch/x86/unit/mn_pminu.py b/test/arch/x86/unit/mn_pminu.py
index 27c9ad1e..d667df4e 100644
--- a/test/arch/x86/unit/mn_pminu.py
+++ b/test/arch/x86/unit/mn_pminu.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PMINU(Asm_Test_32):
     TXT = '''
     main:
@@ -22,4 +23,4 @@ class Test_PMINU(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PMINU]]
+    [test(*sys.argv[1:])() for test in [Test_PMINU]]
diff --git a/test/arch/x86/unit/mn_pmovmskb.py b/test/arch/x86/unit/mn_pmovmskb.py
index 796e977c..b7e7b897 100644
--- a/test/arch/x86/unit/mn_pmovmskb.py
+++ b/test/arch/x86/unit/mn_pmovmskb.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PMOVMSKB(Asm_Test_32):
     TXT = '''
     main:
@@ -23,4 +24,4 @@ class Test_PMOVMSKB(Asm_Test_32):
         assert self.myjit.cpu.EAX == 0x00000015
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PMOVMSKB,]]
+    [test(*sys.argv[1:])() for test in [Test_PMOVMSKB,]]
diff --git a/test/arch/x86/unit/mn_pshufb.py b/test/arch/x86/unit/mn_pshufb.py
index 594b0870..5f4c7370 100644
--- a/test/arch/x86/unit/mn_pshufb.py
+++ b/test/arch/x86/unit/mn_pshufb.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PSHUFB(Asm_Test_32):
     TXT = '''
     main:
@@ -22,4 +23,4 @@ class Test_PSHUFB(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PSHUFB]]
+    [test(*sys.argv[1:])() for test in [Test_PSHUFB]]
diff --git a/test/arch/x86/unit/mn_psrl_psll.py b/test/arch/x86/unit/mn_psrl_psll.py
index 79125612..44126b96 100644
--- a/test/arch/x86/unit/mn_psrl_psll.py
+++ b/test/arch/x86/unit/mn_psrl_psll.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PSRL(Asm_Test_32):
     TXT = '''
     main:
@@ -52,4 +53,4 @@ class Test_PSLL(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PSRL, Test_PSLL]]
+    [test(*sys.argv[1:])() for test in [Test_PSRL, Test_PSLL]]
diff --git a/test/arch/x86/unit/mn_punpck.py b/test/arch/x86/unit/mn_punpck.py
index 8b655aa0..f6a4772e 100644
--- a/test/arch/x86/unit/mn_punpck.py
+++ b/test/arch/x86/unit/mn_punpck.py
@@ -1,7 +1,8 @@
 #! /usr/bin/env python
-from asm_test import Asm_Test_32
 import sys
 
+from asm_test import Asm_Test_32
+
 class Test_PUNPCKHBW(Asm_Test_32):
     TXT = '''
     main:
@@ -120,5 +121,5 @@ class Test_PUNPCKLDQ(Asm_Test_32):
         assert self.myjit.cpu.MM1 == 0xEEFF020155667788
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PUNPCKHBW, Test_PUNPCKHWD, Test_PUNPCKHDQ,
-                           Test_PUNPCKLBW, Test_PUNPCKLWD, Test_PUNPCKLDQ,]]
+    [test(*sys.argv[1:])() for test in [Test_PUNPCKHBW, Test_PUNPCKHWD, Test_PUNPCKHDQ,
+                                        Test_PUNPCKLBW, Test_PUNPCKLWD, Test_PUNPCKLDQ,]]
diff --git a/test/arch/x86/unit/mn_pushpop.py b/test/arch/x86/unit/mn_pushpop.py
index d230a088..1a3f5517 100644
--- a/test/arch/x86/unit/mn_pushpop.py
+++ b/test/arch/x86/unit/mn_pushpop.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from asm_test import Asm_Test_16, Asm_Test_32
 from miasm2.core.utils import pck16, pck32
 
@@ -119,7 +121,7 @@ class Test_PUSHAD_16(Asm_Test_16):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PUSHA_16, Test_PUSHA_32,
-                           Test_PUSHAD_16, Test_PUSHAD_32
-                           ]
-     ]
+    [test(*sys.argv[1:])() for test in [Test_PUSHA_16, Test_PUSHA_32,
+                                        Test_PUSHAD_16, Test_PUSHAD_32
+                                        ]
+    ]
diff --git a/test/arch/x86/unit/mn_stack.py b/test/arch/x86/unit/mn_stack.py
index 6ae26d67..3bce3979 100644
--- a/test/arch/x86/unit/mn_stack.py
+++ b/test/arch/x86/unit/mn_stack.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from asm_test import Asm_Test_32
 
 
@@ -57,4 +59,4 @@ BAD:
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_PUSHPOP]]
+    [test(*sys.argv[1:])() for test in [Test_PUSHPOP]]
diff --git a/test/arch/x86/unit/mn_strings.py b/test/arch/x86/unit/mn_strings.py
index f8055665..5e7269f7 100644
--- a/test/arch/x86/unit/mn_strings.py
+++ b/test/arch/x86/unit/mn_strings.py
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
+import sys
+
 from asm_test import Asm_Test_32
 
 class Test_SCAS(Asm_Test_32):
@@ -45,4 +47,4 @@ class Test_MOVS(Asm_Test_32):
 
 
 if __name__ == "__main__":
-    [test()() for test in [Test_SCAS, Test_MOVS]]
+    [test(*sys.argv[1:])() for test in [Test_SCAS, Test_MOVS]]