Skip to content

Commit a66c1b8

Browse files
Merge branch 'master' into feature/instrument
2 parents 95f71bb + 1680efa commit a66c1b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+416
-574
lines changed

Diff for: .circleci/template.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ commands:
310310
name: Upload results
311311
when: always
312312
command: |
313-
tools/circleci-prepare-log-dir.sh
313+
tools/prepare-log-dir.sh
314314
if [ -n "${AWS_SECRET_ACCESS_KEY}" ]; then tools/circleci-upload-to-s3.sh; fi
315315
report_failed_test_cases_to_ga4:
316316
steps:

Diff for: .github/workflows/ci.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
## the full list of supported (prebuilt) OTP versions for ubuntu-22.04 runners
2828
## can be found here:
2929
## https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt
30-
otp: [ '25.3.2.9', '26.2.2' ]
30+
otp: [ '26.2.5.2', '27.0.1' ]
3131
runs-on: ubuntu-22.04
3232
env:
3333
PRESET: 'small_tests'
@@ -66,17 +66,17 @@ jobs:
6666
matrix:
6767
preset: [internal_mnesia, pgsql_mnesia, mysql_redis, odbc_mssql_mnesia,
6868
ldap_mnesia, elasticsearch_and_cassandra_mnesia]
69-
otp: [ '26.1.2' ]
69+
otp: [ '27.0.1' ]
7070
include:
7171
- test-spec: "default.spec"
7272
- preset: elasticsearch_and_cassandra_mnesia
7373
test-spec: "mam.spec"
7474
- preset: ldap_mnesia
7575
test-spec: "default.spec"
76-
otp: '25.3.2.6'
76+
otp: '26.2.5.2'
7777
- preset: pgsql_mnesia
7878
test-spec: "default.spec"
79-
otp: '25.3.2.6'
79+
otp: '26.2.5.2'
8080
runs-on: ubuntu-22.04
8181
steps:
8282
- uses: actions/checkout@v3
@@ -101,11 +101,11 @@ jobs:
101101
fail-fast: false
102102
matrix:
103103
preset: [pgsql_mnesia, mysql_redis, odbc_mssql_mnesia]
104-
otp: [ '26.1.2' ]
104+
otp: [ '27.0.1' ]
105105
test-spec: ["dynamic_domains.spec"]
106106
include:
107107
- preset: pgsql_mnesia
108-
otp: '25.3.2.6'
108+
otp: '26.2.5.2'
109109
test-spec: "dynamic_domains.spec"
110110
runs-on: ubuntu-22.04
111111
steps:
@@ -140,7 +140,7 @@ jobs:
140140
strategy:
141141
fail-fast: false
142142
matrix:
143-
otp: [ '25.2' ]
143+
otp: [ '26.2.5.2' ]
144144
runs-on: ubuntu-22.04
145145
steps:
146146
- uses: actions/checkout@v3
@@ -156,7 +156,7 @@ jobs:
156156
strategy:
157157
fail-fast: false
158158
matrix:
159-
otp: [ '25.2' ]
159+
otp: [ '26.2.5.2' ]
160160
runs-on: ubuntu-22.04
161161
steps:
162162
- uses: actions/checkout@v3
@@ -172,7 +172,7 @@ jobs:
172172
strategy:
173173
fail-fast: false
174174
matrix:
175-
otp: [ '25.2' ]
175+
otp: [ '26.2.5.2' ]
176176
runs-on: ubuntu-22.04
177177
steps:
178178
- uses: actions/checkout@v3
@@ -191,7 +191,7 @@ jobs:
191191
pkg: [ubuntu_xenial]
192192
runs-on: ubuntu-22.04
193193
env:
194-
ESL_ERLANG_PKG_VER: "25.0.3"
194+
ESL_ERLANG_PKG_VER: "25.3.2"
195195
pkg_PLATFORM: ${{matrix.pkg}}
196196
steps:
197197
- uses: actions/checkout@v3

Diff for: big_tests/rebar.config

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
{amqp_client, "3.13.0-rc.2"},
2323
{rabbit_common, "3.13.4"},
2424
{esip, "1.0.52"},
25-
{jid, "2.1.0", {pkg, mongoose_jid}}
25+
{jid, "2.1.0", {pkg, mongoose_jid}},
26+
{ct_groups_summary_hook, "0.1.1"}
2627
]}.

Diff for: big_tests/rebar.lock

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
{pkg,<<"credentials_obfuscation">>,<<"3.4.0">>},
99
1},
1010
{<<"csv">>,{pkg,<<"csve">>,<<"3.0.3">>},0},
11+
{<<"ct_groups_summary_hook">>,
12+
{pkg,<<"ct_groups_summary_hook">>,<<"0.1.1">>},
13+
0},
1114
{<<"escalus">>,{pkg,<<"escalus">>,<<"4.2.15">>},0},
1215
{<<"esip">>,{pkg,<<"esip">>,<<"1.0.52">>},0},
1316
{<<"exml">>,{pkg,<<"hexml">>,<<"3.4.1">>},0},
@@ -41,6 +44,7 @@
4144
{<<"cowlib">>, <<"DB8F7505D8332D98EF50A3EF34B34C1AFDDEC7506E4EE4DD4A3A266285D282CA">>},
4245
{<<"credentials_obfuscation">>, <<"34E18B126B3AEFD6E8143776FBE1CECEEA6792307C99AC5EE8687911F048CFD7">>},
4346
{<<"csv">>, <<"69E7D9B3FDC72016644368762C6A3E6CBFEB85BCCADBF1BD99AB6C827E360E04">>},
47+
{<<"ct_groups_summary_hook">>, <<"21B94902B6CF2D345F4D790D34B49654E71CB8E570DCCC9C1C3616DAE720A7AA">>},
4448
{<<"escalus">>, <<"1F153CFBEAA67B012F7A34D0AD61A8CD68ED7C0BF9F02B94606B339FBCDCD617">>},
4549
{<<"esip">>, <<"A2840287C493A4280E6FBA57A257706843B025C315875E38B03FD07190E22DBA">>},
4650
{<<"exml">>, <<"9581FE6512D9772C61BBE611CD4A8E5BB90B4D4481275325EC520F7A931A9393">>},
@@ -73,6 +77,7 @@
7377
{<<"cowlib">>, <<"E1E1284DC3FC030A64B1AD0D8382AE7E99DA46C3246B815318A4B848873800A4">>},
7478
{<<"credentials_obfuscation">>, <<"738ACE0ED5545D2710D3F7383906FC6F6B582D019036E5269C4DBD85DBCED566">>},
7579
{<<"csv">>, <<"741D1A55AABADAA3E0FE13051050101A73E90C4570B9F9403A939D9546813521">>},
80+
{<<"ct_groups_summary_hook">>, <<"997CDE48FEB0C398989E4091A341D4FFF43CFA06CDB8FB2E80CC4A0E0362691C">>},
7681
{<<"escalus">>, <<"048CEB922E64F23DD05890A60256EDC28B86969E48B0BE5FDE202F62315C9E4F">>},
7782
{<<"esip">>, <<"6F00165395900500AA262CE0297162D93931C78C1464D89FD0EDC6E3D6BC011F">>},
7883
{<<"exml">>, <<"D8E7894E2544402B4986EEB2443C15B51B14F686266F091DBF2777D1D99A2FA2">>},

Diff for: big_tests/src/ct_groups_summary_hook.erl

-175
This file was deleted.

Diff for: big_tests/src/ct_mongoose_log_hook.erl

+14-22
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
-record(state, { node_name, reader, writer,
3737
current_line_num, out_file, url_file, group, suite,
38-
priv_dir, log_flags = [] }).
38+
log_flags = [] }).
3939
-include_lib("exml/include/exml.hrl").
4040

4141
%% @doc Return a unique id for this CTH.
@@ -74,8 +74,7 @@ post_end_per_group(Group,_Config,Return,State) ->
7474
pre_init_per_testcase(TC,Config,State=#state{}) ->
7575
maybe_print_log_on_mim_node(testcase, starting, TC, State),
7676
Dog = test_server:timetrap(test_server:seconds(10)),
77-
State2 = keep_priv_dir(Config, State),
78-
State3 = ensure_initialized(Config, State2),
77+
State3 = ensure_initialized(Config, State),
7978
State4 = pre_insert_line_numbers_into_report(State3, TC),
8079
test_server:timetrap_cancel(Dog),
8180
{Config, State4}.
@@ -174,17 +173,13 @@ ensure_initialized(Config, State=#state{node_name=Node, out_file=undefined}) ->
174173
ensure_initialized(_Config, State=#state{}) ->
175174
State.
176175

177-
keep_priv_dir(Config, State) ->
178-
PrivDir = proplists:get_value(priv_dir, Config),
179-
State#state{priv_dir=PrivDir}.
180-
181176
pre_insert_line_numbers_into_report(State=#state{writer=undefined}, _TC) ->
182177
State; % Invalid state
183178
pre_insert_line_numbers_into_report(State=#state{node_name=Node, reader=Reader, writer=Writer,
184179
current_line_num=CurrentLineNum, url_file=UrlFile,
185-
priv_dir=PrivDir, group=Group, suite=Suite}, TC) ->
180+
group=Group, suite=Suite}, TC) ->
186181
CurrentLineNum2 = read_and_write_lines(Node, Reader, Writer, CurrentLineNum),
187-
add_log_link_to_line(PrivDir, UrlFile, CurrentLineNum2, Node, " when started"),
182+
add_log_link_to_line(UrlFile, CurrentLineNum2, Node, " when started"),
188183
Message = io_lib:format(
189184
"<font color=gray>INIT suite=~p group=~p testcase=~p</font>~n",
190185
[Suite, Group, TC]),
@@ -195,9 +190,9 @@ post_insert_line_numbers_into_report(State=#state{writer=undefined}, _TC) ->
195190
State; % Invalid state
196191
post_insert_line_numbers_into_report(State=#state{node_name=Node, reader=Reader, writer=Writer,
197192
current_line_num=CurrentLineNum, url_file=UrlFile,
198-
group=Group, suite=Suite, priv_dir=PrivDir}, TC) ->
193+
group=Group, suite=Suite}, TC) ->
199194
CurrentLineNum2 = read_and_write_lines(Node, Reader, Writer, CurrentLineNum),
200-
add_log_link_to_line(PrivDir, UrlFile, CurrentLineNum2, Node, " when finished"),
195+
add_log_link_to_line(UrlFile, CurrentLineNum2, Node, " when finished"),
201196
%% Write a message after the main part
202197
Message = io_lib:format(
203198
"<font color=gray>DONE suite=~p group=~p testcase=~p</font>~n",
@@ -214,25 +209,22 @@ insert_line_numbers_into_report(State=#state{node_name=Node, reader=Reader, writ
214209
%% allows to add simple links.
215210
%%
216211
%% We can't add link with label (i.e. index.html#LABEL), because it would be escaped.
217-
%% Let's create an HTML file for each link we want to insert, and insert our custom
218-
%% redirect code inside.
219212
%%
220213
%% Args:
221214
%% `Heading' - some description for the link
222-
%% `PrivDir' - current log_private directory
223-
%% `LinkName' - filename where to write our redirect code inside log_private
224215
%% `UrlFile' - destination URL to redirect to
225216
%% `Label' - position in the document
226-
add_log_link_to_line(PrivDir, UrlFile, LogLine, Node, ExtraDescription) ->
217+
add_log_link_to_line(UrlFile, LogLine, Node, ExtraDescription) ->
227218
Label = "L" ++ integer_to_list(LogLine),
228219
Heading = "View log from node " ++ atom_to_list(Node) ++ ExtraDescription,
229-
%% We need to invent something unique enough here :)
230-
LinkName = atom_to_list(Node) ++ "_" ++ integer_to_list(LogLine) ++ ".html",
220+
LinkText = atom_to_list(Node) ++ "#" ++ integer_to_list(LogLine),
231221
URL = UrlFile ++ "#" ++ Label,
232-
RedirectCode = "<meta http-equiv='refresh' content='0; url=../" ++ URL ++ "' />",
233-
WhereToWrite = filename:join(PrivDir, LinkName),
234-
file:write_file(WhereToWrite, RedirectCode),
235-
escalus_ct:add_log_link(Heading, LinkName, "text/html").
222+
ct_add_link(Heading, URL, LinkText, "text/html").
223+
224+
%% ct_logs:add_link/3 but without URL escaping
225+
ct_add_link(Heading, URL, LinkText, Type) ->
226+
Link = io_lib:format(" <a href=\"~ts\" type=~tp>~ts</a>", [URL, Type, LinkText]),
227+
ct_logs:log(Heading ++ binary_to_list(iolist_to_binary(Link)), "", []).
236228

237229
open_out_file(OutFile) ->
238230
open_file_without_linking(node(), OutFile, [write, delayed_write]).
File renamed without changes.

Diff for: big_tests/tests/acc_e2e_SUITE.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ suite() ->
6363
%%--------------------------------------------------------------------
6464

6565
init_per_suite(Config) ->
66-
{Mod, Code} = rpc(mim(), dynamic_compile, from_string, [acc_test_helper_code(Config)]),
66+
{Mod, Code} = dynamic_compile:from_string(acc_test_helper_code(Config)),
6767
rpc(mim(), code, load_binary, [Mod, "acc_test_helper.erl", Code]),
6868
recreate_table(),
6969
escalus:init_per_suite(Config).

0 commit comments

Comments
 (0)