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

« back to all changes in this revision

Viewing changes to lib/test_server/test/test_server_conf02_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
 
 
20
%%%------------------------------------------------------------------
 
21
%%% Test Server self test. 
 
22
%%%------------------------------------------------------------------
 
23
-module(test_server_conf02_SUITE).
 
24
-include_lib("test_server/include/test_server.hrl").
 
25
 
 
26
-compile(export_all).
 
27
 
 
28
all(doc) -> ["Test simple conf case structure, with and without nested cases"];
 
29
all(suite) -> 
 
30
    [
 
31
     {conf, conf1_init, [conf1_tc1, conf1_tc2], conf1_end},
 
32
 
 
33
     {conf, [], conf2_init, [conf2_tc1, conf2_tc2], conf2_end},
 
34
 
 
35
     {conf, conf3_init, [conf3_tc1, 
 
36
 
 
37
                         {conf, [], conf4_init, [conf4_tc1, conf4_tc2], conf4_end},
 
38
 
 
39
                         conf3_tc2], conf3_end},
 
40
 
 
41
     conf5 
 
42
    ].
 
43
 
 
44
 
 
45
%%---------- conf cases ----------
 
46
 
 
47
init_per_suite(Config) ->
 
48
    case ?config(data_dir,Config) of
 
49
        undefined -> exit(no_data_dir);
 
50
        _ -> ok
 
51
    end,    
 
52
    [{suite,init}|Config].
 
53
end_per_suite(Config) ->
 
54
    case ?config(data_dir,Config) of
 
55
        undefined -> exit(no_data_dir);
 
56
        _ -> ok
 
57
    end,    
 
58
    init = ?config(suite,Config),
 
59
    ok.
 
60
 
 
61
init_per_testcase(TC=conf1_tc1, Config) ->
 
62
    init = ?config(suite,Config),
 
63
    [{tc11,TC}|Config];
 
64
init_per_testcase(TC=conf1_tc2, Config) ->
 
65
    [{tc12,TC}|Config];
 
66
init_per_testcase(TC=conf2_tc1, Config) ->
 
67
    [{tc21,TC}|Config];
 
68
init_per_testcase(TC=conf2_tc2, Config) ->
 
69
    [{tc22,TC}|Config];
 
70
init_per_testcase(TC=conf3_tc1, Config) ->
 
71
    [{tc31,TC}|Config];
 
72
init_per_testcase(TC=conf3_tc2, Config) ->
 
73
    [{tc32,TC}|Config];
 
74
init_per_testcase(TC=conf4_tc1, Config) ->
 
75
    [{tc41,TC}|Config];
 
76
init_per_testcase(TC=conf4_tc2, Config) ->
 
77
    [{tc42,TC}|Config];
 
78
init_per_testcase(TC=conf5_tc1, Config) ->
 
79
    [{tc51,TC}|Config];
 
80
init_per_testcase(TC=conf5_tc2, Config) ->
 
81
    [{tc52,TC}|Config];
 
82
init_per_testcase(TC=conf6_tc1, Config) ->
 
83
    [{tc61,TC}|Config];
 
84
init_per_testcase(TC=conf6_tc2, Config) ->
 
85
    init = ?config(suite,Config),
 
86
    [{tc62,TC}|Config].
 
87
 
 
88
end_per_testcase(TC=conf1_tc1, Config) ->
 
89
    init = ?config(suite,Config),
 
90
    TC = ?config(tc11,Config),
 
91
    ok;
 
92
end_per_testcase(TC=conf1_tc2, Config) ->
 
93
    TC = ?config(tc12,Config),
 
94
    ok;
 
95
end_per_testcase(TC=conf2_tc1, Config) ->
 
96
    TC = ?config(tc21,Config),
 
97
    ok;
 
98
end_per_testcase(TC=conf2_tc2, Config) ->
 
99
    TC = ?config(tc22,Config),
 
100
    ok;
 
101
end_per_testcase(TC=conf3_tc1, Config) ->
 
102
    TC = ?config(tc31,Config),
 
103
    ok;
 
104
end_per_testcase(TC=conf3_tc2, Config) ->
 
105
    TC = ?config(tc32,Config),
 
106
    ok;
 
107
end_per_testcase(TC=conf4_tc1, Config) ->
 
108
    TC = ?config(tc41,Config),
 
109
    ok;
 
110
end_per_testcase(TC=conf4_tc2, Config) ->
 
111
    TC = ?config(tc42,Config),
 
112
    ok;
 
113
end_per_testcase(TC=conf5_tc1, Config) ->
 
114
    TC = ?config(tc51,Config),
 
115
    ok;
 
116
end_per_testcase(TC=conf5_tc2, Config) ->
 
117
    TC = ?config(tc52,Config),
 
118
    ok;
 
119
end_per_testcase(TC=conf6_tc1, Config) ->
 
120
    TC = ?config(tc61,Config),
 
121
    ok;
 
122
end_per_testcase(TC=conf6_tc2, Config) ->
 
123
    init = ?config(suite,Config),
 
124
    TC = ?config(tc62,Config),
 
125
    ok.
 
126
 
 
127
conf1_init(Config) when is_list(Config) ->
 
128
    init = ?config(suite,Config),
 
129
    [{cc1,conf1}|Config].
 
130
conf1_end(_Config) ->
 
131
    ok.
 
132
 
 
133
conf2_init(Config) when is_list(Config) ->
 
134
    [{cc2,conf2}|Config].
 
135
conf2_end(_Config) ->
 
136
    ok.
 
137
 
 
138
conf3_init(Config) when is_list(Config) ->
 
139
    [{cc3,conf3}|Config].
 
140
conf3_end(_Config) ->
 
141
    ok.
 
142
 
 
143
conf4_init(Config) when is_list(Config) ->
 
144
    [{cc4,conf4}|Config].
 
145
conf4_end(_Config) ->
 
146
    ok.
 
147
 
 
148
conf5_init(Config) when is_list(Config) ->
 
149
    [{cc5,conf5}|Config].
 
150
conf5_end(_Config) ->
 
151
    ok.
 
152
 
 
153
conf6_init(Config) when is_list(Config) ->
 
154
    init = ?config(suite,Config),
 
155
    [{cc6,conf6}|Config].
 
156
conf6_end(_Config) ->
 
157
    ok.
 
158
 
 
159
conf5(suite) ->                                 % test specification
 
160
    [{conf, conf5_init, [conf5_tc1, 
 
161
 
 
162
                         {conf, [], conf6_init, [conf6_tc1, conf6_tc2], conf6_end},
 
163
 
 
164
                         conf5_tc2], conf5_end}].
 
165
 
 
166
%%---------- test cases ----------
 
167
 
 
168
conf1_tc1(Config) when is_list(Config) ->
 
169
    case ?config(data_dir,Config) of
 
170
        undefined -> exit(no_data_dir);
 
171
        _ -> ok
 
172
    end,    
 
173
    init = ?config(suite,Config),
 
174
    conf1 = ?config(cc1,Config),
 
175
    conf1_tc1 = ?config(tc11,Config),
 
176
    ok.
 
177
conf1_tc2(Config) when is_list(Config) ->
 
178
    case ?config(priv_dir,Config) of
 
179
        undefined -> exit(no_priv_dir);
 
180
        _ -> ok
 
181
    end,    
 
182
    init = ?config(suite,Config),
 
183
    conf1 = ?config(cc1,Config),
 
184
    conf1_tc2 = ?config(tc12,Config),
 
185
    ok.
 
186
 
 
187
conf2_tc1(Config) when is_list(Config) ->
 
188
    init = ?config(suite,Config),
 
189
    undefined = ?config(cc1,Config),
 
190
    undefined = ?config(tc11,Config),
 
191
    conf2 = ?config(cc2,Config),
 
192
    conf2_tc1 = ?config(tc21,Config),
 
193
    ok.
 
194
conf2_tc2(Config) when is_list(Config) ->
 
195
    init = ?config(suite,Config),
 
196
    conf2 = ?config(cc2,Config),
 
197
    undefined = ?config(tc21,Config),
 
198
    conf2_tc2 = ?config(tc22,Config),
 
199
    ok.
 
200
 
 
201
conf3_tc1(Config) when is_list(Config) ->
 
202
    init = ?config(suite,Config),
 
203
    undefined = ?config(cc2,Config),
 
204
    undefined = ?config(tc22,Config),
 
205
    conf3 = ?config(cc3,Config),
 
206
    conf3_tc1 = ?config(tc31,Config),
 
207
    ok.
 
208
conf3_tc2(Config) when is_list(Config) ->
 
209
    init = ?config(suite,Config),
 
210
    conf3 = ?config(cc3,Config),
 
211
    undefined = ?config(cc4,Config),
 
212
    undefined = ?config(tc31,Config),
 
213
    undefined = ?config(tc41,Config),
 
214
    conf3_tc2 = ?config(tc32,Config),
 
215
    ok.
 
216
 
 
217
conf4_tc1(Config) when is_list(Config) ->
 
218
    init = ?config(suite,Config),
 
219
    case ?config(data_dir,Config) of
 
220
        undefined -> exit(no_data_dir);
 
221
        _ -> ok
 
222
    end,    
 
223
    undefined = ?config(cc1,Config),
 
224
    undefined = ?config(cc2,Config),
 
225
    conf3 = ?config(cc3,Config),
 
226
    conf4 = ?config(cc4,Config),
 
227
    undefined = ?config(tc32,Config),
 
228
    conf4_tc1 = ?config(tc41,Config),
 
229
    ok.
 
230
conf4_tc2(Config) when is_list(Config) ->
 
231
    init = ?config(suite,Config),
 
232
    case ?config(priv_dir,Config) of
 
233
        undefined -> exit(no_priv_dir);
 
234
        _ -> ok
 
235
    end,    
 
236
    conf3 = ?config(cc3,Config),
 
237
    conf4 = ?config(cc4,Config),
 
238
    undefined = ?config(tc41,Config),
 
239
    conf4_tc2 = ?config(tc42,Config),
 
240
    ok.
 
241
 
 
242
conf5_tc1(Config) when is_list(Config) ->
 
243
    init = ?config(suite,Config),
 
244
    case ?config(data_dir,Config) of
 
245
        undefined -> exit(no_data_dir);
 
246
        _ -> ok
 
247
    end,    
 
248
    undefined = ?config(cc1,Config),
 
249
    undefined = ?config(cc2,Config),
 
250
    undefined = ?config(cc3,Config),
 
251
    undefined = ?config(cc4,Config),
 
252
    conf5 = ?config(cc5,Config),
 
253
    undefined = ?config(tc42,Config),
 
254
    conf5_tc1 = ?config(tc51,Config),
 
255
    ok.
 
256
conf5_tc2(Config) when is_list(Config) ->
 
257
    init = ?config(suite,Config),
 
258
    case ?config(priv_dir,Config) of
 
259
        undefined -> exit(no_priv_dir);
 
260
        _ -> ok
 
261
    end,    
 
262
    conf5 = ?config(cc5,Config),
 
263
    undefined = ?config(cc6,Config),
 
264
    undefined = ?config(tc51,Config),
 
265
    undefined = ?config(tc62,Config),
 
266
    conf5_tc2 = ?config(tc52,Config),
 
267
    ok.
 
268
 
 
269
conf6_tc1(Config) when is_list(Config) ->
 
270
    init = ?config(suite,Config),
 
271
    case ?config(data_dir,Config) of
 
272
        undefined -> exit(no_data_dir);
 
273
        _ -> ok
 
274
    end,    
 
275
    undefined = ?config(cc1,Config),
 
276
    undefined = ?config(cc2,Config),
 
277
    undefined = ?config(cc3,Config),
 
278
    undefined = ?config(cc4,Config),
 
279
    conf5 = ?config(cc5,Config),
 
280
    conf6 = ?config(cc6,Config),
 
281
    undefined = ?config(tc52,Config),
 
282
    conf6_tc1 = ?config(tc61,Config),
 
283
    ok.
 
284
conf6_tc2(Config) when is_list(Config) ->
 
285
    init = ?config(suite,Config),
 
286
    case ?config(priv_dir,Config) of
 
287
        undefined -> exit(no_priv_dir);
 
288
        _ -> ok
 
289
    end,    
 
290
    conf5 = ?config(cc5,Config),
 
291
    conf6 = ?config(cc6,Config),
 
292
    undefined = ?config(tc61,Config),
 
293
    conf6_tc2 = ?config(tc62,Config),
 
294
    ok.