diff options
author | Siri Hansen <[email protected]> | 2017-02-16 17:17:06 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-02-20 12:40:09 +0100 |
commit | 1a5ba828bf7dda17bdd874b837a3dc8898952d6c (patch) | |
tree | 320344ae40f27edfb9ba405dd6b62d9e303b6901 /lib/common_test/src | |
parent | 8151495812ffabf560958e5434d3edbe46f29695 (diff) | |
download | otp-1a5ba828bf7dda17bdd874b837a3dc8898952d6c.tar.gz otp-1a5ba828bf7dda17bdd874b837a3dc8898952d6c.tar.bz2 otp-1a5ba828bf7dda17bdd874b837a3dc8898952d6c.zip |
[ct] Remove excessive skipped/failed tag in hook function
When skipping or failing in a configuration function, the
configuration function itself would get {auto_skipped,Reason},
{skipped,Reason} or {failed,Reason} in the hook callbacks on_tc_skip
or on_tc_fail. The other test cases that were skipped as a result of
this would only get Reason in the hook callbacks. This is now
corrected.
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_framework.erl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index dca3b8b5a2..43f1c9de0f 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -1386,25 +1386,25 @@ report(What,Data) -> ok; tc_done -> {Suite,{Func,GrName},Result} = Data, - Data1 = if GrName == undefined -> {Suite,Func,Result}; - true -> Data - end, + FuncSpec = if GrName == undefined -> Func; + true -> {Func,GrName} + end, %% Register the group leader for the process calling the report %% function, making it possible for a hook function to print %% in the test case log file ReportingPid = self(), ct_logs:register_groupleader(ReportingPid, group_leader()), case Result of - {failed, _} -> - ct_hooks:on_tc_fail(What, Data1); - {skipped,{failed,{_,init_per_testcase,_}}} -> - ct_hooks:on_tc_skip(tc_auto_skip, Data1); - {skipped,{require_failed,_}} -> - ct_hooks:on_tc_skip(tc_auto_skip, Data1); - {skipped,_} -> - ct_hooks:on_tc_skip(tc_user_skip, Data1); - {auto_skipped,_} -> - ct_hooks:on_tc_skip(tc_auto_skip, Data1); + {failed, Reason} -> + ct_hooks:on_tc_fail(What, {Suite,FuncSpec,Reason}); + {skipped,{failed,{_,init_per_testcase,_}}=Reason} -> + ct_hooks:on_tc_skip(tc_auto_skip, {Suite,FuncSpec,Reason}); + {skipped,{require_failed,_}=Reason} -> + ct_hooks:on_tc_skip(tc_auto_skip, {Suite,FuncSpec,Reason}); + {skipped,Reason} -> + ct_hooks:on_tc_skip(tc_user_skip, {Suite,FuncSpec,Reason}); + {auto_skipped,Reason} -> + ct_hooks:on_tc_skip(tc_auto_skip, {Suite,FuncSpec,Reason}); _Else -> ok end, |