aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_framework.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2010-07-01 20:41:33 +0200
committerPeter Andersson <[email protected]>2010-07-06 02:44:27 +0200
commit6b51c530111e478c9605cb88bb90178682ffe669 (patch)
treef18cba35d1870500008701d13e9469826520c001 /lib/common_test/src/ct_framework.erl
parentafbd6fa341f89211697a3c3f59f888b8247aa7f4 (diff)
downloadotp-6b51c530111e478c9605cb88bb90178682ffe669.tar.gz
otp-6b51c530111e478c9605cb88bb90178682ffe669.tar.bz2
otp-6b51c530111e478c9605cb88bb90178682ffe669.zip
Improve handling of test case group specifications
Still a few things missing: * Documentation * More tests * Fix old broken test cases
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r--lib/common_test/src/ct_framework.erl17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index 17215e5eb5..4104115484 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -687,7 +687,20 @@ get_suite(Mod, Group={conf,Props,_Init,TCs,_End}) ->
[] ->
{error,{invalid_group_spec,Name}};
ConfTests ->
- ConfTests
+ case lists:member(skipped, Props) of
+ true ->
+ %% a *subgroup* specified *only* as skipped (and not
+ %% as an explicit test) should not be returned, or
+ %% init/end functions for top groups will be executed
+ case catch proplists:get_value(name, element(2, hd(ConfTests))) of
+ Name -> % top group
+ ConfTests;
+ _ ->
+ []
+ end;
+ false ->
+ ConfTests
+ end
end;
_ ->
E = "Bad return value from "++atom_to_list(Mod)++":groups/0",
@@ -874,7 +887,7 @@ make_all_conf(Mod) ->
[] ->
{error,{invalid_group_spec,Mod}};
ConfTests ->
- ConfTests
+ [{conf,Props,Init,all,End} || {conf,Props,Init,_,End} <- ConfTests]
end
end.