aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-04-25 11:34:32 +0200
committerLoïc Hoguin <[email protected]>2018-04-25 12:07:44 +0200
commitbc79529b4dbd8951b833818ccc7179de22e8ed88 (patch)
tree77aa9c53c915e39711415eb21b137dec9c34ce93
parent8b9a09c9fe670e95fe888009e3eb28439eab9ce0 (diff)
downloadcowboy-bc79529b4dbd8951b833818ccc7179de22e8ed88.tar.gz
cowboy-bc79529b4dbd8951b833818ccc7179de22e8ed88.tar.bz2
cowboy-bc79529b4dbd8951b833818ccc7179de22e8ed88.zip
Build h2spec automatically when running tests
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 603842d..cecebd6 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,23 @@ app:: rebar.config
# DIALYZER_OPTS += --src -r test
+# h2spec setup.
+
+GOPATH := $(ERLANG_MK_TMP)/gopath
+export GOPATH
+
+H2SPEC := $(GOPATH)/src/github.com/summerwind/h2spec/h2spec
+export H2SPEC
+
+# @todo It would be better to allow these dependencies to be specified
+# on a per-target basis instead of for all targets.
+test-build:: $(H2SPEC)
+
+$(H2SPEC):
+ $(gen_verbose) mkdir -p $(GOPATH)/src/github.com/summerwind
+ $(verbose) git clone [email protected]:summerwind/h2spec.git $(dir $(H2SPEC))
+ $(verbose) make -C $(GOPATH)/src/github.com/summerwind/h2spec build
+
# Use erl_make_certs from the tested release during CI.
ci-setup:: clean deps test-deps