aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-03-09 10:11:19 +0100
committerSiri Hansen <[email protected]>2016-03-09 10:11:19 +0100
commit00a0a2d227be215741264030b929c1fc7b7473d5 (patch)
treec51689b5469bf270796b15728cb1542d93c75d9c /lib
parentaafb2506a85b1bad11157f9786f2a834c9d76fae (diff)
parentf0046c37852993bde960c3a456c1ac1c0078d792 (diff)
downloadotp-00a0a2d227be215741264030b929c1fc7b7473d5.tar.gz
otp-00a0a2d227be215741264030b929c1fc7b7473d5.tar.bz2
otp-00a0a2d227be215741264030b929c1fc7b7473d5.zip
Merge branch 'siri/crashdump-dir/OTP-13388' into maint
* siri/crashdump-dir/OTP-13388: Fix code_SUITE after test_server change Set default value for crash_dump_dir
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/code_SUITE.erl16
-rw-r--r--lib/test_server/src/test_server_sup.erl5
2 files changed, 13 insertions, 8 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.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl
index 1c0eb18d70..c4530ba62f 100644
--- a/lib/test_server/src/test_server_sup.erl
+++ b/lib/test_server/src/test_server_sup.erl
@@ -594,7 +594,10 @@ cleanup_crash_dumps() ->
delete_files(Dumps).
crash_dump_dir() ->
- {ok,Dir} = test_server_sup:framework_call(get_log_dir,[]),
+ %% If no framework is known, then we use current working directory
+ %% - in most cases that will be the same as the default log
+ %% directory.
+ {ok,Dir} = test_server_sup:framework_call(get_log_dir,[],file:get_cwd()),
Dir.
tar_crash_dumps() ->