diff options
author | Siri Hansen <[email protected]> | 2016-03-02 09:45:00 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-03-02 09:45:00 +0100 |
commit | d977f514b918841afcd4beab1d24decf9f775794 (patch) | |
tree | 7dbca83fcac3182f9ab42705a48c17b876734949 /lib/observer/test/crashdump_viewer_SUITE.erl | |
parent | 59a0f98dd954b15fda9b2c96878163ffdfff30d1 (diff) | |
parent | d0a4ed3dbc5e6bd92253ced1ed31720fae1e9411 (diff) | |
download | otp-d977f514b918841afcd4beab1d24decf9f775794.tar.gz otp-d977f514b918841afcd4beab1d24decf9f775794.tar.bz2 otp-d977f514b918841afcd4beab1d24decf9f775794.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/observer/test/crashdump_viewer_SUITE.erl')
-rw-r--r-- | lib/observer/test/crashdump_viewer_SUITE.erl | 19 |
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 2d47054600..a2b96ecb88 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -563,22 +563,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). |