diff options
author | Micael Karlberg <[email protected]> | 2019-03-28 14:44:45 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-04-30 11:02:59 +0200 |
commit | e87bc034ae3f13cfcfab8677a10a088850c747a0 (patch) | |
tree | 42119e86576bf0c3e4741296ae4dc449f1c045df /erts/emulator/test/socket_SUITE.erl | |
parent | 83ba567c07f061649ddb3b850f91319c2d053fd7 (diff) | |
download | otp-e87bc034ae3f13cfcfab8677a10a088850c747a0.tar.gz otp-e87bc034ae3f13cfcfab8677a10a088850c747a0.tar.bz2 otp-e87bc034ae3f13cfcfab8677a10a088850c747a0.zip |
[socket|net|test] Update test suites to handle disabled esock
Diffstat (limited to 'erts/emulator/test/socket_SUITE.erl')
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index cefbe4c1f8..e3545ccbf9 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -1385,22 +1385,27 @@ ttest_ssockt_csockt_cases() -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% init_per_suite(Config) -> - case os:type() of - {win32, _} -> - not_yet_implemented(); - _ -> - case quiet_mode(Config) of - default -> - ?LOGGER:start(), - Config; - Quiet -> - ?LOGGER:start(Quiet), - [{esock_test_quiet, Quiet}|Config] - end + case lists:member(socket, erlang:loaded()) of + true -> + case os:type() of + {win32, _} -> + (catch not_yet_implemented()); + _ -> + case quiet_mode(Config) of + default -> + ?LOGGER:start(), + Config; + Quiet -> + ?LOGGER:start(Quiet), + [{esock_test_quiet, Quiet}|Config] + end + end; + false -> + {skip, "esock disabled"} end. end_per_suite(_) -> - ?LOGGER:stop(), + (catch ?LOGGER:stop()), ok. |