diff options
author | Björn Gustavsson <[email protected]> | 2017-05-29 10:28:56 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-05-29 10:28:56 +0200 |
commit | 96431965fc60f9da1d64c1aaa3861896b6a73ba7 (patch) | |
tree | 5e7f28d43652f9d352915db65a03bd220e350509 /lib | |
parent | da1735243107a01421402b432dd921c837a41522 (diff) | |
parent | 7ba1983bb5b5cd0d391a5ba944d1fd28ae4187d6 (diff) | |
download | otp-96431965fc60f9da1d64c1aaa3861896b6a73ba7.tar.gz otp-96431965fc60f9da1d64c1aaa3861896b6a73ba7.tar.bz2 otp-96431965fc60f9da1d64c1aaa3861896b6a73ba7.zip |
Merge branch 'lukas/kernel/fix_error_logger_utc_testcase'
* lukas/kernel/fix_error_logger_utc_testcase:
Stop the cover server after running code_SUITE:module_status/1
kernel: Make sure to cleanup after distr tests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/code_SUITE.erl | 13 | ||||
-rw-r--r-- | lib/kernel/test/erl_distribution_SUITE.erl | 14 |
2 files changed, 24 insertions, 3 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index afc32283ba..6f8e949aac 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -1791,6 +1791,19 @@ do_normalized_paths([]) -> %% Test that module_status/1 behaves as expected module_status(_Config) -> + case test_server:is_cover() of + true -> + module_status(); + false -> + %% Make sure that we terminate the cover server. + try + module_status() + after + cover:stop() + end + end. + +module_status() -> %% basics not_loaded = code:module_status(fubar), % nonexisting {file, preloaded} = code:is_loaded(erlang), diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl index d7a9ac39a3..bbfaa9d147 100644 --- a/lib/kernel/test/erl_distribution_SUITE.erl +++ b/lib/kernel/test/erl_distribution_SUITE.erl @@ -230,7 +230,7 @@ legal(Name) -> end. illegal(Name) -> - case test_node(Name) of + case test_node(Name, true) of not_started -> ok; started -> @@ -238,12 +238,20 @@ illegal(Name) -> end. test_node(Name) -> + test_node(Name, false). +test_node(Name, Illigal) -> ProgName = atom_to_list(lib:progname()), Command = ProgName ++ " -noinput " ++ long_or_short() ++ Name ++ - " -eval \"net_adm:ping('" ++ atom_to_list(node()) ++ "')\"", + " -eval \"net_adm:ping('" ++ atom_to_list(node()) ++ "')\"" ++ + case Illigal of + true -> + " -eval \"timer:sleep(10000),init:stop().\""; + false -> + "" + end, net_kernel:monitor_nodes(true), BinCommand = unicode:characters_to_binary(Command, utf8), - open_port({spawn, BinCommand}, [stream]), + Prt = open_port({spawn, BinCommand}, [stream]), Node = list_to_atom(Name), receive {nodeup, Node} -> |