diff options
author | Siri Hansen <[email protected]> | 2017-03-06 08:52:34 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-03-06 08:52:34 +0100 |
commit | ff965ce109ea10ec69bbac47b3a3f9b51c43f236 (patch) | |
tree | f97628a75d7303ff334b2ca40bc43ca2103587a2 /lib/common_test/src/ct_groups.erl | |
parent | b14e556b334069ca60b1be1a1ed45374daf8e1fc (diff) | |
parent | 0e0155410734e04556ceecb1222dd2ef956b4177 (diff) | |
download | otp-ff965ce109ea10ec69bbac47b3a3f9b51c43f236.tar.gz otp-ff965ce109ea10ec69bbac47b3a3f9b51c43f236.tar.bz2 otp-ff965ce109ea10ec69bbac47b3a3f9b51c43f236.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/common_test/src/ct_groups.erl')
-rw-r--r-- | lib/common_test/src/ct_groups.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/common_test/src/ct_groups.erl b/lib/common_test/src/ct_groups.erl index 1375e7dcc7..1c9faf6a70 100644 --- a/lib/common_test/src/ct_groups.erl +++ b/lib/common_test/src/ct_groups.erl @@ -442,17 +442,21 @@ make_conf(Mod, Name, Props, TestSpec) -> ok end, {InitConf,EndConf,ExtraProps} = - case erlang:function_exported(Mod,init_per_group,2) of - true -> - {{Mod,init_per_group},{Mod,end_per_group},[]}; - false -> + case {erlang:function_exported(Mod,init_per_group,2), + erlang:function_exported(Mod,end_per_group,2)} of + {false,false} -> ct_logs:log("TEST INFO", "init_per_group/2 and " "end_per_group/2 missing for group " "~w in ~w, using default.", [Name,Mod]), {{ct_framework,init_per_group}, {ct_framework,end_per_group}, - [{suite,Mod}]} + [{suite,Mod}]}; + _ -> + %% If any of these exist, the other should too + %% (required and documented). If it isn't, it will fail + %% with reason 'undef'. + {{Mod,init_per_group},{Mod,end_per_group},[]} end, {conf,[{name,Name}|Props++ExtraProps],InitConf,TestSpec,EndConf}. |