Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
3161-diameter-test-Tweaked-the-relup-test-case....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3161-diameter-test-Tweaked-the-relup-test-case.patch of Package erlang
From a33ebce698cd5df1fc84d3a541916829d7a86ece Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Thu, 18 Apr 2024 10:45:51 +0200 Subject: [PATCH 1/7] [diameter|test] Tweaked the relup test case --- lib/diameter/test/diameter_app_SUITE.erl | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl index 9921153c9a..8a6064ec3a 100644 --- a/lib/diameter/test/diameter_app_SUITE.erl +++ b/lib/diameter/test/diameter_app_SUITE.erl @@ -308,22 +308,45 @@ make_name(Suf) -> %% =========================================================================== relup({App, Config}) -> + i("relup -> entry with" + "~n App: ~p" + "~n Config: ~p", [App, Config]), + [{Vsn, Up, Down}] = ?util:consult(diameter, appup), true = is_vsn(Vsn), + i("relup -> " + "~n Vsn: ~p" + "~n Up: ~p" + "~n Down: ~p", [Vsn, Up, Down]), + Rel = [{erts, erlang:system_info(version)} | [{A, appvsn(A)} || A <- [sasl | fetch(applications, App)]]], + i("relup -> " + "~n Rel: ~p", [Rel]), + Dir = fetch(priv_dir, Config), + i("relup -> " + "~n Dir: " + "~n ~p" + "~n File info (dir): " + "~n ~p", [Dir, file_info(Dir)]), + Name = write_rel(Dir, Rel, Vsn), UpFrom = acc_rel(Dir, Rel, Up), + i("relup -> " + "~n UpFrom: ~p", [UpFrom]), DownTo = acc_rel(Dir, Rel, Down), + i("relup -> " + "~n DownTo: ~p", [DownTo]), {[], []} = {UpFrom -- DownTo, DownTo -- UpFrom}, [[], []] = [S -- sets:to_list(sets:from_list(S)) || S <- [UpFrom, DownTo]], + i("relup -> try make relup"), {ok, _, _, []} = systools:make_relup(Name, UpFrom, DownTo, [{path, [Dir]}, {outdir, Dir}, silent]); @@ -331,6 +354,14 @@ relup({App, Config}) -> relup(Config) -> run(Config, [relup]). +file_info(Path) -> + case file:read_file_info(Path) of + {ok, Info} -> + Info; + {error, Reason} -> + lists:flatten(io_lib:format("error: ~p", [Reason])) + end. + acc_rel(Dir, Rel, List) -> lists:map(fun({V,_}) -> write_rel(Dir, Rel, V) end, List). @@ -386,3 +417,10 @@ is_app(S) when is_list(S) -> {_, match} = {S, match(S, "^([a-z]([a-z_]*|[a-zA-Z]*))$")}, true. + + +i(F) -> + i(F, []). + +i(F, A) when is_list(F) andalso is_list(A) -> + io:format(F ++ "~n", A). -- 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