Skip to content

Commit

Permalink
Debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pguyot committed Nov 4, 2023
1 parent b6404ea commit 6a977a9
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/libs/estdlib/test_net.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
-export([test/0]).

test() ->
erlang:display({?MODULE, ?LINE}),
ok = test_getaddrinfo(),
erlang:display({?MODULE, ?LINE}),
ok = test_getaddrinfo2(),
erlang:display({?MODULE, ?LINE}),
ok.

test_getaddrinfo() ->
Expand Down
9 changes: 9 additions & 0 deletions tests/libs/estdlib/test_ssl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
-include("etest.hrl").

test() ->
erlang:display({?MODULE, ?LINE}),
case is_ssl_available() of
true ->
erlang:display({?MODULE, ?LINE}),
test_ssl();
false ->
io:format("Warning: skipping test_ssl as ssl is not available\n"),
Expand All @@ -46,12 +48,19 @@ is_ssl_available() ->
end.

test_ssl() ->
erlang:display({?MODULE, ?LINE}),
ok = ssl:start(),
erlang:display({?MODULE, ?LINE}),
ok = test_start_twice(),
erlang:display({?MODULE, ?LINE}),
ok = test_connect_close(),
erlang:display({?MODULE, ?LINE}),
ok = test_connect_error(),
erlang:display({?MODULE, ?LINE}),
ok = test_send_recv(),
erlang:display({?MODULE, ?LINE}),
ok = ssl:stop(),
erlang:display({?MODULE, ?LINE}),
ok.

test_start_twice() ->
Expand Down
15 changes: 15 additions & 0 deletions tests/libs/estdlib/test_tcp_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@
-export([test/0]).

test() ->
erlang:display({?MODULE, ?LINE}),
ok = test_echo_server(),
erlang:display({?MODULE, ?LINE}),
ok = test_shutdown(),
erlang:display({?MODULE, ?LINE}),
ok = test_close_by_another_process(),
erlang:display({?MODULE, ?LINE}),
case get_otp_version() of
atomvm ->
ok = test_abandon_select();
_ ->
ok
end,
erlang:display({?MODULE, ?LINE}),
ok.

test_echo_server() ->
Expand All @@ -54,14 +59,20 @@ test_shutdown() ->
Port = 44404,
ListenSocket = start_echo_server(Port),

erlang:display({?MODULE, ?LINE}),
ok = test_shutdown_of_client_sockets(Port),
erlang:display({?MODULE, ?LINE}),

ok = close_listen_socket(ListenSocket).

test_shutdown_of_client_sockets(Port) ->
erlang:display({?MODULE, ?LINE}),
ok = test_shutdown_of_side(Port, write),
erlang:display({?MODULE, ?LINE}),
ok = test_shutdown_of_side(Port, read_write),
erlang:display({?MODULE, ?LINE}),
ok = test_shutdown_of_side(Port, read),
erlang:display({?MODULE, ?LINE}),
ok.

test_shutdown_of_side(Port, Side) ->
Expand Down Expand Up @@ -276,7 +287,9 @@ test_abandon_select() ->
test_close_by_another_process() ->
% socket:recv is blocking and the only way to interrupt it is to close
% the socket.
erlang:display({?MODULE, ?LINE}),
etest:flush_msg_queue(),
erlang:display({?MODULE, ?LINE}),

Port = 44404,
ListenSocket = start_echo_server(Port),
Expand All @@ -289,7 +302,9 @@ test_close_by_another_process() ->
ok = socket:close(ClientSocket1)
end),
% recv is blocking
erlang:display({?MODULE, ?LINE}),
{error, closed} = socket:recv(ClientSocket1, 0, 5000),
erlang:display({?MODULE, ?LINE}),

close_listen_socket(ListenSocket).

Expand Down
2 changes: 2 additions & 0 deletions tests/libs/estdlib/test_udp_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
-export([test/0]).

test() ->
erlang:display({?MODULE, ?LINE}),
ok = test_echo_server(),
erlang:display({?MODULE, ?LINE}),
ok.

test_echo_server() ->
Expand Down

0 comments on commit 6a977a9

Please sign in to comment.