about summary refs log tree commit diff stats
path: root/test/test_all.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2015-01-23 17:22:06 +0100
committerCamille Mougey <commial@gmail.com>2015-01-23 17:22:06 +0100
commit3af62274b68f13fc6eba680ef1524e5f215e5c8b (patch)
treeb396c879ab2b0527d13a1408e88ff946faa66a56 /test/test_all.py
parenta6dc68e3564eea938381fc6510f12a679af7b07e (diff)
parent36105a457097e7f332ae2ed6f38aeaec71a77f24 (diff)
downloadmiasm-3af62274b68f13fc6eba680ef1524e5f215e5c8b.tar.gz
miasm-3af62274b68f13fc6eba680ef1524e5f215e5c8b.zip
Merge pull request #41 from fmonjalet/translator_z3
TranslatorZ3
Diffstat (limited to 'test/test_all.py')
-rw-r--r--test/test_all.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_all.py b/test/test_all.py
index 27ae8559..5e43ce3f 100644
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -11,6 +11,7 @@ TAGS = {"regression": "REGRESSION", # Regression tests
         "example": "EXAMPLE", # Examples
         "long": "LONG", # Very time consumming tests
         "llvm": "LLVM", # LLVM dependency is required
+        "z3": "Z3", # Z3 dependecy is needed
         }
 
 # Regression tests
@@ -59,6 +60,8 @@ for script in ["ir2C.py",
                "symbexec.py",
                ]:
     testset += RegressionTest([script], base_dir="ir")
+testset += RegressionTest(["z3_ir.py"], base_dir="ir/translators",
+                          tags=[TAGS["z3"]])
 ## OS_DEP
 for script in ["win_api_x86_32.py",
                ]:
@@ -280,6 +283,15 @@ By default, no tag is ommited." % ", ".join(TAGS.keys()), default="")
         if TAGS["llvm"] not in exclude_tags:
             exclude_tags.append(TAGS["llvm"])
 
+    # Handle Z3 dependency
+    try:
+        import z3
+    except ImportError:
+        print "%(red)s[Z3]%(end)s" % cosmetics.colors + \
+            "Z3 and its python binding are necessary for TranslatorZ3."
+        if TAGS["z3"] not in exclude_tags:
+            exclude_tags.append(TAGS["z3"])
+
     # Set callbacks
     if multiproc is False:
         testset.set_callback(task_done=monothread.task_done,