aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/test/mnesia_qlc_test.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2010-10-12 10:37:41 +0200
committerLukas Larsson <[email protected]>2011-02-17 17:25:12 +0100
commit486455c2ecae11713fc8750a127caf2c853bedee (patch)
treeb2c77d8c81ccbf77c9b38237c698142878d8e7e6 /lib/mnesia/test/mnesia_qlc_test.erl
parent6261f06d39e990b45f08b79edebe7b18a6eb9f01 (diff)
downloadotp-486455c2ecae11713fc8750a127caf2c853bedee.tar.gz
otp-486455c2ecae11713fc8750a127caf2c853bedee.tar.bz2
otp-486455c2ecae11713fc8750a127caf2c853bedee.zip
Update mnesia tests to conform with common_test standard
Diffstat (limited to 'lib/mnesia/test/mnesia_qlc_test.erl')
-rw-r--r--lib/mnesia/test/mnesia_qlc_test.erl50
1 files changed, 26 insertions, 24 deletions
diff --git a/lib/mnesia/test/mnesia_qlc_test.erl b/lib/mnesia/test/mnesia_qlc_test.erl
index 4d164cf1e6..288bd3c2db 100644
--- a/lib/mnesia/test/mnesia_qlc_test.erl
+++ b/lib/mnesia/test/mnesia_qlc_test.erl
@@ -22,7 +22,7 @@
-compile(export_all).
--export([all/1]).
+-export([all/0,groups/0,init_per_group/2,end_per_group/2]).
-include("mnesia_test_lib.hrl").
-include_lib("stdlib/include/qlc.hrl").
@@ -34,17 +34,31 @@ init_per_testcase(Func, Conf) ->
end_per_testcase(Func, Conf) ->
mnesia_test_lib:end_per_testcase(Func, Conf).
-all(doc) ->
- ["Test that the qlc mnesia interface works as expected."];
-all(suite) ->
- case code:which(qlc) of
- non_existing -> [];
- _ ->
- all_qlc()
- end.
+all() ->
+case code:which(qlc) of
+ non_existing -> [];
+ _ -> all_qlc()
+end.
+
+groups() ->
+ [{dirty, [],
+ [dirty_nice_ram_copies, dirty_nice_disc_copies,
+ dirty_nice_disc_only_copies]},
+ {trans, [],
+ [trans_nice_ram_copies, trans_nice_disc_copies,
+ trans_nice_disc_only_copies, {group, atomic}]},
+ {atomic, [], [atomic_eval]}].
+
+init_per_group(_GroupName, Config) ->
+ Config.
-all_qlc() ->
- [dirty, trans, frag, info, mnesia_down].
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
+all_qlc() ->
+[{group, dirty}, {group, trans}, frag, info,
+ mnesia_down].
init_testcases(Type,Config) ->
Nodes = [N1,N2] = ?acquire_nodes(2, Config),
@@ -59,10 +73,6 @@ init_testcases(Type,Config) ->
Nodes.
%% Test cases
-dirty(suite) ->
- [dirty_nice_ram_copies,
- dirty_nice_disc_copies,
- dirty_nice_disc_only_copies].
dirty_nice_ram_copies(Setup) -> dirty_nice(Setup,ram_copies).
dirty_nice_disc_copies(Setup) -> dirty_nice(Setup,disc_copies).
@@ -109,12 +119,6 @@ dirty_nice(Config, Type) when is_list(Config) ->
end,
?verify_mnesia(Ns, []).
-trans(suite) ->
- [trans_nice_ram_copies,
- trans_nice_disc_copies,
- trans_nice_disc_only_copies,
- atomic
- ].
trans_nice_ram_copies(Setup) -> trans_nice(Setup,ram_copies).
trans_nice_disc_copies(Setup) -> trans_nice(Setup,disc_copies).
@@ -182,9 +186,7 @@ recs() ->
"-record(b, {k,v}). "
"-record(k, {t,v}). "
>>.
-
-atomic(suite) -> [atomic_eval];
-atomic(doc) -> [].
+
atomic_eval(suite) -> [];
atomic_eval(doc) -> [];