diff options
author | Peter Andersson <[email protected]> | 2011-04-18 21:47:47 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-04-28 22:43:54 +0200 |
commit | 17808ea01d04f25574aa627f2716704a09e59354 (patch) | |
tree | e813e8dcd08359e324f6c0207c467be876f563c3 /lib/common_test/src/ct_framework.erl | |
parent | b4c851d574b6e9ebd29ffd41b7ebd76b0912b7cf (diff) | |
download | otp-17808ea01d04f25574aa627f2716704a09e59354.tar.gz otp-17808ea01d04f25574aa627f2716704a09e59354.tar.bz2 otp-17808ea01d04f25574aa627f2716704a09e59354.zip |
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.
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r-- | lib/common_test/src/ct_framework.erl | 20 |
1 files changed, 2 insertions, 18 deletions
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) -> |