aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-03-02 16:34:34 +0100
committerPeter Andersson <[email protected]>2012-03-05 10:39:02 +0100
commitcdf5023cbf2336617158c25cdb8fd70971cbdf7c (patch)
treeeebc0092d27d2bbd8c5cc1f0de53d4e30f7b75a3 /lib/test_server
parent1bc4f4c35876a8dcccad66129e68f602751f6e36 (diff)
downloadotp-cdf5023cbf2336617158c25cdb8fd70971cbdf7c.tar.gz
otp-cdf5023cbf2336617158c25cdb8fd70971cbdf7c.tar.bz2
otp-cdf5023cbf2336617158c25cdb8fd70971cbdf7c.zip
Make line numbers show in logs for timetraps and abortions
OTP-9930
Diffstat (limited to 'lib/test_server')
-rw-r--r--lib/test_server/src/test_server.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl
index 51754cb3b4..28ce7c04e7 100644
--- a/lib/test_server/src/test_server.erl
+++ b/lib/test_server/src/test_server.erl
@@ -1530,8 +1530,18 @@ get_loc(Pid) ->
lists:foreach(fun({Key,Val}) -> put(Key, Val) end, Dict),
Stk = [rewrite_loc_item(Loc) || Loc <- Stk0],
case get(test_server_loc) of
- undefined -> put(test_server_loc, Stk);
- _ -> ok
+ undefined ->
+ put(test_server_loc, Stk);
+ {Suite,Case} ->
+ %% location info unknown, check if {Suite,Case,Line}
+ %% is available in stacktrace. and if so, use stacktrace
+ %% instead of currect test_server_loc
+ case [match || {S,C,_L} <- Stk, S == Suite, C == Case] of
+ [match|_] -> put(test_server_loc, Stk);
+ _ -> ok
+ end;
+ _ ->
+ ok
end,
get_loc().