aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/test/mt.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-05-12 10:10:58 +0200
committerDan Gudmundsson <[email protected]>2011-05-12 10:10:58 +0200
commitf4a71c8cf2a98b80e309fa824bc8d6cfad869530 (patch)
treee9b9243f33bacc97aba48b581c60bdd9d49d3b0e /lib/mnesia/test/mt.erl
parent5703c55ea47c52a8dc8475085a8657422da3535e (diff)
parent990d05d600ca428887b42be50dad7412be0c6fdf (diff)
downloadotp-f4a71c8cf2a98b80e309fa824bc8d6cfad869530.tar.gz
otp-f4a71c8cf2a98b80e309fa824bc8d6cfad869530.tar.bz2
otp-f4a71c8cf2a98b80e309fa824bc8d6cfad869530.zip
Merge branch 'dgud/mnesia/test-fixes' into dev
* dgud/mnesia/test-fixes: Verify that remote data is commited before dirty ops begin 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