diff options
author | Peter Andersson <[email protected]> | 2011-07-15 14:38:51 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-09-23 12:24:54 +0200 |
commit | 8d9b760e7fafec40787be6de5994240f1540d12a (patch) | |
tree | 7a8a01749564d90f01741a269a14538b0b2c6b3a | |
parent | 16eaecc29b5f314fbc8f60880688049bcf074896 (diff) | |
download | otp-8d9b760e7fafec40787be6de5994240f1540d12a.tar.gz otp-8d9b760e7fafec40787be6de5994240f1540d12a.tar.bz2 otp-8d9b760e7fafec40787be6de5994240f1540d12a.zip |
Fix problem with incorrect src links
OTP-9396
-rw-r--r-- | lib/common_test/src/ct_framework.erl | 4 | ||||
-rw-r--r-- | lib/test_server/src/test_server_sup.erl | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index 375e2875e0..b730f1e46e 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -451,10 +451,6 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) -> {value,{watchdog,Dog}} -> test_server:timetrap_cancel(Dog); false -> ok end, - -%%! --- Thu Jul 14 23:45:00 2011 --- peppe was here! - io:format(user, "MOD:FUNC = ~p:~p = ~p~n", [Mod,Func,Result]), - %% save the testcase process pid so that it can be used %% to look up the attached trace window later case ct_util:get_testdata(interpret) of 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]); |