diff options
author | Lukas Larsson <[email protected]> | 2013-11-07 12:01:38 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-11-07 12:01:38 +0100 |
commit | aecf59396e67662c05b64bae29d4bfdc86b58ae7 (patch) | |
tree | 4a1400fc3995eab60cd12428b13f98ba9dc0875e /erts/test | |
parent | dc91f0d39bb3d9ed8cc81765ad1a8f195ce54209 (diff) | |
parent | d8657d0bbdf4db7a018b9a614b472120a810689e (diff) | |
download | otp-aecf59396e67662c05b64bae29d4bfdc86b58ae7.tar.gz otp-aecf59396e67662c05b64bae29d4bfdc86b58ae7.tar.bz2 otp-aecf59396e67662c05b64bae29d4bfdc86b58ae7.zip |
Merge branch 'maint'
* maint:
erts: Add cerl -dump and dumping in z_SUITE
Diffstat (limited to 'erts/test')
-rw-r--r-- | erts/test/z_SUITE.erl | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl index ccf22a9b6b..da72b18f05 100644 --- a/erts/test/z_SUITE.erl +++ b/erts/test/z_SUITE.erl @@ -231,6 +231,20 @@ mod_time_list(F) -> str_strip(S) -> string:strip(string:strip(string:strip(S), both, $\n), both, $\r). +dump_core(#core_search_conf{ cerl = false }, _) -> + ok; +dump_core(_, {ignore, _Core}) -> + ok; +dump_core(#core_search_conf{ cerl = Cerl }, Core) -> + Dump = case test_server:is_debug() of + true -> + os:cmd(Cerl ++ " -debug -dump " ++ Core); + _ -> + os:cmd(Cerl ++ " -dump " ++ Core) + end, + ct:log("~s~n~n~s",[Core,Dump]). + + format_core(Conf, {ignore, Core}) -> format_core(Conf, Core, "[ignored] "); format_core(Conf, Core) -> @@ -254,11 +268,16 @@ core_file_search(#core_search_conf{search_dir = Base, extra_search_dir = XBase, cerl = Cerl, run_by_ts = RunByTS} = Conf) -> - case Cerl of - false -> ok; - _ -> catch io:format("A cerl script that probably can be used for " - "inspection of emulator cores:~n ~s~n", - [Cerl]) + case {Cerl,test_server:is_debug()} of + {false,_} -> ok; + {_,true} -> + catch io:format("A cerl script that probably can be used for " + "inspection of emulator cores:~n ~s -debug~n", + [Cerl]); + _ -> + catch io:format("A cerl script that probably can be used for " + "inspection of emulator cores:~n ~s~n", + [Cerl]) end, io:format("Searching for core-files in: ~s~s~n", [case XBase of @@ -329,6 +348,8 @@ core_file_search(#core_search_conf{search_dir = Base, ["Ignored core-files found:", lists:reverse(ICores)] end]), + + lists:foreach(fun(C) -> dump_core(Conf,C) end, Cores), case {RunByTS, ICores, FCores} of {true, [], []} -> ok; {true, _, []} -> {comment, Res}; |