From f0046c37852993bde960c3a456c1ac1c0078d792 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 3 Mar 2016 12:43:28 +0100 Subject: 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. --- lib/kernel/test/code_SUITE.erl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib') 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. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3