diff options
author | Anders Svensson <[email protected]> | 2011-12-07 16:51:46 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-12-07 16:51:46 +0100 |
commit | 24f0d3ee266d56cc83435401230a8bb85a0464d3 (patch) | |
tree | ecb3a5e9d8539e87efb5677494894f3ced97a2cb /lib/diameter/test/diameter_app_SUITE.erl | |
parent | 977f7510818925d9293361c14788fdb872614ac1 (diff) | |
parent | f2a4059d06f8b76d2c1da14197f170deebd64f45 (diff) | |
download | otp-24f0d3ee266d56cc83435401230a8bb85a0464d3.tar.gz otp-24f0d3ee266d56cc83435401230a8bb85a0464d3.tar.bz2 otp-24f0d3ee266d56cc83435401230a8bb85a0464d3.zip |
Merge branch 'anders/diameter/dict_error_identification/OTP-9639'
* anders/diameter/dict_error_identification/OTP-9639: (27 commits)
Update documentation
Improve base_rfc3588.dia formatting
Make typo fix backwards compatible
Fix base_rfc3588.dia typo
Check compiler dependencies in app suite
Move type definitions into diameter.erl
Fix interpretation of vendor id in @grouped
Add range checks on dictionary integers
Don't explicitly load inherited modules
Tweak diameter_make interface
Add format testcase to compiler suite
Add diameter_dict_util:format/1 for reconstructing a dictionary file
Make diameter_types usable with @codecs
Minor codegen tweaks
Remove unnecessary includes
Add compiler suite
Update app suite
Update codec suite
Vendor id fixes
No longer inherit common dictionary in relay dictionary
...
Diffstat (limited to 'lib/diameter/test/diameter_app_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_app_SUITE.erl | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl index 7f53a4ddd4..7da145fb3b 100644 --- a/lib/diameter/test/diameter_app_SUITE.erl +++ b/lib/diameter/test/diameter_app_SUITE.erl @@ -41,6 +41,19 @@ -define(A, list_to_atom). +%% Modules not in the app and that should not have dependencies on it +%% for build reasons. +-define(COMPILER_MODULES, [diameter_codegen, + diameter_dict_scanner, + diameter_dict_parser, + diameter_dict_util, + diameter_exprecs, + diameter_make]). + +-define(HELP_MODULES, [diameter_callback, + diameter_dbg, + diameter_info]). + %% =========================================================================== suite() -> @@ -93,14 +106,8 @@ vsn(Config) -> modules(Config) -> Mods = fetch(modules, fetch(app, Config)), Installed = code_mods(), - Help = [diameter_callback, - diameter_codegen, - diameter_dbg, - diameter_exprecs, - diameter_info, - diameter_make, - diameter_spec_scan, - diameter_spec_util], + Help = lists:sort(?HELP_MODULES ++ ?COMPILER_MODULES), + {[], Help} = {Mods -- Installed, lists:sort(Installed -- Mods)}. code_mods() -> @@ -167,14 +174,12 @@ xref(Config) -> %% stop xref from complaining about calls to module erlang, which %% was previously in kernel. Erts isn't an application however, in %% the sense that there's no .app file, and isn't listed in - %% applications. Seems less than ideal. Also, diameter_tcp does - %% call ssl despite ssl not being listed as a dependency in the - %% app file since ssl is only required for TLS security: it's up - %% to a client who wants TLS it to start ssl. + %% applications. ok = lists:foreach(fun(A) -> add_application(XRef, A) end, [?APP, erts | fetch(applications, App)]), {ok, Undefs} = xref:analyze(XRef, undefined_function_calls), + {ok, Called} = xref:analyze(XRef, {module_call, ?COMPILER_MODULES}), xref:stop(XRef), @@ -183,7 +188,21 @@ xref(Config) -> lists:member(F, Mods) andalso {F,T} /= {diameter_tcp, ssl} end, - Undefs). + Undefs), + %% diameter_tcp does call ssl despite the latter not being listed + %% as a dependency in the app file since ssl is only required for + %% TLS security: it's up to a client who wants TLS it to start + %% ssl. + + [] = lists:filter(fun is_bad_dependency/1, Called). + +%% It's not strictly necessary that diameter compiler modules not +%% depend on other diameter modules but it's a simple source of build +%% errors if not encoded in the makefile (hence the test) so guard +%% against it. +is_bad_dependency(Mod) -> + lists:prefix("diameter", atom_to_list(Mod)) + andalso not lists:member(Mod, ?COMPILER_MODULES). add_application(XRef, App) -> add_application(XRef, App, code:lib_dir(App)). |