mirror of
https://github.com/cea-sec/miasm
synced 2026-06-21 13:48:18 +00:00
473f60bbd7
- cosmetics: display functions - monothread: callbacks for basic test run view - screendisplay: callbacks for enhanced test run view - test: describe a Test case - testset: describe a Test set and implement methods to run it
21 lines
613 B
Python
21 lines
613 B
Python
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()
|