aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2018-06-11 17:28:58 +0200
committerAnders Svensson <[email protected]>2018-06-11 17:42:44 +0200
commitda952eb9c08d208dfeef4c78b087486f8489fbe8 (patch)
treeb6e2fe40d92426cae87578406c4f2e02cb4ff5ef /lib/diameter/test
parent551c1c2c6937ab2dbc1b3e77382c64e74774d3e6 (diff)
downloadotp-da952eb9c08d208dfeef4c78b087486f8489fbe8.tar.gz
otp-da952eb9c08d208dfeef4c78b087486f8489fbe8.tar.bz2
otp-da952eb9c08d208dfeef4c78b087486f8489fbe8.zip
Make diameter_app_SUITE fail more usefully
The badmatch in the grandparent commit is ssl not being installed: === Reason: no match of right hand side value {ssl,non_existing, ["non_existing"]} in function diameter_app_SUITE:app/1 (diameter_app_SUITE.erl, line 266) in call from diameter_app_SUITE:'-xref/1-fun-3-'/2 (diameter_app_SUITE.erl, line 214) in call from lists:'-filter/2-lc$^0/1-0-'/2 (lists.erl, line 1286) in call from diameter_app_SUITE:xref/1 (diameter_app_SUITE.erl, line 214) in call from test_server:ts_tc/3 (test_server.erl, line 1545) in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1063) in call from test_server:run_test_case_eval/9 (test_server.erl, line 995) Tweak the failure a bit more, without fixing it.
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_app_SUITE.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl
index 3c1313c296..ef4a28d3f4 100644
--- a/lib/diameter/test/diameter_app_SUITE.erl
+++ b/lib/diameter/test/diameter_app_SUITE.erl
@@ -208,9 +208,9 @@ xref(Config) ->
CTmods = CTmods -- Mods,
%% Ensure that runtime modules only call other runtime modules, or
- %% applications declared as in runtime_dependencies in the app
- %% file. Note that the declared application versions are ignored
- %% since we only know what we can see now.
+ %% applications declared in runtime_dependencies in the app file.
+ %% The declared application versions are ignored since we only
+ %% know what we see now.
[] = lists:filter(fun(M) -> not lists:member(app(M), Deps) end,
RTdeps -- Mods).
@@ -261,6 +261,8 @@ app(Mod) ->
case code:which(Mod) of
preloaded ->
"erts";
+ Reason when is_atom(Reason) ->
+ error({Reason, Mod});
Path ->
%% match to identify an unexpectedly short path
{_, _, [_,_,_|_] = Split} = {Mod, Path, filename:split(Path)},