aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_testspec.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-11-20 12:30:53 +0100
committerPeter Andersson <[email protected]>2012-11-20 12:30:53 +0100
commitef8c1a9b7d0e9f35439fcb1e75e2e287cba53e9a (patch)
treedfef1a69c45f9684fcde45ffed8c8b315006ce5e /lib/common_test/src/ct_testspec.erl
parent3618f75a8816e119a1ed9c7ff71664f0d49f5fb7 (diff)
parentb0acd41f90490d38156cf9c8615859def630596b (diff)
downloadotp-ef8c1a9b7d0e9f35439fcb1e75e2e287cba53e9a.tar.gz
otp-ef8c1a9b7d0e9f35439fcb1e75e2e287cba53e9a.tar.bz2
otp-ef8c1a9b7d0e9f35439fcb1e75e2e287cba53e9a.zip
Merge branch 'maint'
Conflicts: lib/common_test/test/Makefile
Diffstat (limited to 'lib/common_test/src/ct_testspec.erl')
-rw-r--r--lib/common_test/src/ct_testspec.erl24
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/common_test/src/ct_testspec.erl b/lib/common_test/src/ct_testspec.erl
index 0221b87d49..202d8f9373 100644
--- a/lib/common_test/src/ct_testspec.erl
+++ b/lib/common_test/src/ct_testspec.erl
@@ -1028,20 +1028,24 @@ insert_groups(Node,Dir,Suite,Group,Cases,Tests,MergeTests)
insert_groups(Node,Dir,Suite,[Group],Cases,Tests,MergeTests);
insert_groups(Node,Dir,Suite,Groups,Cases,Tests,false) when
((Cases == all) or is_list(Cases)) and is_list(Groups) ->
- Groups1 = [{Gr,Cases} || Gr <- Groups],
+ Groups1 = [if is_list(Gr) -> % preserve group path
+ {[Gr],Cases};
+ true ->
+ {Gr,Cases} end || Gr <- Groups],
append({{Node,Dir},[{Suite,Groups1}]},Tests);
insert_groups(Node,Dir,Suite,Groups,Cases,Tests,true) when
((Cases == all) or is_list(Cases)) and is_list(Groups) ->
+ Groups1 = [if is_list(Gr) -> % preserve group path
+ {[Gr],Cases};
+ true ->
+ {Gr,Cases} end || Gr <- Groups],
case lists:keysearch({Node,Dir},1,Tests) of
{value,{{Node,Dir},[{all,_}]}} ->
Tests;
{value,{{Node,Dir},Suites0}} ->
- Suites1 = insert_groups1(Suite,
- [{Gr,Cases} || Gr <- Groups],
- Suites0),
+ Suites1 = insert_groups1(Suite,Groups1,Suites0),
insert_in_order({{Node,Dir},Suites1},Tests);
false ->
- Groups1 = [{Gr,Cases} || Gr <- Groups],
insert_in_order({{Node,Dir},[{Suite,Groups1}]},Tests)
end;
insert_groups(Node,Dir,Suite,Groups,Case,Tests, MergeTests)
@@ -1064,13 +1068,13 @@ insert_groups1(Suite,Groups,Suites0) ->
insert_groups2(_Groups,all) ->
all;
-insert_groups2([Group={GrName,Cases}|Groups],GrAndCases) ->
- case lists:keysearch(GrName,1,GrAndCases) of
- {value,{GrName,all}} ->
+insert_groups2([Group={Gr,Cases}|Groups],GrAndCases) ->
+ case lists:keysearch(Gr,1,GrAndCases) of
+ {value,{Gr,all}} ->
GrAndCases;
- {value,{GrName,Cases0}} ->
+ {value,{Gr,Cases0}} ->
Cases1 = insert_in_order(Cases,Cases0),
- insert_groups2(Groups,insert_in_order({GrName,Cases1},GrAndCases));
+ insert_groups2(Groups,insert_in_order({Gr,Cases1},GrAndCases));
false ->
insert_groups2(Groups,insert_in_order(Group,GrAndCases))
end;