~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/test_server/test/test_server_SUITE_data/test_server_conf01_SUITE.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - 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.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%%
 
4
%% Copyright Ericsson AB 2009-2011. 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_conf01_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
%%---------- conf cases ----------
 
45
 
 
46
conf1_init(Config) when is_list(Config) ->
 
47
    [{cc1,conf1}|Config].
 
48
conf1_end(_Config) ->
 
49
    ok.
 
50
 
 
51
conf2_init(Config) when is_list(Config) ->
 
52
    [{cc2,conf2}|Config].
 
53
conf2_end(_Config) ->
 
54
    ok.
 
55
 
 
56
conf3_init(Config) when is_list(Config) ->
 
57
    [{cc3,conf3}|Config].
 
58
conf3_end(_Config) ->
 
59
    ok.
 
60
 
 
61
conf4_init(Config) when is_list(Config) ->
 
62
    [{cc4,conf4}|Config].
 
63
conf4_end(_Config) ->
 
64
    ok.
 
65
 
 
66
conf5_init(Config) when is_list(Config) ->
 
67
    [{cc5,conf5}|Config].
 
68
conf5_end(_Config) ->
 
69
    ok.
 
70
 
 
71
conf6_init(Config) when is_list(Config) ->
 
72
    [{cc6,conf6}|Config].
 
73
conf6_end(_Config) ->
 
74
    ok.
 
75
 
 
76
 
 
77
conf5(suite) ->                                 % test specification
 
78
    [{conf, conf5_init, [conf5_tc1, 
 
79
 
 
80
                         {conf, [], conf6_init, [conf6_tc1, conf6_tc2], conf6_end},
 
81
 
 
82
                         conf5_tc2], conf5_end}].
 
83
 
 
84
 
 
85
%%---------- test cases ----------
 
86
 
 
87
conf1_tc1(Config) when is_list(Config) ->
 
88
    case ?config(data_dir,Config) of
 
89
        undefined -> exit(no_data_dir);
 
90
        _ -> ok
 
91
    end,    
 
92
    conf1 = ?config(cc1,Config),
 
93
    ok.
 
94
conf1_tc2(Config) when is_list(Config) ->
 
95
    case ?config(priv_dir,Config) of
 
96
        undefined -> exit(no_priv_dir);
 
97
        _ -> ok
 
98
    end,    
 
99
    conf1 = ?config(cc1,Config),
 
100
    ok.
 
101
 
 
102
conf2_tc1(Config) when is_list(Config) ->
 
103
    undefined = ?config(cc1,Config),
 
104
    case ?config(data_dir,Config) of
 
105
        undefined -> exit(no_data_dir);
 
106
        _ -> ok
 
107
    end,    
 
108
    conf2 = ?config(cc2,Config),
 
109
    ok.
 
110
conf2_tc2(Config) when is_list(Config) ->
 
111
    case ?config(priv_dir,Config) of
 
112
        undefined -> exit(no_priv_dir);
 
113
        _ -> ok
 
114
    end,    
 
115
    conf2 = ?config(cc2,Config),
 
116
    ok.
 
117
 
 
118
conf3_tc1(Config) when is_list(Config) ->
 
119
    undefined = ?config(cc1,Config),
 
120
    undefined = ?config(cc2,Config),
 
121
    conf3 = ?config(cc3,Config),
 
122
    ok.
 
123
conf3_tc2(Config) when is_list(Config) ->
 
124
    conf3 = ?config(cc3,Config),
 
125
    undefined = ?config(cc4,Config),
 
126
    ok.
 
127
 
 
128
conf4_tc1(Config) when is_list(Config) ->
 
129
    case ?config(data_dir,Config) of
 
130
        undefined -> exit(no_data_dir);
 
131
        _ -> ok
 
132
    end,    
 
133
    undefined = ?config(cc1,Config),
 
134
    undefined = ?config(cc2,Config),
 
135
    conf3 = ?config(cc3,Config),
 
136
    conf4 = ?config(cc4,Config),
 
137
    ok.
 
138
conf4_tc2(Config) when is_list(Config) ->
 
139
    case ?config(priv_dir,Config) of
 
140
        undefined -> exit(no_priv_dir);
 
141
        _ -> ok
 
142
    end,    
 
143
    conf3 = ?config(cc3,Config),
 
144
    conf4 = ?config(cc4,Config),
 
145
    ok.
 
146
 
 
147
conf5_tc1(Config) when is_list(Config) ->
 
148
    case ?config(data_dir,Config) of
 
149
        undefined -> exit(no_data_dir);
 
150
        _ -> ok
 
151
    end,    
 
152
    undefined = ?config(cc1,Config),
 
153
    undefined = ?config(cc2,Config),
 
154
    undefined = ?config(cc3,Config),
 
155
    undefined = ?config(cc4,Config),
 
156
    conf5 = ?config(cc5,Config),
 
157
    ok.
 
158
conf5_tc2(Config) when is_list(Config) ->
 
159
    case ?config(priv_dir,Config) of
 
160
        undefined -> exit(no_priv_dir);
 
161
        _ -> ok
 
162
    end,    
 
163
    conf5 = ?config(cc5,Config),
 
164
    undefined = ?config(cc6,Config),
 
165
    ok.
 
166
 
 
167
conf6_tc1(Config) when is_list(Config) ->
 
168
    case ?config(data_dir,Config) of
 
169
        undefined -> exit(no_data_dir);
 
170
        _ -> ok
 
171
    end,    
 
172
    undefined = ?config(cc1,Config),
 
173
    undefined = ?config(cc2,Config),
 
174
    undefined = ?config(cc3,Config),
 
175
    undefined = ?config(cc4,Config),
 
176
    conf5 = ?config(cc5,Config),
 
177
    conf6 = ?config(cc6,Config),
 
178
    ok.
 
179
conf6_tc2(Config) when is_list(Config) ->
 
180
    case ?config(priv_dir,Config) of
 
181
        undefined -> exit(no_priv_dir);
 
182
        _ -> ok
 
183
    end,    
 
184
    conf5 = ?config(cc5,Config),
 
185
    conf6 = ?config(cc6,Config),
 
186
    ok.
 
187