aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-11-08 17:32:03 +0200
committerLoïc Hoguin <[email protected]>2016-11-08 17:32:03 +0200
commit9a8e5b57336134d1af11ed19403b18bd37ae7fa9 (patch)
tree3f4f3dacf7c81ad14c03c89fdbaf91ccd18b3687
parentda68b2009f59097dde61a76e3b29b9b97334dbda (diff)
downloadranch-9a8e5b57336134d1af11ed19403b18bd37ae7fa9.tar.gz
ranch-9a8e5b57336134d1af11ed19403b18bd37ae7fa9.tar.bz2
ranch-9a8e5b57336134d1af11ed19403b18bd37ae7fa9.zip
Skip SNI tests on OTP<18 in CI
-rw-r--r--Makefile11
-rw-r--r--test/acceptor_SUITE.erl8
2 files changed, 17 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2ca9290..17b9a23 100644
--- a/Makefile
+++ b/Makefile
@@ -8,12 +8,19 @@ COMPILE_FIRST = ranch_transport
CT_OPTS += -pa test -ct_hooks ranch_ct_hook []
PLT_APPS = crypto public_key ssl
-CI_OTP ?= \
+CI_OTP_NO_SNI = \
OTP_R16B OTP_R16B01 OTP_R16B02 OTP_R16B03-1 \
- OTP-17.1.2 OTP-17.2.2 OTP-17.3.4 OTP-17.4.1 OTP-17.5.6.6 \
+ OTP-17.1.2 OTP-17.2.2 OTP-17.3.4 OTP-17.4.1 OTP-17.5.6.6
+CI_OTP ?= $(CI_OTP_NO_SNI) \
OTP-18.0.3 OTP-18.1.5 OTP-18.2.4.1 OTP-18.3.4.4 \
OTP-19.0.7 OTP-19.1.5
+ifdef CI_OTP_RELEASE
+ifneq ($(filter $(CI_OTP_RELEASE),$(CI_OTP_NO_SNI)),)
+TEST_ERLC_OPTS += -DTEST_NO_SNI=1
+endif
+endif
+
# Dependencies.
TEST_DEPS = ct_helper
diff --git a/test/acceptor_SUITE.erl b/test/acceptor_SUITE.erl
index 03bcfd6..33ccd41 100644
--- a/test/acceptor_SUITE.erl
+++ b/test/acceptor_SUITE.erl
@@ -134,6 +134,13 @@ ssl_echo(_) ->
{'EXIT', _} = begin catch ranch:get_port(Name) end,
ok.
+-ifdef(TEST_NO_SNI).
+ssl_sni_echo(_) ->
+ {skip, "No SNI support."}.
+
+ssl_sni_fail(_) ->
+ {skip, "No SNI support."}.
+-else.
ssl_sni_echo(_) ->
doc("Ensure that SNI works with SSL transport."),
Name = name(),
@@ -160,6 +167,7 @@ ssl_sni_fail(_) ->
%% Make sure the listener stopped.
{'EXIT', _} = begin catch ranch:get_port(Name) end,
ok.
+-endif.
%% tcp.