From 601807d2ea08a3787c50a5c6fb05efe35aecaeb5 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 3 Mar 2016 12:49:38 +0100 Subject: Set default value for crash_dump_dir test_server_sup:crash_dump_dir() is expected to return {ok,Dir}, but if there was no test framework set, then it would return just 'ok'. To avoid crash, the function will no returm {ok,Cwd} if no framework is set. --- lib/test_server/src/test_server_sup.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/test_server/src') 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() -> -- cgit v1.2.3