diff options
Diffstat (limited to 'lib/test_server')
-rw-r--r-- | lib/test_server/src/test_server_ctrl.erl | 37 | ||||
-rw-r--r-- | lib/test_server/test/test_server_SUITE.erl | 14 | ||||
-rw-r--r-- | lib/test_server/test/test_server_test_lib.erl | 5 |
3 files changed, 34 insertions, 22 deletions
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 97e6a171db..352e58f91c 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -2288,8 +2288,9 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases], set_io_buffering(undefined), {Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment, false, SkipMode), - test_server_sup:framework_call(report, [ReportTag, - {Mod,Func,Comment}]), + ConfData = {Mod,{Func,get_name(SkipMode)},Comment}, + test_server_sup:framework_call(report, + [ReportTag,ConfData]), run_test_cases_loop(Cases, Config, TimetrapData, ParentMode, delete_status(Ref, Status)); _ -> @@ -2298,8 +2299,8 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases], wait_for_cases(Ref), {Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment, true, SkipMode), - test_server_sup:framework_call(report, [ReportTag, - {Mod,Func,Comment}]), + ConfData = {Mod,{Func,get_name(SkipMode)},Comment}, + test_server_sup:framework_call(report, [ReportTag,ConfData]), case CurrIOHandler of {Ref,_} -> %% current_io_handler was set by start conf of this @@ -2318,8 +2319,8 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases], %% nested under a parallel group {Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment, false, SkipMode), - test_server_sup:framework_call(report, [ReportTag, - {Mod,Func,Comment}]), + ConfData = {Mod,{Func,get_name(SkipMode)},Comment}, + test_server_sup:framework_call(report, [ReportTag,ConfData]), %% Check if this group is auto skipped because of error in the %% init conf. If so, check if the parent group is a sequence, @@ -2352,8 +2353,8 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases], %% a parallel group (io buffering is active) {Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment, true, SkipMode), - test_server_sup:framework_call(report, [ReportTag, - {Mod,Func,Comment}]), + ConfData = {Mod,{Func,get_name(SkipMode)},Comment}, + test_server_sup:framework_call(report, [ReportTag,ConfData]), case CurrIOHandler of {Ref,_} -> %% current_io_handler was set by start conf of this @@ -2370,8 +2371,8 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases], %% under a parallel group {Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment, false, SkipMode), - test_server_sup:framework_call(report, [ReportTag, - {Mod,Func,Comment}]), + ConfData = {Mod,{Func,get_name(SkipMode)},Comment}, + test_server_sup:framework_call(report, [ReportTag,ConfData]), run_test_cases_loop(Cases, Config, TimetrapData, [conf(Ref,[])|Mode], Status); {_,Ref0} when is_reference(Ref0) -> @@ -2385,8 +2386,8 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases], end, {Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment, true, SkipMode), - test_server_sup:framework_call(report, [ReportTag, - {Mod,Func,Comment}]), + ConfData = {Mod,{Func,get_name(SkipMode)},Comment}, + test_server_sup:framework_call(report, [ReportTag,ConfData]), run_test_cases_loop(Cases, Config, TimetrapData, [conf(Ref,[])|Mode], Status) end; @@ -3180,11 +3181,17 @@ skip_case1(Type, CaseNum, Mod, Func, Comment, Mode) -> ResultCol = if Type == auto -> ?auto_skip_color; Type == user -> ?user_skip_color end, - - Comment1 = reason_to_string(Comment), - print(major, "~n=case ~w:~w", [Mod,Func]), + GroupName = case get_name(Mode) of + undefined -> + ""; + GrName -> + GrName1 = cast_to_list(GrName), + print(major, "=group_props ~p", [[{name,GrName1}]]), + GrName1 + end, print(major, "=started ~s", [lists:flatten(timestamp_get(""))]), + Comment1 = reason_to_string(Comment), if Type == auto -> print(major, "=result auto_skipped: ~ts", [Comment1]); Type == user -> diff --git a/lib/test_server/test/test_server_SUITE.erl b/lib/test_server/test/test_server_SUITE.erl index 8ad5fcfb5c..c4faac036b 100644 --- a/lib/test_server/test/test_server_SUITE.erl +++ b/lib/test_server/test/test_server_SUITE.erl @@ -117,7 +117,7 @@ test_server_shuffle01_SUITE(Config) -> test_server_skip_SUITE(Config) -> run_test_server_tests("test_server_skip_SUITE", [], - 3, 0, 1, 0, 0, 1, 3, 0, 0, Config). + 3, 0, 1, 0, 1, 0, 3, 0, 0, Config). test_server_conf01_SUITE(Config) -> run_test_server_tests("test_server_conf01_SUITE", [], @@ -248,11 +248,13 @@ run_test_server_tests(SuiteName, Skip, NCases, NFail, NExpected, NSucc, {NActualSkip,NActualFail,NActualSucc} = lists:foldl(fun(#tc{ result = skip },{S,F,Su}) -> {S+1,F,Su}; - (#tc{ result = ok },{S,F,Su}) -> - {S,F,Su+1}; - (#tc{ result = failed },{S,F,Su}) -> - {S,F+1,Su} - end,{0,0,0},Data#suite.cases), + (#tc{ result = auto_skip },{S,F,Su}) -> + {S+1,F,Su}; + (#tc{ result = ok },{S,F,Su}) -> + {S,F,Su+1}; + (#tc{ result = failed },{S,F,Su}) -> + {S,F+1,Su} + end,{0,0,0},Data#suite.cases), Data. translate_filename(Filename,EncodingOnTestNode) -> diff --git a/lib/test_server/test/test_server_test_lib.erl b/lib/test_server/test/test_server_test_lib.erl index cd6804f7ad..82a702d59f 100644 --- a/lib/test_server/test/test_server_test_lib.erl +++ b/lib/test_server/test/test_server_test_lib.erl @@ -17,6 +17,7 @@ %% %CopyrightEnd% %% -module(test_server_test_lib). + -export([parse_suite/1]). -export([init/2, pre_init_per_testcase/3, post_end_per_testcase/4]). @@ -185,7 +186,9 @@ parse_case("=result" ++ Result, _, Tc) -> "failed" ++ _ -> {ok, Tc#tc{ result = failed } }; "skipped" ++ _ -> - {ok, Tc#tc{ result = skip } } + {ok, Tc#tc{ result = skip } }; + "auto_skipped" ++ _ -> + {ok, Tc#tc{ result = auto_skip } } end; parse_case("=finished" ++ _ , _Fd, #tc{ name = undefined }) -> finished; |