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

« back to all changes in this revision

Viewing changes to lib/snmp/test/snmp_agent_mibs_test.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
1
%% 
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2003-2010. 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
%%----------------------------------------------------------------------
27
27
%% Include files
28
28
%%----------------------------------------------------------------------
29
 
-include("test_server.hrl").
 
29
-include_lib("test_server/include/test_server.hrl").
30
30
-include("snmp_test_lib.hrl").
31
31
-include_lib("snmp/include/snmp_types.hrl").
32
32
-include_lib("snmp/include/SNMP-COMMUNITY-MIB.hrl").
39
39
%% External exports
40
40
%%----------------------------------------------------------------------
41
41
-export([
42
 
         all/1, 
43
 
         init_per_testcase/2, fin_per_testcase/2,
44
 
         init_all/1, finish_all/1, 
 
42
        all/0,groups/0,init_per_group/2,end_per_group/2, 
 
43
         init_per_testcase/2, end_per_testcase/2,
 
44
         init_per_suite/1, end_per_suite/1, 
45
45
 
46
46
         start_and_stop/1,
47
 
         size_check/1,
 
47
        
48
48
         size_check_ets/1,
49
49
         size_check_dets/1,
50
50
         size_check_mnesia/1,
58
58
%%----------------------------------------------------------------------
59
59
%% Internal exports
60
60
%%----------------------------------------------------------------------
61
 
-export([
62
 
        ]).
63
61
 
64
62
%%----------------------------------------------------------------------
65
63
%% Macros
100
98
init_per_testcase(_Case, Config) when is_list(Config) ->
101
99
    Config.
102
100
 
103
 
fin_per_testcase(size_check_dets, Config) when is_list(Config) ->
 
101
end_per_testcase(size_check_dets, Config) when is_list(Config) ->
104
102
    Dir = ?config(dets_dir, Config),
105
103
    ?line ok = ?DEL_DIR(Dir),
106
104
    lists:keydelete(dets_dir, 1, Config);
107
 
fin_per_testcase(size_check_mnesia, Config) when is_list(Config) ->
 
105
end_per_testcase(size_check_mnesia, Config) when is_list(Config) ->
108
106
    mnesia_stop(),
109
107
    Dir = ?config(mnesia_dir, Config),
110
108
    ?line ok = ?DEL_DIR(Dir),
111
109
    lists:keydelete(mnesia_dir, 1, Config);
112
 
fin_per_testcase(cache_test, Config) when is_list(Config) ->
 
110
end_per_testcase(cache_test, Config) when is_list(Config) ->
113
111
    Dog = ?config(watchdog, Config),
114
112
    test_server:timetrap_cancel(Dog),
115
113
    Config;
116
 
fin_per_testcase(_Case, Config) when is_list(Config) ->
 
114
end_per_testcase(_Case, Config) when is_list(Config) ->
117
115
    Config.
118
116
 
119
117
 
121
119
%% Test case definitions
122
120
%%======================================================================
123
121
 
124
 
all(suite) ->
125
 
    {conf, init_all, cases(), finish_all}.
126
 
 
127
 
cases() ->
128
 
    [
129
 
     start_and_stop,
130
 
     load_unload,
131
 
     size_check,
132
 
     me_lookup,
133
 
     which_mib,
134
 
     cache_test
135
 
    ].
136
 
 
137
 
init_all(Config) when is_list(Config) ->
 
122
all() -> 
 
123
cases().
 
124
 
 
125
groups() -> 
 
126
    [{size_check, [],
 
127
  [size_check_ets, size_check_dets, size_check_mnesia]}].
 
128
 
 
129
init_per_group(_GroupName, Config) ->
 
130
        Config.
 
131
 
 
132
end_per_group(_GroupName, Config) ->
 
133
        Config.
 
134
 
 
135
 
 
136
cases() -> 
 
137
[start_and_stop, load_unload, {group, size_check},
 
138
 me_lookup, which_mib, cache_test].
 
139
 
 
140
init_per_suite(Config) when is_list(Config) ->
138
141
    %% Data dir points wrong
139
142
    DataDir0     = ?config(data_dir, Config),
140
143
    DataDir1     = filename:split(filename:absname(DataDir0)),
142
145
    DataDir      = filename:join(lists:reverse(DataDir2) ++ [?snmp_test_data]),
143
146
    [{snmp_data_dir, DataDir ++ "/"}|Config].
144
147
 
145
 
finish_all(Config) when is_list(Config) ->
 
148
end_per_suite(Config) when is_list(Config) ->
146
149
    lists:keydelete(snmp_data_dir, 1, Config).
147
150
 
148
151
 
217
220
 
218
221
%% ---------------------------------------------------------------------
219
222
 
220
 
size_check(suite) ->
221
 
    [
222
 
     size_check_ets,
223
 
     size_check_dets,
224
 
     size_check_mnesia
225
 
    ].
226
223
 
227
224
size_check_ets(suite) ->
228
225
    [];