diff options
author | Siri Hansen <[email protected]> | 2013-04-10 09:41:27 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-04-10 09:41:27 +0200 |
commit | 407973227d29a53f5c886d61439f0fa9647e3824 (patch) | |
tree | 067e778cdaf49d45e9c9f85b1033920252f8409e /lib/test_server/src | |
parent | 2827f483ca0173b1cf54a67c00556afcd8cfd4ef (diff) | |
parent | d6782afcbcd1658e0ffd86f08057befd4c37edcd (diff) | |
download | otp-407973227d29a53f5c886d61439f0fa9647e3824.tar.gz otp-407973227d29a53f5c886d61439f0fa9647e3824.tar.bz2 otp-407973227d29a53f5c886d61439f0fa9647e3824.zip |
Merge branch 'siri/common_test/unexpected_io/OTP-10494' into maint
* siri/common_test/unexpected_io/OTP-10494:
[common_test] Add test for unexpected I/O
[common_test] Send unexpected logging to test_server's unexpected_io.log
[test_server] Add test_server_io:print_unexpected/1
Diffstat (limited to 'lib/test_server/src')
-rw-r--r-- | lib/test_server/src/test_server_gl.erl | 2 | ||||
-rw-r--r-- | lib/test_server/src/test_server_io.erl | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/test_server/src/test_server_gl.erl b/lib/test_server/src/test_server_gl.erl index 2e4f223811..1f7317c51d 100644 --- a/lib/test_server/src/test_server_gl.erl +++ b/lib/test_server/src/test_server_gl.erl @@ -166,7 +166,7 @@ handle_info({'DOWN',Ref,process,_,Reason}=D, #st{minor_monitor=Ref}=St) -> Data = io_lib:format("=== WARNING === TC: ~w\n" "Got down from minor Fd ~w: ~w\n\n", [St#st.tc,St#st.minor,D]), - test_server_io:print(xxxFrom, unexpected_io, Data) + test_server_io:print_unexpected(Data) end, {noreply,St#st{minor=none,minor_monitor=none}}; handle_info({permit_io,Pid}, #st{permit_io=P}=St) -> diff --git a/lib/test_server/src/test_server_io.erl b/lib/test_server/src/test_server_io.erl index 242c08f765..a979deffc3 100644 --- a/lib/test_server/src/test_server_io.erl +++ b/lib/test_server/src/test_server_io.erl @@ -30,7 +30,8 @@ -module(test_server_io). -export([start_link/0,stop/0,get_gl/1,set_fd/2, - start_transaction/0,end_transaction/0,print_buffered/1,print/3, + start_transaction/0,end_transaction/0, + print_buffered/1,print/3,print_unexpected/1, set_footer/1,set_job_name/1,set_gl_props/1]). -export([init/1,handle_call/3,handle_info/2,terminate/2]). @@ -124,6 +125,14 @@ print(From, Tag, Msg) -> print_buffered(Pid) -> req({print_buffered,Pid}). +%% print_unexpected(Msg) +%% Msg = string or iolist +%% +%% Print the given string in the unexpected_io log. + +print_unexpected(Msg) -> + print(xxxFrom,unexpected_io,Msg). + %% set_footer(IoData) %% %% Set a footer for the file associated with the 'html' tag. |