diff options
| author | Camille Mougey <commial@gmail.com> | 2016-04-06 10:02:34 +0200 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2016-04-06 10:02:34 +0200 |
| commit | cba4c6b1d0e937e2dc14682b4f3efc2d5d4fec72 (patch) | |
| tree | aaa33f85493afce3e7401efdd9dc2cc5404fc337 /test/utils/multithread.py | |
| parent | 5db3ce6a4a1bba435fd39b9700feb7cb2256663b (diff) | |
| parent | e21cdd93c7352bc9d8f31d920b8b9596caaa7444 (diff) | |
| download | miasm-cba4c6b1d0e937e2dc14682b4f3efc2d5d4fec72.tar.gz miasm-cba4c6b1d0e937e2dc14682b4f3efc2d5d4fec72.zip | |
Merge pull request #349 from serpilliere/clean_test_output
Clean test output
Diffstat (limited to 'test/utils/multithread.py')
| -rw-r--r-- | test/utils/multithread.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/utils/multithread.py b/test/utils/multithread.py new file mode 100644 index 00000000..287b5ebd --- /dev/null +++ b/test/utils/multithread.py @@ -0,0 +1,24 @@ +import sys +import cosmetics +import time + + +def task_done(test, error, test_ok, test_ko): + command_line = " ".join(test.command_line) + if error is not None: + print cosmetics.colors["red"] + 'ERROR', + print cosmetics.colors["lightcyan"] + command_line + cosmetics.colors["end"] + print error + test_ko.append((test, error)) + else: + print cosmetics.colors["green"] + 'DONE', + print cosmetics.colors["lightcyan"] + command_line + cosmetics.colors["end"], + print "%ds" % (time.time() - test.start_time) + test_ok.append((test, error)) + + +def task_new(test): + command_line = " ".join(test.command_line) + print cosmetics.colors["lightcyan"], + print test.base_dir.upper(), command_line, + print cosmetics.colors["end"] |