From 36105a457097e7f332ae2ed6f38aeaec71a77f24 Mon Sep 17 00:00:00 2001 From: Florent Monjalet Date: Fri, 23 Jan 2015 00:06:25 +0100 Subject: Added TranslatorZ3 to the Miasm test suite. --- test/test_all.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/test_all.py') 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, -- cgit 1.4.1