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/test | |
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/test')
-rw-r--r-- | lib/test_server/test/test_server_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/test_server/test/test_server_SUITE_data/test_server_SUITE.erl | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/test_server/test/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE.erl index cf1df6df34..3db2f5f9f1 100644 --- a/lib/test_server/test/test_server_SUITE.erl +++ b/lib/test_server/test/test_server_SUITE.erl @@ -104,7 +104,7 @@ test_server_SUITE(Config) -> % rpc:call(Node,dbg, tpl,[test_server_ctrl,x]), run_test_server_tests("test_server_SUITE", [{test_server_SUITE,skip_case7,"SKIPPED!"}], - 39, 1, 31, 20, 9, 1, 11, 2, 26, Config). + 40, 1, 32, 21, 9, 1, 11, 2, 27, Config). test_server_parallel01_SUITE(Config) -> run_test_server_tests("test_server_parallel01_SUITE", [], diff --git a/lib/test_server/test/test_server_SUITE_data/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE_data/test_server_SUITE.erl index 6c50efa712..541e8fdefc 100644 --- a/lib/test_server/test/test_server_SUITE_data/test_server_SUITE.erl +++ b/lib/test_server/test/test_server_SUITE_data/test_server_SUITE.erl @@ -39,7 +39,7 @@ check_old_conf/1, conf_init_fail/1, start_stop_node/1, cleanup_nodes_init/1, check_survive_nodes/1, cleanup_nodes_fin/1, commercial/1, - io_invalid_data/1]). + io_invalid_data/1, print_unexpected/1]). -export([dummy_function/0,dummy_function/1,doer/1]). @@ -48,7 +48,7 @@ all(suite) -> [config, comment, timetrap, timetrap_cancel, multiply_timetrap, init_per_s, init_per_tc, end_per_tc, timeconv, msgs, capture, timecall, do_times, skip_cases, - commercial, io_invalid_data, + commercial, io_invalid_data, print_unexpected, {conf, conf_init, [check_new_conf], conf_cleanup}, check_old_conf, {conf, conf_init_fail,[conf_member_skip],conf_cleanup_skip}, @@ -503,3 +503,12 @@ io_invalid_data(Config) when is_list(Config) -> %% OTP-10991 caused this to hang and produce a timetrap timeout: {'EXIT',{badarg,_}} = (catch io:put_chars("invalid: " ++ [42.0])), ok. + +print_unexpected(Config) when is_list(Config) -> + Str = "-x-x-x- test_server_SUITE:print_unexpected -> Unexpected data -x-x-x-", + test_server_io:print_unexpected(Str), + UnexpectedLog = filename:join(filename:dirname(?config(tc_logfile,Config)), + "unexpected_io.log.html"), + {ok,Bin} = file:read_file(UnexpectedLog), + match = re:run(Bin, Str, [global,{capture,none}]), + ok. |