diff options
author | Siri Hansen <[email protected]> | 2016-03-03 12:43:28 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-03-03 12:52:32 +0100 |
commit | f0046c37852993bde960c3a456c1ac1c0078d792 (patch) | |
tree | e66eadf74f738515071d47b3707e377fb486320d /lib/kernel | |
parent | 601807d2ea08a3787c50a5c6fb05efe35aecaeb5 (diff) | |
download | otp-f0046c37852993bde960c3a456c1ac1c0078d792.tar.gz otp-f0046c37852993bde960c3a456c1ac1c0078d792.tar.bz2 otp-f0046c37852993bde960c3a456c1ac1c0078d792.zip |
Fix code_SUITE after test_server change
test_server:start_node does no longer add the test_server path to the
new node, since the needed code is present in the default path. This
caused two test cases in code_SUITE to fail.
code_SUITE:mult_lib_roots: Expected the test_server path to be first
in the code path. This check is removed.
code_SUITE:bad_erl_libs: Started a node with "-env ERL_LIBS ",
i.e. not giving any value to the ERL_LIBS variable. This test
succeeded by accident, since the combination with arguments set by
test_server_node.erl and by slave.erl caused the node start to work,
and no further checks were present in the test. This part of the test
case is now removed.
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/test/code_SUITE.erl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index 2b77ec8972..6f19f67fb5 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -1133,9 +1133,8 @@ mult_lib_roots(Config) when is_list(Config) -> ?t:start_node(mult_lib_roots, slave, [{args,"-env ERL_LIBS "++ErlLibs}]), - TSPath = filename:dirname(code:which(test_server)), Path0 = rpc:call(Node, code, get_path, []), - [TSPath,"."|Path1] = Path0, + ["."|Path1] = Path0, [Kernel|Path2] = Path1, [Stdlib|Path3] = Path2, mult_lib_verify_lib(Kernel, "kernel"), @@ -1179,16 +1178,19 @@ mult_lib_remove_prefix([$/|T], []) -> T. bad_erl_libs(Config) when is_list(Config) -> {ok,Node} = - ?t:start_node(mult_lib_roots, slave, - [{args,"-env ERL_LIBS "}]), - + ?t:start_node(bad_erl_libs, slave, []), + Code = rpc:call(Node,code,get_path,[]), ?t:stop_node(Node), {ok,Node2} = - ?t:start_node(mult_lib_roots, slave, + ?t:start_node(bad_erl_libs, slave, [{args,"-env ERL_LIBS /no/such/dir"}]), - + Code2 = rpc:call(Node,code,get_path,[]), ?t:stop_node(Node2), + + %% Test that code path is not affected by the faulty ERL_LIBS + Code == Code2, + ok. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |