diff options
author | Lukas Larsson <[email protected]> | 2017-05-23 17:35:49 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-05-24 10:26:02 +0200 |
commit | 967a7deaaee2782fb91c8af592096c6b39c666f8 (patch) | |
tree | 0e0c47ee27fd3d476df956b20356094b00e4a19b /lib | |
parent | dfbd02122cb48900bf2953dedf5b10cb9a42ad89 (diff) | |
download | otp-967a7deaaee2782fb91c8af592096c6b39c666f8.tar.gz otp-967a7deaaee2782fb91c8af592096c6b39c666f8.tar.bz2 otp-967a7deaaee2782fb91c8af592096c6b39c666f8.zip |
kernel: Make sure to cleanup after distr tests
Because this test suite did not cleanup after itself,
the error_logger_warn_SUITE:file_utc failed to start its node
that it needed for the test.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/erl_distribution_SUITE.erl | 14 |
1 files changed, 11 insertions, 3 deletions
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} -> |