From 17808ea01d04f25574aa627f2716704a09e59354 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Mon, 18 Apr 2011 21:47:47 +0200 Subject: Fix issues related to test case groups: 1. Allow empty group to be specified without generating an error. 2. Sort out potential problem with unnecessary call to delete_subs/2. --- lib/common_test/src/ct_framework.erl | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'lib/common_test/src/ct_framework.erl') diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index af71d1f69b..2572bf1dde 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -737,7 +737,7 @@ get_suite(Mod, Group={conf,Props,_Init,TCs,_End}) -> %% (and only) test case so we can report Error properly [{?MODULE,error_in_suite,[[Error]]}]; [] -> - {error,{invalid_group_spec,Name}}; + []; ConfTests -> case lists:member(skipped, Props) of true -> @@ -767,23 +767,7 @@ get_suite(Mod, Name) -> find_groups(Mod, Name, TCs, GroupDefs) -> Found = find(Mod, Name, TCs, GroupDefs, [], GroupDefs, false), - Trimmed = trim(Found), - %% I cannot find a reason to why this function is called, - %% It deletes any group which is referenced in any other - %% group. i.e. - %% groups() -> - %% [{test, [], [testcase1]}, - %% {testcases, [], [{group, test}]}]. - %% Would be changed to - %% groups() -> - %% [{testcases, [], [testcase1]}]. - %% instead of what I believe is correct: - %% groups() -> - %% [{test, [], [testcase1]}, - %% {testcases, [], [testcase1]}]. - %% Have to double check with peppe - delete_subs(Trimmed, Trimmed), - Trimmed. + trim(Found). find(Mod, all, _TCs, [{Name,Props,Tests} | Gs], Known, Defs, _) when is_atom(Name), is_list(Props), is_list(Tests) -> -- cgit v1.2.3