diff options
author | Loïc Hoguin <[email protected]> | 2019-01-10 16:27:54 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-01-10 16:27:54 +0100 |
commit | f8d752f47562a3a659abbbb3b5f139638f4d7023 (patch) | |
tree | 550ff96941a4761e5de6dad98ea4c10f04f9d3e1 /test | |
parent | 286a1b9f3dfef5f0d548bf82642696ecd1294103 (diff) | |
download | gun-f8d752f47562a3a659abbbb3b5f139638f4d7023.tar.gz gun-f8d752f47562a3a659abbbb3b5f139638f4d7023.tar.bz2 gun-f8d752f47562a3a659abbbb3b5f139638f4d7023.zip |
Skip h2specd_SUITE if h2specd doesn't exist
Better skip than fail when a distribution has a too old Go.
Diffstat (limited to 'test')
-rw-r--r-- | test/h2specd_SUITE.erl | 14 |
1 files changed, 9 insertions, 5 deletions
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) -> |