aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/test_server.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-03-06 10:18:41 +0100
committerPeter Andersson <[email protected]>2012-03-06 10:18:56 +0100
commit2dd629cea2672b227bfce05621aff6c5e65b2a3e (patch)
tree5fc8a5bdb06fb8fe1be45994ee9998ebdd5fe807 /lib/test_server/src/test_server.erl
parent2a97b99164a8068e82b7565dfc58a00990dbf109 (diff)
parentcdf5023cbf2336617158c25cdb8fd70971cbdf7c (diff)
downloadotp-2dd629cea2672b227bfce05621aff6c5e65b2a3e.tar.gz
otp-2dd629cea2672b227bfce05621aff6c5e65b2a3e.tar.bz2
otp-2dd629cea2672b227bfce05621aff6c5e65b2a3e.zip
Merge remote branch 'origin/peppe/common_test/otp-9930' into maint
* origin/peppe/common_test/otp-9930: Make line numbers show in logs for timetraps and abortions OTP-9930
Diffstat (limited to 'lib/test_server/src/test_server.erl')
-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().