diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-10-20 13:39:48 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-10-20 13:39:48 +0200 |
| commit | 10664b49b1b419cb7ae0812788870bf5c9c2ebd8 (patch) | |
| tree | 5e80c31abaf4437e657d1a8ab92db956b82c0ec7 /test/utils/monothread.py | |
| parent | 3ec550cf75e1d7cd95e8237d307934d5a28bad73 (diff) | |
| parent | dd3e3df9113fe1f0c7a339e7b657df5439d8cd1c (diff) | |
| download | miasm-10664b49b1b419cb7ae0812788870bf5c9c2ebd8.tar.gz miasm-10664b49b1b419cb7ae0812788870bf5c9c2ebd8.zip | |
merge
Diffstat (limited to 'test/utils/monothread.py')
| -rw-r--r-- | test/utils/monothread.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/utils/monothread.py b/test/utils/monothread.py new file mode 100644 index 00000000..ae64f3c5 --- /dev/null +++ b/test/utils/monothread.py @@ -0,0 +1,20 @@ +import sys +import cosmetics + + +def task_done(test, error): + s = "[%s] Running tests on %s ..." % (test.base_dir.upper(), + " ".join(test.command_line)) + already_printed = len(s) + if error is not None: + cosmetics.write_colored("ERROR", "red", already_printed) + print error + else: + cosmetics.write_colored("OK", "green", already_printed) + + +def task_new(test): + s = "[%s] Running tests on %s ..." % (test.base_dir.upper(), + " ".join(test.command_line)) + sys.stdout.write(s) + sys.stdout.flush() |