From 1643470a8772069d9984e217f6e2fd9b1c84fb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 12 May 2015 15:07:05 +0300 Subject: Autopatch by default Also fix a number of issues with packages from the index. Some packages were temporarily removed and will be added back once they build correctly. --- test/Makefile | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile index 5449ee5..9b7d4a1 100644 --- a/test/Makefile +++ b/test/Makefile @@ -35,7 +35,9 @@ endif .PHONY: all clean app ct eunit tests-cover docs -all: clean app ct eunit tests-cover docs +.NOTPARALLEL: + +all: clean app ct eunit tests-cover docs pkgs $i '+---------------------+' $i '| All tests passed. |' $i '+---------------------+' @@ -195,8 +197,7 @@ docs: app1 $t rm app1/Makefile-doc $i "Test 'docs' passed." -# Test application used for testing. -app1: +define app1_setup $i "Setting up app." $t mkdir -p app1 $t cd .. && make @@ -207,6 +208,35 @@ app1: "-export([succ/1])." \ "succ(N) -> N + 1." \ > app1/src/m.erl +endef + +define pkg_test_target +pkg-$(1)-clean: + $t rm -rf app1 + +pkg-$(1)-app1: + $(call app1_setup) + +pkg-$(1): pkg-$(1)-clean pkg-$(1)-app1 + $i + $i " pkgs: Checking that '$(1)' builds correctly" + $i + $t printf "%s\n" \ + "PROJECT = app1" \ + "DEPS = $(1)" \ + "include erlang.mk" \ + > app1/Makefile + cp ../packages.v2.tsv app1/.erlang.mk.packages.v2 + $t make -C app1 +endef + +$(foreach pkg,$(shell awk '{print $$1}' ../packages.v2.tsv),$(eval $(call pkg_test_target,$(pkg)))) + +pkgs: $(foreach pkg,$(shell awk '{print $$1}' ../packages.v2.tsv),pkg-$(pkg)) + +# Test application used for testing. +app1: + $(call app1_setup) # Extra module in app1 used for testing eunit define create-module-t -- cgit v1.2.3