diff options
author | Peter Andersson <[email protected]> | 2016-03-09 10:29:02 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2016-03-09 10:29:02 +0100 |
commit | fb44a4de532ae97b3424078577dee7370078dea0 (patch) | |
tree | a6d60e090ff237de7513016c7f2d53db9cd4a8a2 /lib/common_test/src/ct_util.erl | |
parent | b68ec56d44ff7f94289670ca0f10c8bbce927be5 (diff) | |
parent | 9b9879b1ccbeff9ec87494ba7ed59273d679740e (diff) | |
download | otp-fb44a4de532ae97b3424078577dee7370078dea0.tar.gz otp-fb44a4de532ae97b3424078577dee7370078dea0.tar.bz2 otp-fb44a4de532ae97b3424078577dee7370078dea0.zip |
Merge branch 'peppe/common_test/html_improvements' into maint
* peppe/common_test/html_improvements:
Fix problems with formatted test_server printouts
Make sure special characters are escaped in e.g. pal and log printouts
Conflicts:
lib/test_server/src/test_server.erl
Diffstat (limited to 'lib/common_test/src/ct_util.erl')
-rw-r--r-- | lib/common_test/src/ct_util.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl index 445fce1db8..b7fa7947e2 100644 --- a/lib/common_test/src/ct_util.erl +++ b/lib/common_test/src/ct_util.erl @@ -485,6 +485,8 @@ loop(Mode,TestData,StartDir) -> {'EXIT',Pid,Reason} -> case ets:lookup(?conn_table,Pid) of [#conn{address=A,callback=CB}] -> + ErrorStr = io_lib:format("~tp", [Reason]), + ErrorHtml = ct_logs:escape_chars(ErrorStr), %% A connection crashed - remove the connection but don't die ct_logs:tc_log_async(ct_error_notify, ?MAX_IMPORTANCE, @@ -492,8 +494,8 @@ loop(Mode,TestData,StartDir) -> "Connection process died: " "Pid: ~w, Address: ~p, " "Callback: ~w\n" - "Reason: ~p\n\n", - [Pid,A,CB,Reason]), + "Reason: ~ts\n\n", + [Pid,A,CB,ErrorHtml]), catch CB:close(Pid), %% in case CB:close failed to do this: unregister_connection(Pid), |