aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-03-10 11:21:51 +0100
committerLoïc Hoguin <[email protected]>2019-03-10 11:21:51 +0100
commitb9d329c026c8809a6b7ab3cd312598d66081e3f9 (patch)
treed059e5e0ce9f2974403102676523a7161d70ef6a
parent4918e271bd60e332a6dd1be10762dcb180a623fc (diff)
downloadcowboy-b9d329c026c8809a6b7ab3cd312598d66081e3f9.tar.gz
cowboy-b9d329c026c8809a6b7ab3cd312598d66081e3f9.tar.bz2
cowboy-b9d329c026c8809a6b7ab3cd312598d66081e3f9.zip
Don't error out when h2spec can't be compiled
-rw-r--r--Makefile4
-rw-r--r--test/h2spec_SUITE.erl15
2 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 0d6a566..38b5ed5 100644
--- a/Makefile
+++ b/Makefile
@@ -71,8 +71,8 @@ test-build:: $(H2SPEC)
$(H2SPEC):
$(gen_verbose) mkdir -p $(GOPATH)/src/github.com/summerwind
- $(verbose) git clone --depth 1 https://github.com/summerwind/h2spec $(dir $(H2SPEC))
- $(verbose) $(MAKE) -C $(dir $(H2SPEC)) build MAKEFLAGS=
+ $(verbose) git clone --depth 1 https://github.com/summerwind/h2spec $(dir $(H2SPEC)) || true
+ $(verbose) $(MAKE) -C $(dir $(H2SPEC)) build MAKEFLAGS= || true
# Use erl_make_certs from the tested release during CI
# and ensure that ct_helper is always recompiled.
diff --git a/test/h2spec_SUITE.erl b/test/h2spec_SUITE.erl
index cd68a48..173a7ac 100644
--- a/test/h2spec_SUITE.erl
+++ b/test/h2spec_SUITE.erl
@@ -28,11 +28,16 @@ init_per_suite(Config) ->
case os:getenv("H2SPEC") of
false ->
skip;
- _ ->
- cowboy_test:init_http(h2spec, #{
- env => #{dispatch => init_dispatch()},
- max_concurrent_streams => 100
- }, Config)
+ H2spec ->
+ case filelib:is_file(H2spec) of
+ false ->
+ skip;
+ true ->
+ cowboy_test:init_http(h2spec, #{
+ env => #{dispatch => init_dispatch()},
+ max_concurrent_streams => 100
+ }, Config)
+ end
end.
end_per_suite(_Config) ->