summaryrefslogtreecommitdiff
path: root/lib/asn1
diff options
context:
space:
mode:
authorMaxim Fedorov <maximfca@gmail.com>2021-09-22 09:22:08 -0700
committerMaxim Fedorov <maximfca@gmail.com>2021-11-08 20:07:05 -0800
commitfd9695b5b736dc3209ea8e17561b6338da6c96be (patch)
tree7f85ab10c5b29c6f18fe77baebada00e282b3d06 /lib/asn1
parent04415034525f03e235f683f34a08c9b0eb815c9c (diff)
downloaderlang-fd9695b5b736dc3209ea8e17561b6338da6c96be.tar.gz
[asn1] use ?CT_PEER instead of deprecated slave node
Convert asn1 application test cases to use new peer module instead of deprecated 'slave'.
Diffstat (limited to 'lib/asn1')
-rw-r--r--lib/asn1/test/asn1_SUITE.erl17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index a1cc32da86..4169b12e40 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -715,18 +715,17 @@ ber_decode_error(Config, Rule, Opts) ->
ber_decode_error:run(Opts).
otp_14440(_Config) ->
- Args = " -pa \"" ++ filename:dirname(code:which(?MODULE)) ++ "\"",
- {ok,N} = slave:start(hostname(), otp_14440, Args),
+ {ok, Peer, N} = ?CT_PEER(),
Result = rpc:call(N, ?MODULE, otp_14440_decode, []),
io:format("Decode result = ~p~n", [Result]),
+ peer:stop(Peer),
case Result of
{exit,{error,{asn1,{invalid_value,5}}}} ->
- ok = slave:stop(N);
+ ok;
%% We get this if stack depth limit kicks in:
{exit,{error,{asn1,{unknown,_}}}} ->
- ok = slave:stop(N);
+ ok;
_ ->
- _ = slave:stop(N),
ct:fail(Result)
end.
%%
@@ -1395,11 +1394,3 @@ all_called_1([F|T]) when is_atom(F) ->
L ++ all_called_1(T);
all_called_1([]) ->
[].
-
-hostname() ->
- hostname(atom_to_list(node())).
-
-hostname([$@ | Hostname]) ->
- list_to_atom(Hostname);
-hostname([_C | Cs]) ->
- hostname(Cs).