From 2dd75d838474ba8b28f7b111ba5bdd62338c5901 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Tue, 27 Oct 2015 17:24:44 +0100 Subject: [PATCH 1/2] Added option to specify make variables in the compile regression test --- regression-tests/Makefile.compile-test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/regression-tests/Makefile.compile-test b/regression-tests/Makefile.compile-test index 60eaf4279..bbf6396d3 100644 --- a/regression-tests/Makefile.compile-test +++ b/regression-tests/Makefile.compile-test @@ -36,12 +36,14 @@ nine := x x x x x x x x x max = $(subst xx,x,$(join ${1},${2})) gt = $(filter-out $(words ${1}),$(words $(call max,${1},${2}))) addzero = $(if $(call gt,${nine},$(1)),$(words ${1}),0$(words ${1})) +get_target = $(firstword $(subst :, ,$1)) +get_target_vars = $(wordlist 2,15,$(subst :, ,$1)) define dooneexample @echo Building example $(3): $(1) for target $(2) @((cd $(EXAMPLESDIR)/$(1); \ export STM32W_CPUREV=CC; \ - make TARGET=$(2) clean && make TARGET=$(2) WERROR=1) > \ + make $(4) TARGET=$(2) clean && make $(4) TARGET=$(2) WERROR=1) > \ $(3)-$(subst /,-,$(1))$(2).report 2>&1 && \ (echo $(1) $(2): OK | tee $(3)-$(subst /,-,$(1))$(2).summary) || \ (echo $(1) $(2): FAIL ಠ.ಠ | tee $(3)-$(subst /,-,$(1))$(2).summary ; \ @@ -50,7 +52,7 @@ endef define doexample $(eval i+=x) -$(call dooneexample,$(dir ${1}),$(notdir ${1}),$(call addzero,${i})) +$(call dooneexample,$(dir $(call get_target,${1})),$(notdir $(call get_target,${1})),$(call addzero,${i}),$(call get_target_vars,${1})) endef #end of GNU make magic From 43d26d9d8323b60ac8d6e942e57720d26fe73727 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Tue, 27 Oct 2015 17:26:08 +0100 Subject: [PATCH 2/2] Moved STM32W_CPUREV to the relevant compile regression test --- regression-tests/15-compile-arm-apcs-ports/Makefile | 2 +- regression-tests/Makefile.compile-test | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/regression-tests/15-compile-arm-apcs-ports/Makefile b/regression-tests/15-compile-arm-apcs-ports/Makefile index 61873d531..1ae39b62a 100644 --- a/regression-tests/15-compile-arm-apcs-ports/Makefile +++ b/regression-tests/15-compile-arm-apcs-ports/Makefile @@ -3,7 +3,7 @@ TOOLSDIR=../../tools EXAMPLES = \ hello-world/econotag \ -hello-world/mbxxx \ +hello-world/mbxxx:STM32W_CPUREV=CC \ ipv6/rpl-border-router/econotag \ er-rest-example/econotag \ webserver-ipv6/econotag \ diff --git a/regression-tests/Makefile.compile-test b/regression-tests/Makefile.compile-test index bbf6396d3..2f596aa27 100644 --- a/regression-tests/Makefile.compile-test +++ b/regression-tests/Makefile.compile-test @@ -42,7 +42,6 @@ get_target_vars = $(wordlist 2,15,$(subst :, ,$1)) define dooneexample @echo Building example $(3): $(1) for target $(2) @((cd $(EXAMPLESDIR)/$(1); \ - export STM32W_CPUREV=CC; \ make $(4) TARGET=$(2) clean && make $(4) TARGET=$(2) WERROR=1) > \ $(3)-$(subst /,-,$(1))$(2).report 2>&1 && \ (echo $(1) $(2): OK | tee $(3)-$(subst /,-,$(1))$(2).summary) || \