aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2011-07-15 14:38:51 +0200
committerPeter Andersson <[email protected]>2011-09-23 12:24:54 +0200
commit8d9b760e7fafec40787be6de5994240f1540d12a (patch)
tree7a8a01749564d90f01741a269a14538b0b2c6b3a /lib/test_server/src
parent16eaecc29b5f314fbc8f60880688049bcf074896 (diff)
downloadotp-8d9b760e7fafec40787be6de5994240f1540d12a.tar.gz
otp-8d9b760e7fafec40787be6de5994240f1540d12a.tar.bz2
otp-8d9b760e7fafec40787be6de5994240f1540d12a.zip
Fix problem with incorrect src links
OTP-9396
Diffstat (limited to 'lib/test_server/src')
-rw-r--r--lib/test_server/src/test_server_sup.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl
index e846a4c14a..77d364d5cb 100644
--- a/lib/test_server/src/test_server_sup.erl
+++ b/lib/test_server/src/test_server_sup.erl
@@ -540,8 +540,9 @@ format_loc({Mod,Func}) when is_atom(Func) ->
format_loc({Mod,Line}) when is_integer(Line) ->
%% ?line macro is used
ModStr = package_str(Mod),
- case lists:reverse(ModStr) of
- [$E,$T,$I,$U,$S,$_|_] ->
+ case {lists:member(no_src, get(test_server_logopts)),
+ lists:reverse(ModStr)} of
+ {false,[$E,$T,$I,$U,$S,$_|_]} ->
io_lib:format("{~s,<a href=\"~s~s#~w\">~w</a>}",
[ModStr,downcase(ModStr),?src_listing_ext,
round_to_10(Line),Line]);
@@ -557,8 +558,9 @@ format_loc1([{Mod,Func,Line}|Rest]) ->
[" ",format_loc1({Mod,Func,Line}),",\n"|format_loc1(Rest)];
format_loc1({Mod,Func,Line}) ->
ModStr = package_str(Mod),
- case lists:reverse(ModStr) of
- [$E,$T,$I,$U,$S,$_|_] ->
+ case {lists:member(no_src, get(test_server_logopts)),
+ lists:reverse(ModStr)} of
+ {false,[$E,$T,$I,$U,$S,$_|_]} ->
io_lib:format("{~s,~w,<a href=\"~s~s#~w\">~w</a>}",
[ModStr,Func,downcase(ModStr),?src_listing_ext,
round_to_10(Line),Line]);