aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-03-01 16:46:35 +0100
committerSiri Hansen <[email protected]>2016-03-01 16:51:30 +0100
commit51349126632b3ce589f217abe5dcfb7b1e47faa1 (patch)
tree6a1a285d7b45f44525367483918cc8dcf570440c /lib/observer
parent6f8997c001a17b9d9322e26757690489d6111dac (diff)
downloadotp-51349126632b3ce589f217abe5dcfb7b1e47faa1.tar.gz
otp-51349126632b3ce589f217abe5dcfb7b1e47faa1.tar.bz2
otp-51349126632b3ce589f217abe5dcfb7b1e47faa1.zip
Set dir for slave node's erl_crash.dump
This was earlier filename:dirname(code:which(test_server)). On Microsoft Windows, this pointed to a directory under c:/Program Files, and in later versions this directory is no longer writable. The framework (common_test) log dir is now used instead.
Diffstat (limited to 'lib/observer')
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl19
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 84af440245..eae4ee01b9 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -564,22 +564,11 @@ dump_with_strange_module_name(DataDir,Rel,DumpName) ->
CD.
dump(Node,DataDir,Rel,DumpName) ->
+ Crashdump = filename:join(DataDir, dump_prefix(Rel)++DumpName),
+ rpc:call(Node,os,putenv,["ERL_CRASH_DUMP",Crashdump]),
rpc:call(Node,erlang,halt,[DumpName]),
- Crashdump0 = filename:join(filename:dirname(code:which(?t)),
- "erl_crash_dump.n1"),
- Crashdump1 = filename:join(DataDir, dump_prefix(Rel)++DumpName),
- ok = rename(Crashdump0,Crashdump1),
- Crashdump1.
-
-rename(From,To) ->
- ok = check_complete(From),
- case file:rename(From,To) of
- {error,exdev} ->
- {ok,_} = file:copy(From,To),
- ok = file:delete(From);
- ok ->
- ok
- end.
+ ok = check_complete(Crashdump),
+ Crashdump.
check_complete(File) ->
check_complete1(File,10).