diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-08-30 12:25:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-30 12:25:41 +0200 |
| commit | c9be70ee8dd77948511d02e58b1f22e96845b524 (patch) | |
| tree | 914cccf1e3a581bca3efc2f29172904c05c47acb /test/test_all.py | |
| parent | a06f5c7703da2b5f0890f7681eed638ffe6698a1 (diff) | |
| parent | 259115571a191386db7da1a6ebd4d02baaac2bc9 (diff) | |
| download | miasm-c9be70ee8dd77948511d02e58b1f22e96845b524.tar.gz miasm-c9be70ee8dd77948511d02e58b1f22e96845b524.zip | |
Merge pull request #837 from commial/refactor/better-deterministic-tests
Refactor/better deterministic tests
Diffstat (limited to 'test/test_all.py')
| -rwxr-xr-x | test/test_all.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/test_all.py b/test/test_all.py index 48ac04ca..efd69706 100755 --- a/test/test_all.py +++ b/test/test_all.py @@ -2,8 +2,9 @@ import argparse from distutils.spawn import find_executable -import time import os +import platform +import time import tempfile from utils.test import Test @@ -20,6 +21,7 @@ TAGS = {"regression": "REGRESSION", # Regression tests "z3": "Z3", # Z3 dependecy is needed "qemu": "QEMU", # QEMU tests (several tests) "cparser": "CPARSER", # pycparser is needed + "linux": "LINUX", # Test must be run on a Linux } # Regression tests @@ -643,16 +645,10 @@ for options, nb_sol, tag in [([], 4, []), depends=[test_x86_32_if_reg], tags=tag) -dse_crackme_out = Example.get_sample("dse_crackme.c")[:-2] -dse_crackme = ExampleSymbolExec([Example.get_sample("dse_crackme.c"), - "-o", dse_crackme_out], - products=[dse_crackme_out], - executable="cc") -testset += dse_crackme +dse_crackme_out = Example.get_sample("dse_crackme") for strategy in ["code-cov", "branch-cov", "path-cov"]: testset += ExampleSymbolExec(["dse_crackme.py", dse_crackme_out, "--strategy", strategy], - depends=[dse_crackme], tags=[TAGS["z3"]]) testset += ExampleSymbolExec(["dse_strategies.py", Example.get_sample("simple_test.bin"), @@ -688,7 +684,7 @@ for jitter in ExampleJitter.jitter_engines: products=[Example.get_sample("box_upx_exe_unupx.bin")], tags=tags.get(jitter, [])) if jitter != "python": - tags = tags.get(jitter, []) + [TAGS["long"]] + tags = tags.get(jitter, []) + [TAGS["long"], TAGS["linux"]] ls_path = find_executable("ls") file_path = find_executable("file") # Launch simulation of "file /bin/ls", with access to libs and ld info @@ -855,6 +851,11 @@ By default, all tag are considered." % ", ".join(TAGS.keys()), default="") if TAGS["cparser"] not in exclude_tags: exclude_tags.append(TAGS["cparser"]) + # Handle Linux tests + if platform.system() != "Linux": + if TAGS["linux"] not in exclude_tags: + exclude_tags.append(TAGS["linux"]) + test_ko = [] test_ok = [] |