Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
erlang
0961-otp-Improve-core-file-printouts-in-system-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0961-otp-Improve-core-file-printouts-in-system-z_SUITE.patch of Package erlang
From 86a2c7b98179bf4158e4ed7309f9d49ba7df151b Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Mon, 9 Dec 2019 10:32:19 +0100 Subject: [PATCH 1/2] otp: Improve core file printouts in system z_SUITE --- erts/test/z_SUITE.erl | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl index 536212af2e..50adb6b1c3 100644 --- a/erts/test/z_SUITE.erl +++ b/erts/test/z_SUITE.erl @@ -186,15 +186,14 @@ dump_core(#core_search_conf{ cerl = false }, _) -> 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, + Dump = case erlang:system_info(build_type) of + opt -> + os:cmd(Cerl ++ " -dump " ++ Core); + Type -> + os:cmd(lists:concat([Cerl," -",Type," -dump ",Core])) + end, ct:log("~ts~n~n~ts",[Core,Dump]). - format_core(Conf, {ignore, Core}) -> format_core(Conf, Core, "[ignored] "); format_core(Conf, Core) -> @@ -230,17 +229,24 @@ core_file_search(#core_search_conf{search_dir = Base, extra_search_dir = XBase, cerl = Cerl, run_by_ts = RunByTS} = Conf) -> - case {Cerl,test_server:is_debug()} of + case {Cerl,erlang:system_info(build_type)} of {false,_} -> ok; - {_,true} -> + {_,opt} -> catch io:format("A cerl script that probably can be used for " - "inspection of emulator cores:~n ~s -debug~n", + "inspection of emulator cores:~n ~s~n", [Cerl]); - _ -> + {_,Type} -> catch io:format("A cerl script that probably can be used for " - "inspection of emulator cores:~n ~s~n", - [Cerl]) + "inspection of emulator cores:~n ~s -emu_type ~p~n", + [Cerl,Type]) + end, + + case os:getenv("DOCKER_BUILD_INFO") of + false -> ok; + Info -> + io:format(Info) end, + io:format("Searching for core-files in: ~s~s~n", [case XBase of false -> ""; -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor