diff options
Diffstat (limited to 'lib/test_server/src')
-rw-r--r-- | lib/test_server/src/test_server.erl | 20 | ||||
-rw-r--r-- | lib/test_server/src/test_server_ctrl.erl | 8 |
2 files changed, 19 insertions, 9 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index 743e6c1d29..98a2e21e21 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -611,7 +611,7 @@ do_run_test_case_apply(Mod, Func, Args, Name, RunInit, TimetrapData) -> print(minor, "Test case started with:\n~s:~s(~p)\n", [Mod,Func,Args2Print]), print(minor, "Current directory is ~p\n", [Cwd]), print_timestamp(minor,"Started at "), - print(minor, "", []), + print(minor, "", [], internal_raw), TCCallback = get(test_server_testcase_callback), LogOpts = get(test_server_logopts), Ref = make_ref(), @@ -1007,8 +1007,11 @@ spawn_fw_call(Mod,{end_per_testcase,Func},EndConf,Pid, end, %% if end_per_testcase fails a warning should be %% printed as comment - Comment1 = if Comment == "" -> ""; - true -> Comment ++ "<br>" + Comment1 = if Comment == "" -> + ""; + true -> + Comment ++ test_server_ctrl:xhtml("<br>", + "<br />") end, %% finished, report back SendTo ! {self(),fw_notify_done, @@ -1473,7 +1476,8 @@ do_end_per_testcase(Mod,EndFunc,Func,Conf) -> throw:Other -> Comment0 = case read_comment() of "" -> ""; - Cmt -> Cmt ++ "<br>" + Cmt -> Cmt ++ test_server_ctrl:xhtml("<br>", + "<br />") end, set_loc(erlang:get_stacktrace()), comment(io_lib:format("~s<font color=\"red\">" @@ -1496,7 +1500,8 @@ do_end_per_testcase(Mod,EndFunc,Func,Conf) -> end, Comment0 = case read_comment() of "" -> ""; - Cmt -> Cmt ++ "<br>" + Cmt -> Cmt ++ test_server_ctrl:xhtml("<br>", + "<br />") end, comment(io_lib:format("~s<font color=\"red\">" "WARNING: ~w crashed!" @@ -1572,7 +1577,7 @@ fw_error_notify(Mod, Func, Args, Error, Loc) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% print(Detail,Format,Args) -> ok +%% print(Detail,Format,Args,Printer) -> ok %% Detail = integer() %% Format = string() %% Args = [term()] @@ -1583,6 +1588,9 @@ fw_error_notify(Mod, Func, Args, Error, Loc) -> print(Detail,Format,Args) -> local_or_remote_apply({test_server_ctrl,print,[Detail,Format,Args]}). +print(Detail,Format,Args,Printer) -> + local_or_remote_apply({test_server_ctrl,print,[Detail,Format,Args,Printer]}). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% print_timsteamp(Detail,Leader) -> ok %% diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 9fd0adbfc8..642bb14c88 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -171,7 +171,7 @@ -export([kill_slavenodes/0]). %%% TEST_SERVER INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([output/2, print/2, print/3, print_timestamp/2]). +-export([output/2, print/2, print/3, print/4, print_timestamp/2]). -export([start_node/3, stop_node/1, wait_for_node/1, is_release_available/1]). -export([format/1, format/2, format/3, to_string/1]). -export([get_target_info/0]). @@ -187,6 +187,7 @@ -export([handle_call/3, handle_cast/2, handle_info/2]). -export([do_test_cases/4]). -export([do_spec/2, do_spec_list/2]). +-export([xhtml/2]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -3627,7 +3628,7 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit, Where, test_server_sup:framework_call(report, [tc_start,{?pl2a(Mod),Func}]), print(major, "=case ~p:~p", [Mod, Func]), MinorName = start_minor_log_file(Mod, Func), - print(minor, "<a name=\"top\"></a>", []), + print(minor, "<a name=\"top\"></a>", [], internal_raw), MinorBase = filename:basename(MinorName), print(major, "=logfile ~s", [filename:basename(MinorName)]), print_props((RunInit==skip_init), get_props(Mode)), @@ -3651,7 +3652,8 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit, Where, {died,DReason,DLoc,DCmt} -> {died,DReason,DLoc,[],DCmt} end, - print(minor, "<a name=\"end\"></a>", []), + print(minor, "<a name=\"end\"></a>", [], internal_raw), + print(minor, "\n", [], internal_raw), print_timestamp(minor, "Ended at "), print(major, "=ended ~s", [lists:flatten(timestamp_get(""))]), |