diff options
author | Micael Karlberg <[email protected]> | 2010-12-03 16:13:18 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2010-12-03 16:13:18 +0100 |
commit | 314e80f58bbee2924bf61bdc7b987750d58ca2ef (patch) | |
tree | adb70ece58251746adecc5a07a82e5f82740013b /lib/snmp/test/snmp_compiler_test.erl | |
parent | 66dc042ce9a0e888cfdb8f1b0f5a2e9d4d046f9e (diff) | |
download | otp-314e80f58bbee2924bf61bdc7b987750d58ca2ef.tar.gz otp-314e80f58bbee2924bf61bdc7b987750d58ca2ef.tar.bz2 otp-314e80f58bbee2924bf61bdc7b987750d58ca2ef.zip |
Typed more of the info. Also added more of it in the compiled mib.
Also prepared for future module_compilance addition.
Diffstat (limited to 'lib/snmp/test/snmp_compiler_test.erl')
-rw-r--r-- | lib/snmp/test/snmp_compiler_test.erl | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/snmp/test/snmp_compiler_test.erl b/lib/snmp/test/snmp_compiler_test.erl index e2925ed6ed..09fc417af4 100644 --- a/lib/snmp/test/snmp_compiler_test.erl +++ b/lib/snmp/test/snmp_compiler_test.erl @@ -79,10 +79,10 @@ init_per_testcase(_Case, Config) when is_list(Config) -> MibDir = join(lists:reverse(["snmp_test_data"|RL])), CompDir = join(Dir, "comp_dir/"), ?line ok = file:make_dir(CompDir), - [{comp_dir, CompDir},{mib_dir, MibDir}|Config]. + [{comp_dir, CompDir}, {mib_dir, MibDir} | Config]. fin_per_testcase(_Case, Config) when is_list(Config) -> - CompDir = ?config(comp_dir, Config), + CompDir = ?config(comp_dir, Config), ?line ok = ?DEL_DIR(CompDir), lists:keydelete(comp_dir, 1, Config). @@ -177,9 +177,17 @@ agent_capabilities(Config) when is_list(Config) -> put(tname,agent_capabilities), p("starting with Config: ~p~n", [Config]), - Dir = ?config(comp_dir, Config), - Mib = join(Dir,"AC-TEST-MIB.mib"), - ?line {ok, Mib} = snmpc:compile(Mib, [{outdir, Dir}, {verbosity,trace}]), + SnmpPrivDir = code:priv_dir(snmp), + SnmpMibsDir = join(SnmpPrivDir, "mibs"), + OtpMibsPrivDir = code:priv_dir(otp_mibs), + OtpMibsMibsDir = join(OtpMibsPrivDir, "mibs"), + Dir = ?config(mib_dir, Config), + AcMib = join(Dir,"AC-TEST-MIB.mib"), + ?line {ok, Mib} = snmpc:compile(AcMib, [options, + version, + {i, [SnmpMibsDir, OtpMibsMibsDir]}, + {outdir, Dir}, + {verbosity, trace}]), io:format("agent_capabilities -> Mib: ~n~p~n", [Mib]), ok. |