aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/test/mt.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-03-16 10:39:52 +0100
committerDan Gudmundsson <[email protected]>2011-05-12 10:09:46 +0200
commit2e294c82e6f30c71ced50c3d79e4746b5ad2e76d (patch)
treedc320c19c3321834516c0c816b881677773e9fda /lib/mnesia/test/mt.erl
parent5703c55ea47c52a8dc8475085a8657422da3535e (diff)
downloadotp-2e294c82e6f30c71ced50c3d79e4746b5ad2e76d.tar.gz
otp-2e294c82e6f30c71ced50c3d79e4746b5ad2e76d.tar.bz2
otp-2e294c82e6f30c71ced50c3d79e4746b5ad2e76d.zip
Fix mnesia own small test framework so it works with the re-written tests.
Diffstat (limited to 'lib/mnesia/test/mt.erl')
-rw-r--r--lib/mnesia/test/mt.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/mnesia/test/mt.erl b/lib/mnesia/test/mt.erl
index f69c4a11fd..322bd52130 100644
--- a/lib/mnesia/test/mt.erl
+++ b/lib/mnesia/test/mt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -76,17 +76,24 @@ resolve(Suite0) when is_atom(Suite0) ->
Suite when is_atom(Suite) ->
{Suite, all};
{Suite, Case} ->
- {Suite, Case}
+ {Suite, is_group(Suite,Case)}
end;
resolve({Suite0, Case}) when is_atom(Suite0), is_atom(Case) ->
case alias(Suite0) of
Suite when is_atom(Suite) ->
- {Suite, Case};
+ {Suite, is_group(Suite,Case)};
{Suite, Case2} ->
- {Suite, Case2}
+ {Suite, is_group(Suite,Case2)}
end;
resolve(List) when is_list(List) ->
[resolve(Case) || Case <- List].
+
+is_group(Mod, Case) ->
+ try {_,_,_} = lists:keyfind(Case, 1, Mod:groups()),
+ {group, Case}
+ catch _:{badmatch,_} ->
+ Case
+ end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Run one or more test cases