From 926dbcfbb4683f4c217504c590e36cb76f06dced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 31 Oct 2012 16:24:43 +0100 Subject: Make sure that "Testing..." is not written if testing has finished When writing messages to stdout, all messages are prefixed with "Testing" followed by the name of the test suite. We don't want to write that prefix if testing has stopped. --- lib/test_server/src/test_server_ctrl.erl | 1 + lib/test_server/src/test_server_io.erl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 4e465c02d1..6ea69b5e58 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -1416,6 +1416,7 @@ init_tester(Mod, Func, Args, Dir, Name, {_,_,MinLev}=Levels, group_leader(test_server_io:get_gl(true), self()), {TimeMy,Result} = ts_tc(Mod, Func, Args), set_io_buffering(undefined), + test_server_io:set_job_name(undefined), catch stop_extra_tools(StartedExtraTools), case Result of {'EXIT',test_suites_done} -> diff --git a/lib/test_server/src/test_server_io.erl b/lib/test_server/src/test_server_io.erl index abdfb71241..7ec36d0c1f 100644 --- a/lib/test_server/src/test_server_io.erl +++ b/lib/test_server/src/test_server_io.erl @@ -253,6 +253,8 @@ output(From, Tag, Str, #st{io_buffering=Buffered,buffered=Buf0}=St) -> St#st{buffered=Buf} end. +do_output(stdout, Str, #st{job_name=undefined}) -> + io:put_chars(Str); do_output(stdout, Str0, #st{job_name=Name}) -> Str = io_lib:format("Testing ~s: ~s\n", [Name,Str0]), io:put_chars(Str); -- cgit v1.2.3