Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0980-otp-Fix-ts-smoke_test-to-pass-in-source-tr...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0980-otp-Fix-ts-smoke_test-to-pass-in-source-tree.patch of Package erlang
From 45bf1720682e8395eb9c40feee2efe3e22a966df Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Tue, 20 Feb 2024 16:19:28 +0100 Subject: [PATCH] otp: Fix ts:smoke_test to pass in source tree --- erts/test/otp_SUITE.erl | 15 ++++++++------- lib/megaco/examples/meas/megaco_codec_meas.erl | 4 ++-- .../examples/meas/megaco_codec_transform.erl | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl index a8424ea46f..6424467119 100644 --- a/erts/test/otp_SUITE.erl +++ b/erts/test/otp_SUITE.erl @@ -49,7 +49,7 @@ all() -> ]. init_per_suite(Config) -> - Server = start_xref_server(daily_xref, functions), + Server = start_xref_server(daily_xref, functions, Config), [{xref_server,Server}|Config]. end_per_suite(Config) -> @@ -389,8 +389,8 @@ runtime_dependencies_functions(Config) -> %% 'modules' mode (the BEAM files to be released might not contain %% debug information). -runtime_dependencies_modules(_Config) -> - Server = start_xref_server(?FUNCTION_NAME, modules), +runtime_dependencies_modules(Config) -> + Server = start_xref_server(?FUNCTION_NAME, modules, Config), try runtime_dependencies(Server) after @@ -708,7 +708,7 @@ app_exists(AppAtom) -> end end. -start_xref_server(Server, Mode) -> +start_xref_server(Server, Mode, _Config) -> Root = code:root_dir(), xref:start(Server, [{xref_mode,Mode}]), xref:set_default(Server, [{verbose,false}, @@ -722,17 +722,18 @@ start_xref_server(Server, Mode) -> %% an entry for erts. ct:fail(no_erts_lib_dir); LibDir -> - case filelib:is_dir(filename:join(LibDir, "ebin")) of + ErtsEbin = lists:flatten(filename:join(LibDir, "ebin")), + case lists:member(ErtsEbin, code:get_path()) of false -> %% If we are running the tests in the git repository, %% the preloaded BEAM files for Erts are not in the %% code path. We must add them explicitly. - Erts = filename:join([LibDir,"preloaded","ebin"]), - {ok,_} = xref:add_directory(Server, Erts, []); + {ok,_} = xref:add_directory(Server, ErtsEbin, []); true -> ok end end, + Server. get_suite_data_dir_path() -> diff --git a/lib/megaco/examples/meas/megaco_codec_meas.erl b/lib/megaco/examples/meas/megaco_codec_meas.erl index e4cdfd6873..abc1663c83 100644 --- a/lib/megaco/examples/meas/megaco_codec_meas.erl +++ b/lib/megaco/examples/meas/megaco_codec_meas.erl @@ -379,7 +379,7 @@ do_measure(Factor, Opts, _Id, Codec, Conf, Name, BinMsg, MCount) -> {ok, #stat{name = Name, ecount = Ecnt, etime = Etime, dcount = Dcnt, dtime = Dtime, - size = size(NewBin)}}. + size = byte_size(NewBin)}}. detect_version(Codec, Conf, Bin) -> case (catch Codec:version_of(Conf, Bin)) of @@ -387,7 +387,7 @@ detect_version(#{verbose := Verbose} = _Opts, Codec, Conf, Bin) -> io:format("[~w]", [V]), {ok, M} = Codec:decode_message(Conf, V, Bin), {ok, NewBin} = Codec:encode_message(Conf, V, M), - io:format("[~w]", [size(NewBin)]), + io:format("[~w]", [byte_size(NewBin)]), {V, NewBin}; Error -> io:format("~nversion detection failed:~n~p", [Error]), diff --git a/lib/megaco/examples/meas/megaco_codec_transform.erl b/lib/megaco/examples/meas/megaco_codec_transform.erl index 09cb706822..bc80e4f6a7 100644 --- a/lib/megaco/examples/meas/megaco_codec_transform.erl +++ b/lib/megaco/examples/meas/megaco_codec_transform.erl @@ -224,7 +224,7 @@ em(MessagePackage, Codec, Name, Extension, Bin) -> ok; {error, Reason} -> S = format("failed writing ~w message ~w (~p bytes): ~p", - [Codec, Name, size(Bin), Reason]), + [Codec, Name, byte_size(Bin), Reason]), file:close(Fd), throw({error, S}) end; -- 2.35.3
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