Skip to content

Commit

Permalink
Merge branch 'lukas/ct/fix-find_release-ubuntu-logic/OTP-18932' into …
Browse files Browse the repository at this point in the history
…maint

* lukas/ct/fix-find_release-ubuntu-logic/OTP-18932:
  ct: Fix test_server:find_release for ubuntu logic
  • Loading branch information
garazdawi committed Jan 15, 2024
2 parents f8565a4 + 5ec3714 commit e19853b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/common_test/src/test_server_node.erl
Original file line number Diff line number Diff line change
Expand Up @@ -631,14 +631,20 @@ suse_release(Fd) ->

find_rel_ubuntu(_Rel, UbuntuRel) when is_integer(UbuntuRel), UbuntuRel < 16 ->
[];
find_rel_ubuntu(Rel, UbuntuRel) when is_integer(UbuntuRel) ->
find_rel_ubuntu(_Rel, UbuntuRel) when is_integer(UbuntuRel), UbuntuRel < 20 ->
find_rel_ubuntu(_Rel, 16, UbuntuRel);
find_rel_ubuntu(_Rel, UbuntuRel) when is_integer(UbuntuRel) ->
find_rel_ubuntu(_Rel, 20, UbuntuRel).

find_rel_ubuntu(Rel, MinUbuntuRel, MaxUbuntuRel) when
is_integer(MinUbuntuRel), is_integer(MaxUbuntuRel) ->
Root = otp_release_path("ubuntu"),
lists:foldl(fun (ChkUbuntuRel, Acc) ->
find_rel_ubuntu_aux1(Rel, Root++integer_to_list(ChkUbuntuRel))
++ Acc
end,
[],
lists:seq(16, UbuntuRel)).
lists:seq(MinUbuntuRel, MaxUbuntuRel)).

find_rel_ubuntu_aux1(Rel, RootWc) ->
case erlang:system_info(wordsize) of
Expand Down

0 comments on commit e19853b

Please sign in to comment.