summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHenrik Nord <henrik@erlang.org>2018-11-16 11:35:28 +0100
committerHenrik Nord <henrik@erlang.org>2018-11-16 11:35:28 +0100
commit605117974bee105094fa6bd9e4b7b47ae623eb1a (patch)
tree5ad76a3aec56aec02d87a587d4c42755ce6ac697 /lib
parentb3b84d91ce1b199e672f482d14feeb42c641bea4 (diff)
parent3db745cf3b621cc343565e98f32e66e486523b42 (diff)
downloaderlang-605117974bee105094fa6bd9e4b7b47ae623eb1a.tar.gz
Merge branch 'henrik/kernel/bad_erl_libs'
* henrik/kernel/bad_erl_libs: make sure a set ERL_LIBS does not interfere with tests
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/code_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index abb22b5035..64e0b9d8dd 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -1021,6 +1021,13 @@ mult_lib_remove_prefix([H|T1], [H|T2]) ->
mult_lib_remove_prefix([$/|T], []) -> T.
bad_erl_libs(Config) when is_list(Config) ->
+ %% Preserve ERL_LIBS if set.
+ BadLibs0 = "/no/such/dir",
+ BadLibs =
+ case os:getenv("ERL_LIBS") of
+ false -> BadLibs0;
+ Libs -> BadLibs0 ++ ":" ++ Libs
+ end,
{ok,Node} =
test_server:start_node(bad_erl_libs, slave, []),
Code = rpc:call(Node,code,get_path,[]),
@@ -1028,10 +1035,9 @@ bad_erl_libs(Config) when is_list(Config) ->
{ok,Node2} =
test_server:start_node(bad_erl_libs, slave,
- [{args,"-env ERL_LIBS /no/such/dir"}]),
+ [{args,"-env ERL_LIBS " ++ BadLibs}]),
Code2 = rpc:call(Node,code,get_path,[]),
test_server:stop_node(Node2),
-
%% Test that code path is not affected by the faulty ERL_LIBS
Code = Code2,