diff options
Diffstat (limited to 'lib/snmp/test')
-rw-r--r-- | lib/snmp/test/snmp_agent_test.erl | 48 | ||||
-rw-r--r-- | lib/snmp/test/snmp_app_test.erl | 3 | ||||
-rw-r--r-- | lib/snmp/test/snmp_test_lib.erl | 12 |
3 files changed, 39 insertions, 24 deletions
diff --git a/lib/snmp/test/snmp_agent_test.erl b/lib/snmp/test/snmp_agent_test.erl index b5acf7cd87..8ee5dd534d 100644 --- a/lib/snmp/test/snmp_agent_test.erl +++ b/lib/snmp/test/snmp_agent_test.erl @@ -224,8 +224,7 @@ groups() -> }, {tickets2, [], [otp8395, otp9884]}, {otp_4394, [], [otp_4394_test]}, - {otp_7157, [], [otp_7157_test] - } + {otp_7157, [], [otp_7157_test]} ]. @@ -621,13 +620,13 @@ init_mib_storage_ets(Config) when is_list(Config) -> init_mib_storage_dets(Config) when is_list(Config) -> ?LOG("init_mib_storage_ets -> entry", []), - ?line AgentDir = ?GCONF(agent_dir, Config), - MibStorage = {snmp_mib_storage,{dets,AgentDir}}, + ?line AgentDbDir = ?GCONF(agent_db_dir, Config), + MibStorage = {snmp_mib_storage, {dets, AgentDbDir}}, init_ms(Config, [MibStorage]). init_mib_storage_mnesia(Config) when is_list(Config) -> ?LOG("init_mib_storage_ets -> entry", []), - MibStorage = {snmp_mib_storage,{mnesia,[]}}, + MibStorage = {snmp_mib_storage, {mnesia,[]}}, init_ms(Config, [MibStorage]). init_ms(Config, Opts) when is_list(Config) -> @@ -650,8 +649,8 @@ init_size_check_mse(Config) when is_list(Config) -> init_size_check_ms(Config, [MibStorage]). init_size_check_msd(Config) when is_list(Config) -> - AgentDir = ?GCONF(agent_dir, Config), - MibStorage = {snmp_mib_storage, {dets, AgentDir}}, + AgentDbDir = ?GCONF(agent_db_dir, Config), + MibStorage = {snmp_mib_storage, {dets, AgentDbDir}}, init_size_check_ms(Config, [MibStorage]). init_size_check_msm(Config) when is_list(Config) -> @@ -673,22 +672,24 @@ init_size_check_ms(Config, Opts) when is_list(Config) -> ?SKIP({failed_starting_crypto, Reason}) end, create_tables(SaNode), - AgentDir = ?GCONF(agent_dir, Config), - MgrDir = ?GCONF(mgr_dir, Config), - Ip = ?GCONF(ip, Config), - ?line ok = - config([v3], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)), + AgentConfDir = ?GCONF(agent_conf_dir, Config), + MgrDir = ?GCONF(mgr_dir, Config), + Ip = ?GCONF(ip, Config), + ?line ok = config([v3], MgrDir, AgentConfDir, + tuple_to_list(Ip), tuple_to_list(Ip)), [{vsn, v3} | start_v3_agent(Config, Opts)]. init_varm_mib_storage_dets(Config) when is_list(Config) -> ?LOG("init_varm_mib_storage_dets -> entry", []), - ?line SaNode = ?GCONF(snmp_sa, Config), + ?line SaNode = ?GCONF(snmp_sa, Config), ?line create_tables(SaNode), - ?line AgentDir = ?GCONF(agent_dir, Config), - ?line MgrDir = ?GCONF(mgr_dir, Config), - ?line Ip = ?GCONF(ip, Config), - ?line config([v1], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)), - MibStorage = {snmp_mib_storage,{dets,AgentDir}}, + ?line AgentDbDir = ?GCONF(agent_db_dir, Config), + ?line AgentConfDir = ?GCONF(agent_conf_dir, Config), + ?line MgrDir = ?GCONF(mgr_dir, Config), + ?line Ip = ?GCONF(ip, Config), + ?line config([v1], MgrDir, AgentConfDir, + tuple_to_list(Ip), tuple_to_list(Ip)), + MibStorage = {snmp_mib_storage, {dets, AgentDbDir}}, MasterAgentVerbosity = {snmp_master_agent_verbosity, trace}, MibsVerbosity = {snmp_mibserver_verbosity, trace}, SymStoreVerbosity = {snmp_symbolic_store_verbosity, trace}, @@ -697,12 +698,13 @@ init_varm_mib_storage_dets(Config) when is_list(Config) -> init_varm_mib_storage_mnesia(Config) when is_list(Config) -> ?LOG("init_varm_mib_storage_mnesia -> entry", []), - ?line SaNode = ?GCONF(snmp_sa, Config), + ?line SaNode = ?GCONF(snmp_sa, Config), ?line create_tables(SaNode), - ?line AgentDir = ?GCONF(agent_dir, Config), - ?line MgrDir = ?GCONF(mgr_dir, Config), - ?line Ip = ?GCONF(ip, Config), - ?line config([v1], MgrDir, AgentDir, tuple_to_list(Ip), tuple_to_list(Ip)), + ?line AgentConfDir = ?GCONF(agent_conf_dir, Config), + ?line MgrDir = ?GCONF(mgr_dir, Config), + ?line Ip = ?GCONF(ip, Config), + ?line config([v1], MgrDir, AgentConfDir, + tuple_to_list(Ip), tuple_to_list(Ip)), MibStorage = {snmp_mib_storage,{mnesia,[]}}, MasterAgentVerbosity = {snmp_master_agent_verbosity, trace}, MibsVerbosity = {snmp_mibserver_verbosity, trace}, diff --git a/lib/snmp/test/snmp_app_test.erl b/lib/snmp/test/snmp_app_test.erl index 825a232c99..0a320dbbce 100644 --- a/lib/snmp/test/snmp_app_test.erl +++ b/lib/snmp/test/snmp_app_test.erl @@ -23,7 +23,8 @@ -module(snmp_app_test). -export([ - all/0, groups/0, init_per_group/2, end_per_group/2, + 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, diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl index bc54361aaf..26115a0c74 100644 --- a/lib/snmp/test/snmp_test_lib.erl +++ b/lib/snmp/test/snmp_test_lib.erl @@ -211,6 +211,10 @@ fix_data_dir(Config) -> init_suite_top_dir(Suite, Config0) -> + io:format("~w:init_suite_top_dir -> entry with" + "~n Suite: ~p" + "~n Config0: ~p" + "~n", [?MODULE, Suite, Config0]), Dir = lookup(priv_dir, Config0), SuiteTopDir = filename:join(Dir, Suite), case file:make_dir(SuiteTopDir) of @@ -230,6 +234,10 @@ init_suite_top_dir(Suite, Config0) -> init_group_top_dir(GroupName, Config) -> + io:format("~w:init_group_top_dir -> entry with" + "~n GroupName: ~p" + "~n Config: ~p" + "~n", [?MODULE, GroupName, Config]), case lists:keysearch(snmp_group_top_dir, 1, Config) of {value, {_Key, Dir}} -> %% This is a sub-group, so create our dir within Dir @@ -263,6 +271,10 @@ init_group_top_dir(GroupName, Config) -> init_testcase_top_dir(Case, Config) -> + io:format("~w:init_testcase_top_dir -> entry with" + "~n Case: ~p" + "~n Config: ~p" + "~n", [?MODULE, Case, Config]), case lists:keysearch(snmp_group_top_dir, 1, Config) of {value, {_Key, Dir}} -> CaseTopDir = filename:join(Dir, Case), |