aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2018-06-08 09:09:49 +0200
committerAnders Svensson <[email protected]>2018-06-11 17:31:07 +0200
commite753d7157b7723dd3eb0e7000e4bb55e7f6e1c71 (patch)
treed368bfdf71ddffae97c46306fe5adb87ea9270dd
parent79455556827bd02697d34a8ae307c543d6d93b09 (diff)
downloadotp-e753d7157b7723dd3eb0e7000e4bb55e7f6e1c71.tar.gz
otp-e753d7157b7723dd3eb0e7000e4bb55e7f6e1c71.tar.bz2
otp-e753d7157b7723dd3eb0e7000e4bb55e7f6e1c71.zip
Match in diameter_app_SUITE to identify an unexpected path
See this failure in nightly test on one host, indicating that code:which/1 is returning something other than the expected path: === Ended at 2018-06-08 05:10:41 === Location: [{lists,nth,170}, {diameter_app_SUITE,app,265}, {diameter_app_SUITE,'-xref/1-fun-3-',214}, {lists,'-filter/2-lc$^0/1-0-',1286}, {diameter_app_SUITE,xref,214}, {test_server,ts_tc,1545}, {test_server,run_test_case_eval1,1063}, {test_server,run_test_case_eval,995}] === Reason: no function clause matching lists:nth(2,[]) (lists.erl, line 170) in function diameter_app_SUITE:app/1 (diameter_app_SUITE.erl, line 265) 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)
-rw-r--r--lib/diameter/test/diameter_app_SUITE.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl
index 71256020f5..3c1313c296 100644
--- a/lib/diameter/test/diameter_app_SUITE.erl
+++ b/lib/diameter/test/diameter_app_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2018. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -262,7 +262,9 @@ app(Mod) ->
preloaded ->
"erts";
Path ->
- unversion(lists:nth(3, lists:reverse(filename:split(Path))))
+ %% match to identify an unexpectedly short path
+ {_, _, [_,_,_|_] = Split} = {Mod, Path, filename:split(Path)},
+ unversion(lists:nth(3, lists:reverse(Split)))
end.
add_application(XRef, App) ->