diff options
author | Micael Karlberg <[email protected]> | 2011-07-19 15:39:11 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-07-19 15:39:11 +0200 |
commit | f203698b44d50744a7543c79c936b148efd9e7ca (patch) | |
tree | 4c79fb4d59f7ff5c3b175597bc0d4ba35373f30f /lib/snmp/test/snmp_compiler_test.erl | |
parent | d9f6226ed0d91c7f6339c63c65c0df63da89af24 (diff) | |
parent | fc26533846df044af302e5f27363cb8025fa7151 (diff) | |
download | otp-f203698b44d50744a7543c79c936b148efd9e7ca.tar.gz otp-f203698b44d50744a7543c79c936b148efd9e7ca.tar.bz2 otp-f203698b44d50744a7543c79c936b148efd9e7ca.zip |
[compiler] Added the option warnings_as_errors (for the SNMP MIB
compiler (escript) frontend, the option --wae is used) which
specifies whether warnings should be treated as errors.
Tuncer Ayaz.
OTP-9437
Merge branch 'bmk/snmp/compiler/warnings_as_errors/OTP-9437' into bmk/snmp/snmp421_integration
Conflicts:
lib/snmp/doc/src/notes.xml
lib/snmp/src/app/snmp.appup.src
lib/snmp/src/compile/Makefile
Diffstat (limited to 'lib/snmp/test/snmp_compiler_test.erl')
-rw-r--r-- | lib/snmp/test/snmp_compiler_test.erl | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/lib/snmp/test/snmp_compiler_test.erl b/lib/snmp/test/snmp_compiler_test.erl index 2e6020ae7a..cee11ba97a 100644 --- a/lib/snmp/test/snmp_compiler_test.erl +++ b/lib/snmp/test/snmp_compiler_test.erl @@ -47,6 +47,7 @@ module_identity/1, agent_capabilities/1, module_compliance/1, + warnings_as_errors/1, otp_6150/1, otp_8574/1, @@ -97,9 +98,10 @@ all() -> description, oid_conflicts, imports, - module_identity, - agent_capabilities, - module_compliance, + module_identity, + agent_capabilities, + module_compliance, + warnings_as_errors, {group, tickets} ]. @@ -152,6 +154,8 @@ description(Config) when is_list(Config) -> ok. +%%====================================================================== + oid_conflicts(suite) -> []; oid_conflicts(Config) when is_list(Config) -> put(tname,oid_conflicts), @@ -165,18 +169,24 @@ oid_conflicts(Config) when is_list(Config) -> ok. +%%====================================================================== + imports(suite) -> []; imports(Config) when is_list(Config) -> ?SKIP(not_yet_implemented). +%%====================================================================== + module_identity(suite) -> []; module_identity(Config) when is_list(Config) -> ?SKIP(not_yet_implemented). +%%====================================================================== + agent_capabilities(suite) -> []; agent_capabilities(Config) when is_list(Config) -> @@ -218,6 +228,8 @@ agent_capabilities(Config) when is_list(Config) -> ok. +%%====================================================================== + module_compliance(suite) -> []; module_compliance(Config) when is_list(Config) -> @@ -259,6 +271,31 @@ module_compliance(Config) when is_list(Config) -> ok. +%%====================================================================== + +warnings_as_errors(suite) -> + ["OTP-9437"]; +warnings_as_errors(Config) when is_list(Config) -> + put(tname,warnings_as_errors), + p("starting with Config: ~p~n", [Config]), + Dir = ?config(comp_dir, Config), + MibDir = ?config(mib_dir, Config), + MibFile = join(MibDir, "OTP8574-MIB.mib"), + OutFile = join(Dir, "OTP8574-MIB.bin"), + Opts = [{group_check, false}, + {outdir, Dir}, + {verbosity, trace}, + relaxed_row_name_assign_check], + {error, compilation_failed} = + snmpc:compile(MibFile, [warnings_as_errors|Opts]), + false = filelib:is_regular(OutFile), + {ok, _} = snmpc:compile(MibFile, Opts), + true = filelib:is_regular(OutFile), + ok. + + +%%====================================================================== + otp_6150(suite) -> []; otp_6150(Config) when is_list(Config) -> @@ -273,6 +310,8 @@ otp_6150(Config) when is_list(Config) -> ok. +%%====================================================================== + otp_8574(suite) -> []; otp_8574(Config) when is_list(Config) -> @@ -304,6 +343,8 @@ otp_8574(Config) when is_list(Config) -> end. +%%====================================================================== + otp_8595(suite) -> []; otp_8595(Config) when is_list(Config) -> |