aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-04-05 16:51:51 +0200
committerLukas Larsson <[email protected]>2016-04-05 16:51:51 +0200
commit30b22c1a3835fa411733763c49c65f2e2abb1640 (patch)
tree850fb22442267a7900f4c2226f65d014756705b3
parent8041c9d5af5fe3ae9107a8f9f3dd6449c151ea1f (diff)
parent1b3cb732f083549387bab43fa3351210106638e1 (diff)
downloadotp-30b22c1a3835fa411733763c49c65f2e2abb1640.tar.gz
otp-30b22c1a3835fa411733763c49c65f2e2abb1640.tar.bz2
otp-30b22c1a3835fa411733763c49c65f2e2abb1640.zip
Merge branch 'lukas/stdlib/error_logger_SUITE/OTP-13471'
* lukas/stdlib/error_logger_SUITE/OTP-13471: stdlib: Fix logfile testcase for hipelibs testrun
-rw-r--r--lib/stdlib/test/error_logger_h_SUITE.erl19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/stdlib/test/error_logger_h_SUITE.erl b/lib/stdlib/test/error_logger_h_SUITE.erl
index 30811f3fb4..9828a075cc 100644
--- a/lib/stdlib/test/error_logger_h_SUITE.erl
+++ b/lib/stdlib/test/error_logger_h_SUITE.erl
@@ -65,11 +65,18 @@ logfile(Config) ->
error_logger:logfile(close),
analyse_events(Log, Ev, [AtNode], unlimited),
- [] = [{X, file:pid2name(X)} || X <- processes(), Data <- [process_info(X, [current_function])],
- Data =/= undefined,
- element(1, element(2, lists:keyfind(current_function, 1, Data)))
- =:= file_io_server,
- file:pid2name(X) =:= {ok, Log}],
+ %% Make sure that the file_io_server process has been stopped
+ [] = lists:filtermap(
+ fun(X) ->
+ case {process_info(X, [current_function]),
+ file:pid2name(X)} of
+ {[{current_function, {file_io_server, _, _}}],
+ {ok,P2N = Log}} ->
+ {true, {X, P2N}};
+ _ ->
+ false
+ end
+ end, processes()),
test_server:stop_node(Node),
@@ -112,7 +119,7 @@ tty(Config) ->
do_one_tty(Log, Ev, unlimited),
Pa = "-pa " ++ filename:dirname(code:which(?MODULE)),
- {ok,Node} = start_node(logfile, Pa),
+ {ok,Node} = start_node(tty, Pa),
tty_log_open(Log),
ok = rpc:call(Node, erlang, apply, [fun gen_events/1,[Ev]]),
tty_log_close(),