~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/mnesia/test/mnesia_SUITE.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%%
4
 
%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
 
4
%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
5
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
26
26
init_per_testcase(Func, Conf) ->
27
27
    mnesia_test_lib:init_per_testcase(Func, Conf).
28
28
 
29
 
fin_per_testcase(Func, Conf) ->
30
 
    mnesia_test_lib:fin_per_testcase(Func, Conf).
 
29
end_per_testcase(Func, Conf) ->
 
30
    mnesia_test_lib:end_per_testcase(Func, Conf).
31
31
 
32
32
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33
 
all(doc) ->
34
 
    ["Verify that Mnesia really is a distributed real-time DBMS",
35
 
     "This is the test suite of the Mnesia DBMS. The test suite",
36
 
     "covers many aspects of usage and is indended to be developed",
37
 
     "incrementally. The test suite is divided into a hierarchy of test",
38
 
     "suites where the leafs actually implements the test cases.",
39
 
     "The intention of each test case and sub test suite can be",
40
 
     "read in comments where they are implemented or in worst cases",
41
 
     "from their long mnemonic names. ",
42
 
     "",
43
 
     "The most simple test case of them all is called 'silly'",
44
 
     "and is useful to run now and then, e.g. when some new fatal",
45
 
     "bug has been introduced. It may be run even if Mnesia is in",
46
 
     "such a bad shape that the test machinery cannot be used.",
47
 
     "NB! Invoke the function directly with mnesia_SUITE:silly()",
48
 
     "and do not involve the normal test machinery."];
49
 
all(suite) ->
50
 
    [
51
 
     light,
52
 
     medium,
53
 
     heavy,
54
 
     clean_up_suite
55
 
    ].
 
33
suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
 
34
 
 
35
 
 
36
%% Verify that Mnesia really is a distributed real-time DBMS.
 
37
%% This is the test suite of the Mnesia DBMS. The test suite
 
38
%% covers many aspects of usage and is indended to be developed
 
39
%% incrementally. The test suite is divided into a hierarchy of test
 
40
%% suites where the leafs actually implements the test cases.
 
41
%% The intention of each test case and sub test suite can be
 
42
%% read in comments where they are implemented or in worst cases
 
43
%% from their long mnemonic names. 
 
44
%% 
 
45
%% The most simple test case of them all is called 'silly'
 
46
%% and is useful to run now and then, e.g. when some new fatal
 
47
%% bug has been introduced. It may be run even if Mnesia is in
 
48
%% such a bad shape that the test machinery cannot be used.
 
49
%% NB! Invoke the function directly with mnesia_SUITE:silly()
 
50
%% and do not involve the normal test machinery.
 
51
 
 
52
all() -> 
 
53
    [{group, light}, {group, medium}, {group, heavy},
 
54
     clean_up_suite].
 
55
 
 
56
groups() -> 
 
57
    %% The 'light' test suite runs a selected set of test suites and is
 
58
    %% intended to be the smallest test suite that is meaningful
 
59
    %% to run. It starts with an installation test (which in essence is the
 
60
    %% 'silly' test case) and then it covers all functions in the API in
 
61
    %% various depths. All configuration parameters and examples are also
 
62
    %% covered.
 
63
    [{light, [],
 
64
      [{group, install}, {group, nice}, {group, evil},
 
65
       {group, mnesia_frag_test, light}, {group, qlc},
 
66
       {group, registry}, {group, config}, {group, examples}]},
 
67
     {install, [], [{mnesia_install_test, all}]},
 
68
     {nice, [], [{mnesia_nice_coverage_test, all}]},
 
69
     {evil, [], [{mnesia_evil_coverage_test, all}]},
 
70
     {qlc, [], [{mnesia_qlc_test, all}]},
 
71
     {registry, [], [{mnesia_registry_test, all}]},
 
72
     {config, [], [{mnesia_config_test, all}]},
 
73
     {examples, [], [{mnesia_examples_test, all}]},
 
74
     %% The 'medium' test suite verfies the ACID (atomicity, consistency
 
75
     %% isolation and durability) properties and various recovery scenarios
 
76
     %% These tests may take quite while to run.
 
77
     {medium, [],
 
78
      [{group, install}, {group, atomicity},
 
79
       {group, isolation}, {group, durability},
 
80
       {group, recovery}, {group, consistency},
 
81
       {group, majority},
 
82
       {group, mnesia_frag_test, medium}]},
 
83
     {atomicity, [], [{mnesia_atomicity_test, all}]},
 
84
     {isolation, [], [{mnesia_isolation_test, all}]},
 
85
     {durability, [], [{mnesia_durability_test, all}]},
 
86
     {recovery, [], [{mnesia_recovery_test, all}]},
 
87
     {consistency, [], [{mnesia_consistency_test, all}]},
 
88
     {majority, [], [{mnesia_majority_test, all}]},
 
89
     %% The 'heavy' test suite runs some resource consuming tests and
 
90
     %% benchmarks
 
91
     {heavy, [], [{group, measure}]},
 
92
     {measure, [], [{mnesia_measure_test, all}]},
 
93
     {prediction, [],
 
94
      [{group, mnesia_measure_test, prediction}]},
 
95
     {fairness, [],
 
96
      [{group, mnesia_measure_test, fairness}]},
 
97
     {benchmarks, [],
 
98
      [{group, mnesia_measure_test, benchmarks}]},
 
99
     {consumption, [],
 
100
      [{group, mnesia_measure_test, consumption}]},
 
101
     {scalability, [],
 
102
      [{group, mnesia_measure_test, scalability}]},
 
103
     %% This test suite is an extract of the grand Mnesia suite
 
104
     %% it contains OTP R4B specific test cases
 
105
     {otp_r4b, [],
 
106
      [{mnesia_config_test, access_module},
 
107
       {mnesia_config_test, dump_log_load_regulation},
 
108
       {mnesia_config_test, embedded_mnemosyne},
 
109
       {mnesia_config_test, ignore_fallback_at_startup},
 
110
       {mnesia_config_test, max_wait_for_decision},
 
111
       {mnesia_consistency_test, consistency_after_restore},
 
112
       {mnesia_evil_backup, restore},
 
113
       {mnesia_evil_coverage_test, offline_set_master_nodes},
 
114
       {mnesia_evil_coverage_test, record_name},
 
115
       {mnesia_evil_coverage_test, user_properties},
 
116
       {mnesia_registry_test, all}, {group, otp_2363}]},
 
117
     %% Index on disc only tables
 
118
     {otp_2363, [],
 
119
      [{mnesia_dirty_access_test,
 
120
        dirty_index_match_object_disc_only},
 
121
       {mnesia_dirty_access_test, dirty_index_read_disc_only},
 
122
       {mnesia_dirty_access_test,
 
123
        dirty_index_update_bag_disc_only},
 
124
       {mnesia_dirty_access_test,
 
125
        dirty_index_update_set_disc_only},
 
126
       {mnesia_evil_coverage_test,
 
127
        create_live_table_index_disc_only}]}].
 
128
 
 
129
init_per_group(_GroupName, Config) ->
 
130
        Config.
 
131
 
 
132
end_per_group(_GroupName, Config) ->
 
133
        Config.
 
134
 
 
135
init_per_suite(Config) ->
 
136
    Config.
 
137
 
 
138
end_per_suite(Config) ->
 
139
    Config.
 
140
 
56
141
 
57
142
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58
143
silly() ->
59
144
    mnesia_install_test:silly().
60
145
    
61
146
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62
 
light(doc) ->
63
 
    ["The 'light' test suite runs a selected set of test suites and is",
64
 
     "intended to be the smallest test suite that is meaningful",
65
 
     "to run. It starts with an installation test (which in essence is the",
66
 
     "'silly' test case) and then it covers all functions in the API in",
67
 
     "various depths. All configuration parameters and examples are also",
68
 
     "covered."];
69
 
light(suite) ->
70
 
    [
71
 
     install,
72
 
     nice,
73
 
     evil,
74
 
     {mnesia_frag_test, light},
75
 
     qlc,
76
 
     registry,
77
 
     config,     
78
 
     examples
79
 
    ].
80
 
 
81
 
install(suite) ->
82
 
    [{mnesia_install_test, all}].
83
 
 
84
 
nice(suite) ->
85
 
    [{mnesia_nice_coverage_test, all}].
86
 
 
87
 
evil(suite) ->
88
 
    [{mnesia_evil_coverage_test, all}].
89
 
 
90
 
qlc(suite) ->
91
 
    [{mnesia_qlc_test, all}].
92
 
 
93
 
registry(suite) ->
94
 
    [{mnesia_registry_test, all}].
95
 
 
96
 
config(suite) ->
97
 
    [{mnesia_config_test, all}].
98
 
 
99
 
examples(suite) ->
100
 
    [{mnesia_examples_test, all}].
101
 
 
102
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103
 
medium(doc) ->
104
 
    ["The 'medium' test suite verfies the ACID (atomicity, consistency",
105
 
     "isolation and durability) properties and various recovery scenarios",
106
 
     "These tests may take quite while to run."];
107
 
medium(suite) ->
108
 
    [
109
 
     install,
110
 
     atomicity,
111
 
     isolation,
112
 
     durability,
113
 
     recovery,
114
 
     consistency,
115
 
     {mnesia_frag_test, medium}
116
 
    ].
117
 
 
118
 
atomicity(suite) ->
119
 
     [{mnesia_atomicity_test, all}].
120
 
   
121
 
isolation(suite) ->
122
 
    [{mnesia_isolation_test, all}].
123
 
 
124
 
durability(suite) ->
125
 
    [{mnesia_durability_test, all}].
126
 
 
127
 
recovery(suite) ->
128
 
    [{mnesia_recovery_test, all}].
129
 
 
130
 
consistency(suite) ->
131
 
     [{mnesia_consistency_test, all}].
132
 
   
133
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
134
 
heavy(doc) ->
135
 
    ["The 'heavy' test suite runs some resource consuming tests and",
136
 
     "benchmarks"];
137
 
heavy(suite) ->
138
 
    [measure].
139
 
 
140
 
measure(suite) ->
141
 
    [{mnesia_measure_test, all}].
142
 
 
143
 
prediction(suite) ->
144
 
    [{mnesia_measure_test, prediction}].
145
 
 
146
 
fairness(suite) ->
147
 
    [{mnesia_measure_test, fairness}].
148
 
 
149
 
benchmarks(suite) ->
150
 
    [{mnesia_measure_test, benchmarks}].
151
 
 
152
 
consumption(suite) ->
153
 
    [{mnesia_measure_test, consumption}].
154
 
 
155
 
scalability(suite) ->
156
 
    [{mnesia_measure_test, scalability}].
157
 
 
158
147
 
159
148
clean_up_suite(doc) -> ["Not a test case only kills mnesia and nodes, that where" 
160
149
                        "started during the tests"];
169
158
 
170
159
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171
160
 
172
 
otp_r4b(doc) ->
173
 
    ["This test suite is an extract of the grand Mnesia suite",
174
 
     "it contains OTP R4B specific test cases"];
175
 
otp_r4b(suite) ->
176
 
    [
177
 
     {mnesia_config_test, access_module},
178
 
     {mnesia_config_test, dump_log_load_regulation},
179
 
     {mnesia_config_test, embedded_mnemosyne},
180
 
     {mnesia_config_test, ignore_fallback_at_startup},
181
 
     {mnesia_config_test, max_wait_for_decision},
182
 
     {mnesia_consistency_test, consistency_after_restore},
183
 
     {mnesia_evil_backup, restore},
184
 
     {mnesia_evil_coverage_test, offline_set_master_nodes},
185
 
     {mnesia_evil_coverage_test, record_name},
186
 
     {mnesia_evil_coverage_test, user_properties},
187
 
     {mnesia_registry_test, all},
188
 
     otp_2363
189
 
    ].
190
161
 
191
 
otp_2363(doc) ->
192
 
    ["Index on disc only tables"];
193
 
otp_2363(suite) ->
194
 
    [
195
 
     {mnesia_dirty_access_test, dirty_index_match_object_disc_only},
196
 
     {mnesia_dirty_access_test,dirty_index_read_disc_only},
197
 
     {mnesia_dirty_access_test,dirty_index_update_bag_disc_only},
198
 
     {mnesia_dirty_access_test,dirty_index_update_set_disc_only},
199
 
     {mnesia_evil_coverage_test, create_live_table_index_disc_only}
200
 
    ].
201
162
    
202
163
 
203
164