From 40c11394f000b4bad36e45ef2c3d45882f39ac6e Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Wed, 14 Dec 2011 14:49:31 +0100 Subject: Use new syntax for specifying ct group properties No longer have to duplicate groups for sequential and parallel runs. --- lib/diameter/test/diameter_capx_SUITE.erl | 15 +++------------ lib/diameter/test/diameter_dict_SUITE.erl | 5 +++-- lib/diameter/test/diameter_reg_SUITE.erl | 5 +++-- lib/diameter/test/diameter_relay_SUITE.erl | 16 +++++++++------- lib/diameter/test/diameter_stats_SUITE.erl | 5 +++-- lib/diameter/test/diameter_sync_SUITE.erl | 5 +++-- lib/diameter/test/diameter_tls_SUITE.erl | 14 ++++++++------ lib/diameter/test/diameter_traffic_SUITE.erl | 19 ++++--------------- lib/diameter/test/diameter_transport_SUITE.erl | 7 +++++-- 9 files changed, 41 insertions(+), 50 deletions(-) (limited to 'lib') diff --git a/lib/diameter/test/diameter_capx_SUITE.erl b/lib/diameter/test/diameter_capx_SUITE.erl index 4270210a10..c1ecd7bb14 100644 --- a/lib/diameter/test/diameter_capx_SUITE.erl +++ b/lib/diameter/test/diameter_capx_SUITE.erl @@ -105,20 +105,14 @@ suite() -> all() -> [start, start_services, add_listeners, - {group, sequential}, - {group, parallel}, + {group, all}, + {group, all, [parallel]}, remove_listeners, stop_services, stop]. groups() -> - Ts = testcases(), - [{grp(P), P, Ts} || P <- [[], [parallel]]]. - -grp([]) -> - sequential; -grp([parallel = P]) -> - P. + [{all, [], lists:flatmap(fun tc/1, tc())}]. init_per_group(_Name, Config) -> Config. @@ -145,9 +139,6 @@ end_per_testcase(Name, Config) -> ok = diameter:remove_transport(?CLIENT, CRef). %% Testcases all come in two flavours, client and server. -testcases() -> - lists:flatmap(fun tc/1, tc()). - tc(Name) -> [?A([C,$_|?L(Name)]) || C <- "cs"]. diff --git a/lib/diameter/test/diameter_dict_SUITE.erl b/lib/diameter/test/diameter_dict_SUITE.erl index 87bb9727fe..ce68296877 100644 --- a/lib/diameter/test/diameter_dict_SUITE.erl +++ b/lib/diameter/test/diameter_dict_SUITE.erl @@ -53,10 +53,11 @@ suite() -> [{timetrap, {seconds, 10}}]. all() -> - [{group, all} | tc()]. + [{group, all}, + {group, all, [parallel]}]. groups() -> - [{all, [parallel], tc()}]. + [{all, [], tc()}]. tc() -> [append, diff --git a/lib/diameter/test/diameter_reg_SUITE.erl b/lib/diameter/test/diameter_reg_SUITE.erl index ade824c9dd..e9d6f7725c 100644 --- a/lib/diameter/test/diameter_reg_SUITE.erl +++ b/lib/diameter/test/diameter_reg_SUITE.erl @@ -48,10 +48,11 @@ suite() -> [{timetrap, {seconds, 10}}]. all() -> - [{group, all} | tc()]. + [{group, all}, + {group, all, [parallel]}]. groups() -> - [{all, [parallel], tc()}]. + [{all, [], tc()}]. tc() -> [add, diff --git a/lib/diameter/test/diameter_relay_SUITE.erl b/lib/diameter/test/diameter_relay_SUITE.erl index 32b30d3cca..165bb44f87 100644 --- a/lib/diameter/test/diameter_relay_SUITE.erl +++ b/lib/diameter/test/diameter_relay_SUITE.erl @@ -117,15 +117,17 @@ suite() -> [{timetrap, {seconds, 10}}]. all() -> - [start, start_services, connect] - ++ tc() - ++ [{group, all}, - disconnect, - stop_services, - stop]. + [start, + start_services, + connect, + {group, all}, + {group, all, [parallel]}, + disconnect, + stop_services, + stop]. groups() -> - [{all, [parallel], tc()}]. + [{all, [], tc()}]. init_per_group(_, Config) -> Config. diff --git a/lib/diameter/test/diameter_stats_SUITE.erl b/lib/diameter/test/diameter_stats_SUITE.erl index e50a0050a6..e473afc541 100644 --- a/lib/diameter/test/diameter_stats_SUITE.erl +++ b/lib/diameter/test/diameter_stats_SUITE.erl @@ -44,10 +44,11 @@ suite() -> [{timetrap, {seconds, 10}}]. all() -> - [{group, all} | tc()]. + [{group, all}, + {group, all, [parallel]}]. groups() -> - [{all, [parallel], tc()}]. + [{all, [], tc()}]. tc() -> [an, diff --git a/lib/diameter/test/diameter_sync_SUITE.erl b/lib/diameter/test/diameter_sync_SUITE.erl index 84f77b6066..1e0dbd634c 100644 --- a/lib/diameter/test/diameter_sync_SUITE.erl +++ b/lib/diameter/test/diameter_sync_SUITE.erl @@ -48,10 +48,11 @@ suite() -> [{timetrap, {seconds, 10}}]. all() -> - [{group, all} | tc()]. + [{group, all}, + {group, all, [parallel]}]. groups() -> - [{all, [parallel], tc()}]. + [{all, [], tc()}]. tc() -> [call, diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl index 38282282b8..eca25ba25e 100644 --- a/lib/diameter/test/diameter_tls_SUITE.erl +++ b/lib/diameter/test/diameter_tls_SUITE.erl @@ -136,14 +136,16 @@ all() -> start_diameter, make_certs, start_services, - add_transports] - ++ [{group, N} || {N, _, _} <- groups()] - ++ [remove_transports, stop_services, stop_diameter, stop_ssl]. + add_transports, + {group, all}, + {group, all, [parallel]}, + remove_transports, + stop_services, + stop_diameter, + stop_ssl]. groups() -> - Ts = tc(), - [{all, [], Ts}, - {p, [parallel], Ts}]. + [{all, [], tc()}]. init_per_group(_, Config) -> Config. diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index bc5ca416c2..6eed8d3b5d 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -162,27 +162,16 @@ suite() -> [{timetrap, {seconds, 10}}]. all() -> - [start, start_services, add_transports, result_codes - | [{group, N} || {N, _, _} <- groups()]] + [start, start_services, add_transports, result_codes] + ++ [{group, E, P} || E <- ?ENCODINGS, P <- [[], [parallel]]] ++ [remove_transports, stop_services, stop]. groups() -> Ts = tc(), - [{grp(E,P), P, Ts} || E <- ?ENCODINGS, P <- [[], [parallel]]]. - -grp(E, []) -> - E; -grp(E, [parallel]) -> - ?P(E). + [{E, [], Ts} || E <- ?ENCODINGS]. init_per_group(Name, Config) -> - E = case ?L(Name) of - "p_" ++ Rest -> - ?A(Rest); - _ -> - Name - end, - [{encode, E} | Config]. + [{encode, Name} | Config]. end_per_group(_, _) -> ok. diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl index 24d7d44006..1b81c900bf 100644 --- a/lib/diameter/test/diameter_transport_SUITE.erl +++ b/lib/diameter/test/diameter_transport_SUITE.erl @@ -92,10 +92,13 @@ suite() -> [{timetrap, {minutes, 2}}]. all() -> - [start | tc()] ++ [{group, all}, stop]. + [start, + {group, all}, + {group, all, [parallel]}, + stop]. groups() -> - [{all, [parallel], tc()}]. + [{all, [], tc()}]. tc() -> [tcp_accept, -- cgit v1.2.3