diff options
author | Siri Hansen <[email protected]> | 2016-03-03 12:49:38 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-03-03 12:52:32 +0100 |
commit | 601807d2ea08a3787c50a5c6fb05efe35aecaeb5 (patch) | |
tree | ff7c2693fd96ca1bcb655c29a4cde035a4fc34b2 /lib/test_server/src/test_server_sup.erl | |
parent | 51349126632b3ce589f217abe5dcfb7b1e47faa1 (diff) | |
download | otp-601807d2ea08a3787c50a5c6fb05efe35aecaeb5.tar.gz otp-601807d2ea08a3787c50a5c6fb05efe35aecaeb5.tar.bz2 otp-601807d2ea08a3787c50a5c6fb05efe35aecaeb5.zip |
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.
Diffstat (limited to 'lib/test_server/src/test_server_sup.erl')
-rw-r--r-- | lib/test_server/src/test_server_sup.erl | 5 |
1 files changed, 4 insertions, 1 deletions
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() -> |