From f8d752f47562a3a659abbbb3b5f139638f4d7023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 10 Jan 2019 16:27:54 +0100 Subject: Skip h2specd_SUITE if h2specd doesn't exist Better skip than fail when a distribution has a too old Go. --- test/h2specd_SUITE.erl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test/h2specd_SUITE.erl') diff --git a/test/h2specd_SUITE.erl b/test/h2specd_SUITE.erl index 171e862..79a51f4 100644 --- a/test/h2specd_SUITE.erl +++ b/test/h2specd_SUITE.erl @@ -27,11 +27,15 @@ all() -> init_per_suite(Config) -> case os:getenv("H2SPECD") of false -> skip; - _ -> - %% We ensure that SASL is started for this test suite - %% to have the crash reports in the CT logs. - {ok, Apps} = application:ensure_all_started(sasl), - [{sasl_started, Apps =/= []}|Config] + H2specd -> + case filelib:is_file(H2specd) of + false -> skip; + true -> + %% We ensure that SASL is started for this test suite + %% to have the crash reports in the CT logs. + {ok, Apps} = application:ensure_all_started(sasl), + [{sasl_started, Apps =/= []}|Config] + end end. end_per_suite(Config) -> -- cgit v1.2.3