Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
6571-Fix-minor-testsuite-blunders.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 6571-Fix-minor-testsuite-blunders.patch of Package erlang
From 0e7b722b6dfb2ece27bb4d62ade41089b776f10c Mon Sep 17 00:00:00 2001 From: Anders Svensson <anders@erlang.org> Date: Thu, 17 Mar 2022 12:04:47 +0100 Subject: [PATCH 1/3] Fix minor testsuite blunders Don't test that the current version isn't in the appup file since the way version numbers are handled has changed since that test was written, no longer being updated manually. As is, the relup testcase fails after the appup file is updated, until release results in a new version number. Tweak some timeouts after testing on some underpowered hosts. Remove some dead code. --- lib/diameter/test/Makefile | 5 +++-- lib/diameter/test/diameter_app_SUITE.erl | 14 ++------------ lib/diameter/test/diameter_capx_SUITE.erl | 4 ---- lib/diameter/test/diameter_compiler_SUITE.erl | 4 ++-- lib/diameter/test/diameter_distribution_SUITE.erl | 5 ----- lib/diameter/test/diameter_examples_SUITE.erl | 4 ++-- 6 files changed, 9 insertions(+), 27 deletions(-) diff --git a/lib/diameter/test/Makefile b/lib/diameter/test/Makefile index 3ae0f8eaf8..04d8a54bc0 100644 --- a/lib/diameter/test/Makefile +++ b/lib/diameter/test/Makefile @@ -131,7 +131,8 @@ help: # Exit with a non-zero status if the output looks to indicate failure. # diameter_ct:run/1 itself can't tell (it seems). The absolute -pa is -# because ct will change directories. +# because ct will change directories, and for code:lib_dir(diameter) to +# return the parent directory. $(SUITES): log opt $(ERL) -noinput \ -pa $(realpath ../ebin) \ @@ -144,7 +145,7 @@ $(SUITES): log opt # Run suites without common_test. $(SUITES:%=_%): opt $(ERL) -noinput \ - -pa ../ebin \ + -pa $(realpath ../ebin) \ -sname diameter_test_$@ \ -s diameter$@_SUITE run \ -s init stop diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl index 0211ab1982..561d4283a2 100644 --- a/lib/diameter/test/diameter_app_SUITE.erl +++ b/lib/diameter/test/diameter_app_SUITE.erl @@ -328,12 +328,7 @@ relup({App, Config}) -> UpFrom = acc_rel(Dir, Rel, Up), DownTo = acc_rel(Dir, Rel, Down), - {[Name], [Name], [], []} %% no current in up/down and go both ways - = {[Name] -- UpFrom, - [Name] -- DownTo, - UpFrom -- DownTo, - DownTo -- UpFrom}, - + {[], []} = {UpFrom -- DownTo, DownTo -- UpFrom}, [[], []] = [S -- sets:to_list(sets:from_list(S)) || S <- [UpFrom, DownTo]], @@ -345,12 +340,7 @@ relup(Config) -> run(Config, [relup]). acc_rel(Dir, Rel, List) -> - lists:foldl(fun(T,A) -> acc_rel(Dir, Rel, T, A) end, - [], - List). - -acc_rel(Dir, Rel, {Vsn, _}, Acc) -> - [write_rel(Dir, Rel, Vsn) | Acc]. + lists:map(fun({V,_}) -> write_rel(Dir, Rel, V) end, List). %% Write a rel file and return its name. write_rel(Dir, [Erts | Apps], Vsn) -> diff --git a/lib/diameter/test/diameter_capx_SUITE.erl b/lib/diameter/test/diameter_capx_SUITE.erl index 852450bc9f..35e62b7eda 100644 --- a/lib/diameter/test/diameter_capx_SUITE.erl +++ b/lib/diameter/test/diameter_capx_SUITE.erl @@ -99,10 +99,6 @@ -define(caps, #diameter_caps). -define(packet, #diameter_packet). --define(fail(T), error({T, process_info(self(), messages)})). - --define(TIMEOUT, 10000). - -define(DICTS, [rfc3588, rfc6733]). %% =========================================================================== diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl index a33da0f64e..071ab26d08 100644 --- a/lib/diameter/test/diameter_compiler_SUITE.erl +++ b/lib/diameter/test/diameter_compiler_SUITE.erl @@ -365,7 +365,7 @@ %% =========================================================================== suite() -> - [{timetrap, {seconds, 45}}]. + [{timetrap, {seconds, 200}}]. all() -> [format, @@ -386,7 +386,7 @@ run() -> run(List) -> Path = filename:join([code:lib_dir(diameter, src), "dict", ?base]), {ok, Bin} = file:read_file(Path), - ?util:run([{{?MODULE, F, [Bin]}, 30000} || F <- List]). + ?util:run([{{?MODULE, F, [Bin]}, 180000} || F <- List]). %% =========================================================================== %% format/1 diff --git a/lib/diameter/test/diameter_distribution_SUITE.erl b/lib/diameter/test/diameter_distribution_SUITE.erl index 592ec24e64..364a90f3ba 100644 --- a/lib/diameter/test/diameter_distribution_SUITE.erl +++ b/lib/diameter/test/diameter_distribution_SUITE.erl @@ -97,11 +97,6 @@ {client1, ?CLIENT}, {client2, ?CLIENT}]). -%% Options to ct_slave:start/2. --define(TIMEOUTS, [{T, 15000} || T <- [boot_timeout, - init_timeout, - start_timeout]]). - %% =========================================================================== suite() -> -- 2.34.1
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