diff options
author | Lukas Larsson <[email protected]> | 2016-03-30 17:45:51 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-03-30 17:45:51 +0200 |
commit | 1b3cb732f083549387bab43fa3351210106638e1 (patch) | |
tree | 7fdde8446df9d6792fb27aeb1e1a3e0dc9189327 /lib | |
parent | dedbb2e6fc619a76407871c6880cd82d85962117 (diff) | |
download | otp-1b3cb732f083549387bab43fa3351210106638e1.tar.gz otp-1b3cb732f083549387bab43fa3351210106638e1.tar.bz2 otp-1b3cb732f083549387bab43fa3351210106638e1.zip |
stdlib: Fix logfile testcase for hipelibs testrun
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stdlib/test/error_logger_h_SUITE.erl | 19 |
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(), |