diff options
author | 2015-01-26 16:47:33 +0000 | |
---|---|---|
committer | 2015-01-27 16:12:13 +0000 | |
commit | 3cf4877c66f84a7ba524732e66adcfa5296e07c1 (patch) | |
tree | 547ed881036c8f440084f7643a90dd1933e607ed | |
parent | 2dadc9df0ffb822870a150f81257792b83241c77 (diff) |
run-test: enable checker in dev mode
Also, use explicit flush (instead of passing flush parameter to print)
to enable better compatibility across python versions.
Change-Id: Iaf294d88e932b778d5dce7f3c2b8eca775849973
-rwxr-xr-x | test/run-test | 14 | ||||
-rwxr-xr-x | tools/checker.py | 5 |
2 files changed, 15 insertions, 4 deletions
diff --git a/test/run-test b/test/run-test index 8ef3e3edcf..8c47663390 100755 --- a/test/run-test +++ b/test/run-test @@ -543,10 +543,20 @@ if [ "$dev_mode" = "yes" ]; then echo "${test_dir}: running..." 1>&2 "./${run}" $run_args "$@" 2>&1 run_exit="$?" - echo "run exit status: $run_exit" 1>&2 + if [ "$run_exit" = "0" ]; then - good="yes" + if [ "$run_checker" = "yes" ]; then + "$checker" "$cfg_output" "$tmp_dir" 2>&1 + checker_exit="$?" + if [ "$checker_exit" = "0" ]; then + good="yes" + fi + echo "checker exit status: $checker_exit" 1>&2 + else + good="yes" + fi fi + echo "run exit status: $run_exit" 1>&2 fi elif [ "$update_mode" = "yes" ]; then "./${build}" $build_args >"$build_output" 2>&1 diff --git a/tools/checker.py b/tools/checker.py index 55f015e68a..5744c15488 100755 --- a/tools/checker.py +++ b/tools/checker.py @@ -110,9 +110,10 @@ class Logger(object): text = Logger.Color.terminalCode(color, out) + text + \ Logger.Color.terminalCode(Logger.Color.Default, out) if newLine: - print(text, flush=True, file=out) + print(text, file=out) else: - print(text, end="", flush=True, file=out) + print(text, end="", file=out) + out.flush() @staticmethod def fail(msg, file=None, line=-1): |