aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_app_test.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-02-21 12:21:29 +0100
committerMicael Karlberg <[email protected]>2012-02-22 14:53:09 +0100
commit6ac569677be3f56e8539394bbf3b7d29e62aa042 (patch)
tree57f28ae455203fe136eb5a5728861f8240d0f35e /lib/snmp/test/snmp_app_test.erl
parentc27def2281391d4c70791f7406c1eee4f08c18da (diff)
downloadotp-6ac569677be3f56e8539394bbf3b7d29e62aa042.tar.gz
otp-6ac569677be3f56e8539394bbf3b7d29e62aa042.tar.bz2
otp-6ac569677be3f56e8539394bbf3b7d29e62aa042.zip
[snmp] Tests for new manager net-if-mt module
Updated manager test suite with groups that tests the new net-if module, snmpm_net_if_mt. Also fixed the suite, group and test-case init functions for a number of sub-suites. OTP-9876
Diffstat (limited to 'lib/snmp/test/snmp_app_test.erl')
-rw-r--r--lib/snmp/test/snmp_app_test.erl40
1 files changed, 27 insertions, 13 deletions
diff --git a/lib/snmp/test/snmp_app_test.erl b/lib/snmp/test/snmp_app_test.erl
index bc62c8d530..825a232c99 100644
--- a/lib/snmp/test/snmp_app_test.erl
+++ b/lib/snmp/test/snmp_app_test.erl
@@ -23,8 +23,8 @@
-module(snmp_app_test).
-export([
- all/0,groups/0,init_per_group/2,end_per_group/2, init_per_suite/1,
- end_per_suite/1,
+ all/0, groups/0, init_per_group/2, end_per_group/2,
+ init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2,
fields/1,
@@ -52,33 +52,47 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
all() ->
-Cases = [fields, modules, exportall, app_depend,
- undef_funcs, {group, start_and_stop}],
- Cases.
+ Cases =
+ [
+ fields,
+ modules,
+ exportall,
+ app_depend,
+ undef_funcs,
+ {group, start_and_stop}
+ ],
+ Cases.
groups() ->
[{start_and_stop, [],
- [start_and_stop_empty, start_and_stop_with_agent,
- start_and_stop_with_manager,
- start_and_stop_with_agent_and_manager,
- start_epmty_and_then_agent_and_manager_and_stop,
- start_with_agent_and_then_manager_and_stop,
- start_with_manager_and_then_agent_and_stop]}].
+ [start_and_stop_empty,
+ start_and_stop_with_agent,
+ start_and_stop_with_manager,
+ start_and_stop_with_agent_and_manager,
+ start_epmty_and_then_agent_and_manager_and_stop,
+ start_with_agent_and_then_manager_and_stop,
+ start_with_manager_and_then_agent_and_stop]}].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
init_per_suite(Config) when is_list(Config) ->
?DISPLAY_SUITE_INFO(),
+
+ %% Note that part of this stuff (the suite top dir creation)
+ %% may already be done (if we run the entire snmp suite).
+
PrivDir = ?config(priv_dir, Config),
TopDir = filename:join(PrivDir, app),
case file:make_dir(TopDir) of
ok ->
ok;
+ {error, eexist} ->
+ ok;
Error ->
fail({failed_creating_subsuite_top_dir, Error})
end,