~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/common_test/test/ct_groups_test_1_SUITE_data/groups_1/test/groups_12_SUITE.erl

  • Committer: Elliot Murphy
  • Date: 2010-06-08 03:55:44 UTC
  • mfrom: (3.5.6 squeeze)
  • Revision ID: elliot@elliotmurphy.com-20100608035544-dd8zh2swk7jr5rz2
* Merge with Debian unstable; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Added missing symlinks to /usr/include for a few new header files.
* Fixed generation of ${erlang-base:Depends} and ${erlang-x11:Depends}
  substitution variables.
* Added a fix for a re:compile/2 crash on a long regular expression.
* Changed urgency to medium as the change fixes a security bug.
* Manpages in section 1 are needed even if only arch-dependent packages are
  built. So, re-enabled them.
* Fixed HiPE architecture recognition for powerpc Debian architecture.
* Moved xsltproc and fop to build-depends-indep and do not build
  documentation if only architecture-specific packages are built.
* Refreshed all patches.
* Made Emacs look in man5 and man7 for Erlang manpages and added code
  skeleton files to erlang-mode package.
* New upstream release.
* Moved manpages from incorrect sections 4 and 6 to correct 5 and 7
  (closes: #498492).
* Made manpages regexp in Emacs mode match only 3erl pages in section 3.
* Removed docb_gen script which is no longer needed to build manpages.
* Added erlang-doc package which contains documentation in HTML and PDF
  formats. This package replaces erlang-doc-html package and it's easier
  to synchronize it with the main Erlang packages as it's built from
  a single source package (closes: #558451).
* Removed RPATH from ssl and crypto application binaries as required by
  Debian policy.
* Added libwxgtk2.4-dev and libwxgtk2.6-dev to build conflicts.
* Added a few dpendencies for erlang-dialyzer, erlang-et, erlang-observer
  and erlang-examples packages which now call functions from more modules
  than in 1:13.b.3.
* Added a workaround which disables vfork() for hppa architecture
  (closes: #562218).
* Strictened check for JDK 1.5 adding a call to String(int[], int, int)
  because GCJ 4.4 doesn't implement it and OpenJDK isn't available for all
  architectures.
* Fixed erlang-manpages package section.
* Made erlang-depends add only substvars which are requested in
  debian/control file. This minimizes number of warnings from dh_gencontrol.
  Also, improved descriptions of the functions in erlang-depends escript.
* Added erlang-erl-docgen package to erlang-nox dependencies.
* Made dummy packages erlang-nox and erlang-x11 architecture all.
* Cleaned up working with custom substitution variables in debian/rules.
* Reorganized debian/rules to ensure that manpages arent built twice, and
  aren't built at all if only architecture-dependent packages are requested.
* Fixed project links in README.Debian.
* Added a new package erlang-jinterface which provides tools for
  communication of Java programs with Erlang processes. This adds build
  depandency on default-jdk and as a result enables Java module for IDL
  compiler.
* Bumped standards version to 3.8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%%
 
4
%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
 
5
%%
 
6
%% The contents of this file are subject to the Erlang Public License,
 
7
%% Version 1.1, (the "License"); you may not use this file except in
 
8
%% compliance with the License. You should have received a copy of the
 
9
%% Erlang Public License along with this software. If not, it can be
 
10
%% retrieved online at http://www.erlang.org/.
 
11
%%
 
12
%% Software distributed under the License is distributed on an "AS IS"
 
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
14
%% the License for the specific language governing rights and limitations
 
15
%% under the License.
 
16
%%
 
17
%% %CopyrightEnd%
 
18
%%
 
19
-module(groups_12_SUITE).
 
20
 
 
21
-compile(export_all).
 
22
 
 
23
-include_lib("common_test/include/ct.hrl").
 
24
 
 
25
%%====================================================================
 
26
%% COMMON TEST CALLBACK FUNCTIONS
 
27
%%====================================================================
 
28
 
 
29
suite() ->
 
30
    [{timetrap,{minutes,1}}].
 
31
 
 
32
groups() ->
 
33
    [ 
 
34
      {test_group_1a, [shuffle], [testcase_1a,testcase_1b,testcase_1c]},
 
35
      
 
36
      {test_group_1b, [parallel], [testcase_1a,testcase_1b]},
 
37
      
 
38
      {test_group_2, [parallel], [testcase_2a,
 
39
                                  
 
40
                                  {test_group_3, [{repeat,1}], 
 
41
                                   [testcase_3a, testcase_3b]},                   
 
42
                                  
 
43
                                  testcase_2b]},
 
44
      
 
45
      {test_group_4, [{test_group_5, [parallel], [testcase_5a,
 
46
                                                  
 
47
                                                  {group, test_group_6},
 
48
                                          
 
49
                                                  testcase_5b]}]},
 
50
      
 
51
      {test_group_6, [parallel], [{group, test_group_7}]},
 
52
      
 
53
      {test_group_7, [sequence], [testcase_7a,testcase_7b]}      
 
54
     ].
 
55
            
 
56
all() -> 
 
57
    [{group, test_group_1a},
 
58
     {group, test_group_1b},
 
59
     testcase_1,
 
60
     testcase_2,
 
61
     {group, test_group_2},
 
62
     testcase_3,
 
63
     {group, test_group_4}].
 
64
 
 
65
%% this func only for internal test purposes
 
66
grs_and_tcs() ->
 
67
    {[
 
68
      test_group_1a, test_group_1b, 
 
69
      test_group_2, test_group_3,
 
70
      test_group_4, test_group_5,
 
71
      test_group_6, test_group_7
 
72
     ],     
 
73
     [
 
74
      testcase_1a, testcase_1b, testcase_1c,
 
75
      testcase_1,
 
76
      testcase_2, 
 
77
      testcase_2a, testcase_2b,
 
78
      testcase_3a, testcase_3b,
 
79
      testcase_3,
 
80
      testcase_5a, testcase_5b,
 
81
      testcase_7a, testcase_7b
 
82
     ]}.
 
83
 
 
84
%%--------------------------------------------------------------------
 
85
%% Suite Configuration
 
86
%%--------------------------------------------------------------------
 
87
 
 
88
init_per_suite(Config) ->
 
89
    [{suite,init}|Config].
 
90
 
 
91
end_per_suite(Config) ->
 
92
    init = ?config(suite,Config).
 
93
 
 
94
%%--------------------------------------------------------------------
 
95
%% Group Configuration
 
96
%%--------------------------------------------------------------------
 
97
 
 
98
init_per_group(Group, Config) ->
 
99
    Cmt =
 
100
        case {Group,?config(tc_group_properties,Config)} of
 
101
            {test_group_1a,[{shuffle,S},{name,test_group_1a}]} -> 
 
102
                io_lib:format("shuffled, ~w", [S]);
 
103
            {test_group_1b,[{name,test_group_1b},parallel]} -> "parallel";
 
104
            {test_group_2,[{name,test_group_2},parallel]} -> "parallel";
 
105
            {test_group_3,[{name,test_group_3},{repeat,1}]} -> "repeat 1";
 
106
            {test_group_3,[{name,test_group_3}]} -> "repeat 0";
 
107
            {test_group_4,[{name,test_group_4}]} -> ok;
 
108
            {test_group_5,[{name,test_group_5},parallel]} -> "parallel";
 
109
            {test_group_6,[{name,test_group_6},parallel]} -> "parallel";
 
110
            {test_group_7,[{name,test_group_7},sequence]} -> "sequence"
 
111
        end,
 
112
    {Grs,_} = grs_and_tcs(),
 
113
    case lists:member(Group, Grs) of
 
114
        true ->
 
115
            init = ?config(suite,Config),
 
116
            ct:comment(io_lib:format("~w, ~s", [Group,Cmt])),
 
117
            [{Group,Group} | Config];
 
118
        false ->
 
119
            ct:fail({bad_group,Group})
 
120
    end.
 
121
 
 
122
end_per_group(Group, Config) ->
 
123
    {Grs,_} = grs_and_tcs(),
 
124
    case lists:member(Group, Grs) of
 
125
        true ->
 
126
            init = ?config(suite,Config),
 
127
            Group = ?config(Group,Config),
 
128
            ok;
 
129
        false ->
 
130
            ct:fail({bad_group,Group})
 
131
    end.
 
132
 
 
133
%%--------------------------------------------------------------------
 
134
%% Testcase Configuration
 
135
%%--------------------------------------------------------------------
 
136
 
 
137
init_per_testcase(TestCase, Config) ->
 
138
    {_,TCs} = grs_and_tcs(),
 
139
    case lists:member(TestCase, TCs) of
 
140
        true ->     
 
141
            init = ?config(suite,Config),
 
142
            [{TestCase,TestCase} | Config];
 
143
        false ->
 
144
            ct:fail({unknown_testcase,TestCase})
 
145
    end.
 
146
 
 
147
end_per_testcase(TestCase, Config) ->
 
148
    {_,TCs} = grs_and_tcs(),
 
149
    case lists:member(TestCase, TCs) of
 
150
        true ->     
 
151
            init = ?config(suite,Config),
 
152
            TestCase = ?config(TestCase,Config),
 
153
            ok;
 
154
        false ->
 
155
            ct:fail({unknown_testcase,TestCase})
 
156
    end.
 
157
 
 
158
 
 
159
%%--------------------------------------------------------------------
 
160
%% Testcases
 
161
%%--------------------------------------------------------------------
 
162
 
 
163
testcase_1a() -> 
 
164
    [].
 
165
testcase_1a(Config) ->
 
166
    init = ?config(suite,Config),
 
167
    case ?config(test_group_1a,Config) of
 
168
        test_group_1a -> ok;
 
169
        _ ->     
 
170
            case ?config(test_group_1b,Config) of
 
171
                test_group_1b -> ok;
 
172
                _ -> ct:fail(no_group_data)
 
173
            end
 
174
    end,
 
175
    testcase_1a = ?config(testcase_1a,Config),
 
176
    ok.
 
177
testcase_1b() -> 
 
178
    [].
 
179
testcase_1b(Config) ->
 
180
    init = ?config(suite,Config),
 
181
    case ?config(test_group_1a,Config) of
 
182
        test_group_1a -> ok;
 
183
        _ ->     
 
184
            case ?config(test_group_1b,Config) of
 
185
                test_group_1b -> ok;
 
186
                _ -> ct:fail(no_group_data)
 
187
            end
 
188
    end,
 
189
    undefined = ?config(testcase_1a,Config),
 
190
    testcase_1b = ?config(testcase_1b,Config),
 
191
    ok.
 
192
 
 
193
testcase_1c() -> 
 
194
    [].
 
195
testcase_1c(Config) ->
 
196
    init = ?config(suite,Config),
 
197
    case ?config(test_group_1a,Config) of
 
198
        test_group_1a -> ok;
 
199
        _ ->     
 
200
            case ?config(test_group_1b,Config) of
 
201
                test_group_1b -> ok;
 
202
                _ -> ct:fail(no_group_data)
 
203
            end
 
204
    end,
 
205
    undefined = ?config(testcase_1b,Config),
 
206
    testcase_1c = ?config(testcase_1c,Config),
 
207
    ok.
 
208
 
 
209
testcase_1() -> 
 
210
    [].
 
211
testcase_1(Config) ->   
 
212
    init = ?config(suite,Config),
 
213
    testcase_1 = ?config(testcase_1,Config),
 
214
    ok.
 
215
 
 
216
testcase_2() -> 
 
217
    [].
 
218
testcase_2(Config) ->
 
219
    init = ?config(suite,Config),
 
220
    undefined = ?config(test_group_1a,Config),
 
221
    undefined = ?config(test_group_1b,Config),
 
222
    testcase_2 = ?config(testcase_2,Config),
 
223
    ok.
 
224
 
 
225
testcase_2a() -> 
 
226
    [].
 
227
testcase_2a(Config) ->
 
228
    init = ?config(suite,Config),
 
229
    test_group_2 = ?config(test_group_2,Config),
 
230
    testcase_2a = ?config(testcase_2a,Config),
 
231
    ok.
 
232
testcase_2b() -> 
 
233
    [].
 
234
testcase_2b(Config) ->
 
235
    init = ?config(suite,Config),
 
236
    test_group_2 = ?config(test_group_2,Config),
 
237
    undefined = ?config(testcase_2a,Config),
 
238
    testcase_2b = ?config(testcase_2b,Config),
 
239
    ok.
 
240
 
 
241
testcase_3a() -> 
 
242
    [].
 
243
testcase_3a(Config) ->
 
244
    init = ?config(suite,Config),
 
245
    test_group_2 = ?config(test_group_2,Config),
 
246
    test_group_3 = ?config(test_group_3,Config),
 
247
    undefined = ?config(testcase_2b,Config),
 
248
    testcase_3a = ?config(testcase_3a,Config),
 
249
    ok.
 
250
testcase_3b() -> 
 
251
    [].
 
252
testcase_3b(Config) ->
 
253
    init = ?config(suite,Config),
 
254
    test_group_2 = ?config(test_group_2,Config),
 
255
    test_group_3 = ?config(test_group_3,Config),
 
256
    undefined = ?config(testcase_3a,Config),
 
257
    testcase_3b = ?config(testcase_3b,Config),
 
258
    ok.
 
259
 
 
260
testcase_3() -> 
 
261
    [].
 
262
testcase_3(Config) ->
 
263
    init = ?config(suite,Config),
 
264
    undefined = ?config(test_group_2,Config),
 
265
    undefined = ?config(test_group_3,Config),
 
266
    testcase_3 = ?config(testcase_3,Config),
 
267
    ok.
 
268
 
 
269
testcase_5a() -> 
 
270
    [].
 
271
testcase_5a(Config) ->
 
272
    init = ?config(suite,Config),
 
273
    undefined = ?config(test_group_3,Config),
 
274
    test_group_4 = ?config(test_group_4,Config),
 
275
    test_group_5 = ?config(test_group_5,Config),
 
276
    undefined = ?config(testcase_3,Config),
 
277
    testcase_5a = ?config(testcase_5a,Config),
 
278
    ok.
 
279
testcase_5b() -> 
 
280
    [].
 
281
testcase_5b(Config) ->
 
282
    init = ?config(suite,Config),
 
283
    test_group_4 = ?config(test_group_4,Config),
 
284
    test_group_5 = ?config(test_group_5,Config),
 
285
    undefined = ?config(testcase_5a,Config),
 
286
    testcase_5b = ?config(testcase_5b,Config),
 
287
    ok.
 
288
 
 
289
testcase_7a() -> 
 
290
    [].
 
291
testcase_7a(Config) ->
 
292
    init = ?config(suite,Config),
 
293
    undefined = ?config(test_group_3,Config),
 
294
    test_group_4 = ?config(test_group_4,Config),
 
295
    test_group_5 = ?config(test_group_5,Config),
 
296
    test_group_6 = ?config(test_group_6,Config),
 
297
    test_group_7 = ?config(test_group_7,Config),
 
298
    testcase_7a = ?config(testcase_7a,Config),
 
299
    ok.
 
300
testcase_7b() -> 
 
301
    [].
 
302
testcase_7b(Config) ->
 
303
    init = ?config(suite,Config),
 
304
    test_group_4 = ?config(test_group_4,Config),
 
305
    test_group_5 = ?config(test_group_5,Config),
 
306
    test_group_6 = ?config(test_group_6,Config),
 
307
    test_group_7 = ?config(test_group_7,Config),
 
308
    undefined = ?config(testcase_7a,Config),
 
309
    testcase_7b = ?config(testcase_7b,Config),
 
310
    ok.