diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2014-11-03 16:09:15 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2014-11-03 16:09:15 +0100 |
| commit | 9d72be933fb34137fd90279c14b52f1e02470ac1 (patch) | |
| tree | 242c4af3d8da10a14e83e9756185bf2f5cd53f20 | |
| parent | 1324dffd0051df44a12188b000d53f6ede16d54a (diff) | |
| download | miasm-9d72be933fb34137fd90279c14b52f1e02470ac1.tar.gz miasm-9d72be933fb34137fd90279c14b52f1e02470ac1.zip | |
TestAll: Use tag "llvm" to filter LLVM dependent test units
| -rw-r--r-- | test/test_all.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/test_all.py b/test/test_all.py index 868c1f96..b02f2467 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -10,6 +10,7 @@ testset = TestSet("../") TAGS = {"regression": "REGRESSION", # Regression tests "example": "EXAMPLE", # Examples "long": "LONG", # Very time consumming tests + "llvm": "LLVM", # LLVM dependency is required } # Regression tests @@ -140,10 +141,12 @@ for script in [["symbol_exec.py"], for jitter in ["tcc", "llvm", "python"]: # Take 5 min on a Core i5 - tags = [TAGS["long"]] if jitter == "python" else [] + tags = {"python": [TAGS["long"]], + "llvm": [TAGS["llvm"]], + } testset += Example(["unpack_upx.py", "box_upx.exe"] + ["--jitter", jitter], products=["box_upx_exe_unupx.bin"], - tags=tags) + tags=tags.get(jitter, [])) for script, dep in [(["test_jit_x86_32.py", "x86_32_sc.bin"], []), (["test_jit_arm.py", "md5_arm", "-a", "A684"], []), @@ -166,8 +169,9 @@ for script, dep in [(["test_jit_x86_32.py", "x86_32_sc.bin"], []), [test_box_mod_self]), ]: for jitter in ["tcc", "llvm", "python"]: + tags = [TAGS["llvm"]] if jitter == "llvm" else [] testset += Example(script + ["--jitter", jitter], - depends=dep) + depends=dep, tags=tags) if __name__ == "__main__": @@ -252,14 +256,8 @@ By default, no tag is ommited." % ", ".join(TAGS.keys()), default="") "'py-llvm 3.2' module is required for llvm tests" # Remove llvm tests - for test in testset.tests: - if "llvm" in test.command_line: - testset.tests.remove(test) - print "%(red)s[LLVM]%(end)s Remove" % cosmetics.colors, \ - " ".join(test.command_line) - - # Let the user see messages - time.sleep(0.5) + if "llvm" not in exclude_tags: + exclude_tags.append(TAGS["llvm"]) # Set callbacks if multiproc is False: |