diff options
| author | serpilliere <fabrice.desclaux@cea.fr> | 2016-03-13 22:30:29 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-04-06 09:22:41 +0200 |
| commit | ed08c49564309ff7e0aa9a587d4359a8f6d9ce2d (patch) | |
| tree | 0f11748391a3c85e3efdd82f26e3efa2f34d41e6 /test/test_all.py | |
| parent | 5db3ce6a4a1bba435fd39b9700feb7cb2256663b (diff) | |
| download | miasm-ed08c49564309ff7e0aa9a587d4359a8f6d9ce2d.tar.gz miasm-ed08c49564309ff7e0aa9a587d4359a8f6d9ce2d.zip | |
Test: simple output
Diffstat (limited to 'test/test_all.py')
| -rw-r--r-- | test/test_all.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/test_all.py b/test/test_all.py index 195be412..34bb0a55 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -5,7 +5,8 @@ import tempfile from utils.test import Test from utils.testset import TestSet -from utils import cosmetics, monothread, screendisplay +from utils import cosmetics, multithread +from multiprocessing import Queue testset = TestSet("../") TAGS = {"regression": "REGRESSION", # Regression tests @@ -667,16 +668,15 @@ By default, no tag is omitted." % ", ".join(TAGS.keys()), default="") "Z3 and its python binding are necessary for TranslatorZ3." if TAGS["z3"] not in exclude_tags: exclude_tags.append(TAGS["z3"]) + test_ko = [] + test_ok = [] # Set callbacks if multiproc is False: - testset.set_callback(task_done=monothread.task_done, - task_new=monothread.task_new) testset.set_cpu_numbers(1) - else: - screendisplay.init(testset.cpu_c) - testset.set_callback(task_done=screendisplay.task_done, - task_new=screendisplay.task_new) + testset.set_callback(task_done=lambda test, error:multithread.task_done(test, error, test_ok, test_ko), + task_new=multithread.task_new) + # Filter testset according to tags testset.filter_tags(exclude_tags=exclude_tags) @@ -686,6 +686,13 @@ By default, no tag is omitted." % ", ".join(TAGS.keys()), default="") # Finalize testset.end(clean=not args.do_not_clean) - + print + print (cosmetics.colors["green"] + + "Result: %d/%d pass" % (len(test_ok), len(test_ok) + len(test_ko)) + + cosmetics.colors["end"]) + for test, error in test_ko: + command_line = " ".join(test.command_line) + print cosmetics.colors["red"] + 'ERROR', cosmetics.colors["lightcyan"] + command_line + cosmetics.colors["end"] + print error # Exit with an error if at least a test failed exit(testset.tests_passed()) |