diff --git a/tests/Makefile.tests_common b/tests/Makefile.tests_common new file mode 100644 index 0000000000..1fb2823490 --- /dev/null +++ b/tests/Makefile.tests_common @@ -0,0 +1,3 @@ +export BOARD ?= native +export RIOTBASE ?= $(CURDIR)/../.. +export QUIET ?= 1 diff --git a/tests/test_bloom/Makefile b/tests/test_bloom/Makefile index 16d9f21ac5..5d0855c6fa 100644 --- a/tests/test_bloom/Makefile +++ b/tests/test_bloom/Makefile @@ -1,11 +1,5 @@ -# name of your application export PROJECT = test_bloom - -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common ifneq (,$(filter msb-430,$(BOARD))) include $(RIOTBASE)/Makefile.unsupported diff --git a/tests/test_bloom_bytes/Makefile b/tests/test_bloom_bytes/Makefile index 0c7eda5a7b..5b21dde8e4 100644 --- a/tests/test_bloom_bytes/Makefile +++ b/tests/test_bloom_bytes/Makefile @@ -1,11 +1,5 @@ -# name of your application export PROJECT = test_bloom - -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common ifneq (,$(filter msb-430,$(BOARD))) include $(RIOTBASE)/Makefile.unsupported diff --git a/tests/test_float/Makefile b/tests/test_float/Makefile index a9629dc0df..69d4ae71f4 100644 --- a/tests/test_float/Makefile +++ b/tests/test_float/Makefile @@ -1,10 +1,4 @@ -# name of your application export PROJECT = test_float - -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_hwtimer/Makefile b/tests/test_hwtimer/Makefile index 1f0b4778a2..87bfc5a801 100644 --- a/tests/test_hwtimer/Makefile +++ b/tests/test_hwtimer/Makefile @@ -1,9 +1,4 @@ -# name of your application export PROJECT = test_hwtimer - -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_hwtimer_spin/Makefile b/tests/test_hwtimer_spin/Makefile index 49199b8ad3..ec99e5478a 100644 --- a/tests/test_hwtimer_spin/Makefile +++ b/tests/test_hwtimer_spin/Makefile @@ -1,11 +1,5 @@ -# define application name export PROJECT = test_hwtimer_spin - -# for easy switching of boards -export BOARD ?= native - -# the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common # modules to include USEMODULE += auto_init diff --git a/tests/test_irq/Makefile b/tests/test_irq/Makefile index 6b21e27f44..362b1be879 100644 --- a/tests/test_irq/Makefile +++ b/tests/test_irq/Makefile @@ -1,11 +1,5 @@ -# name of your application export PROJECT = test_irq -# -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common ifeq (,$(filter native,$(BOARD))) include $(RIOTBASE)/Makefile.unsupported diff --git a/tests/test_nativenet/Makefile b/tests/test_nativenet/Makefile index 2863737ec6..1601400e6f 100644 --- a/tests/test_nativenet/Makefile +++ b/tests/test_nativenet/Makefile @@ -1,14 +1,8 @@ debug: CFLAGS += -g debug: CFLAGS += -DENABLE_DEBUG -# name of your application export PROJECT = test_nativenet -# -# for easy switching of boards -export BOARD = native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common ifeq (,$(filter native,$(BOARD))) include $(RIOTBASE)/Makefile.unsupported diff --git a/tests/test_pnet/Makefile b/tests/test_pnet/Makefile index 1955f1fa40..7fbc08ee5b 100644 --- a/tests/test_pnet/Makefile +++ b/tests/test_pnet/Makefile @@ -7,17 +7,8 @@ #### ../../boards for board definitions (if you have one or more) #### -# name of your application export PROJECT =test_pnet - -# for easy switching of boards -ifeq ($(strip $(BOARD)),) - export BOARD = native -endif - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../.. -export RIOTBOARD =$(RIOTBASE)/boards +include ../Makefile.tests_common ifeq ($(BOARD),stm32f4discovery) include Makefile.$(BOARD) diff --git a/tests/test_pthread/Makefile b/tests/test_pthread/Makefile index d161e7b42f..3655989994 100644 --- a/tests/test_pthread/Makefile +++ b/tests/test_pthread/Makefile @@ -1,11 +1,6 @@ -# name of your project export PROJECT = test_pthread +include ../Makefile.tests_common -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. ## Modules to include. USEMODULE += posix diff --git a/tests/test_semaphore/Makefile b/tests/test_semaphore/Makefile index ab79a4a463..a6c7241a09 100644 --- a/tests/test_semaphore/Makefile +++ b/tests/test_semaphore/Makefile @@ -1,11 +1,6 @@ -# name of your application export PROJECT = test_semaphore +include ../Makefile.tests_common -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. ## Modules to include. USEMODULE += semaphore diff --git a/tests/test_sha256/Makefile b/tests/test_sha256/Makefile index 3ddccf632d..ca270f605a 100644 --- a/tests/test_sha256/Makefile +++ b/tests/test_sha256/Makefile @@ -1,11 +1,6 @@ -# name of your application export PROJECT = test_sha256 +include ../Makefile.tests_common -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. ## Modules to include. USEMODULE += crypto_sha256 diff --git a/tests/test_shell/Makefile b/tests/test_shell/Makefile index f01336eb6a..cd87434f93 100644 --- a/tests/test_shell/Makefile +++ b/tests/test_shell/Makefile @@ -1,11 +1,5 @@ -# name of your application export PROJECT = test_shell - -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common ## Modules to include. diff --git a/tests/test_thread_basic/Makefile b/tests/test_thread_basic/Makefile index 0b7ef6799d..108f8b1aa3 100644 --- a/tests/test_thread_basic/Makefile +++ b/tests/test_thread_basic/Makefile @@ -1,10 +1,4 @@ -# name of your application export PROJECT = test_thread_basic - -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_thread_exit/Makefile b/tests/test_thread_exit/Makefile index c000b5842d..504d5a9cc4 100644 --- a/tests/test_thread_exit/Makefile +++ b/tests/test_thread_exit/Makefile @@ -1,10 +1,4 @@ -# name of your application export PROJECT = test_thread_exit - -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_thread_msg/Makefile b/tests/test_thread_msg/Makefile index f96119e9c6..5f60dfbfd8 100644 --- a/tests/test_thread_msg/Makefile +++ b/tests/test_thread_msg/Makefile @@ -1,9 +1,4 @@ -# name of your application export PROJECT = test_thread_msg - -export BOARD ?= native - -# the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_thread_msg_block_w_queue/Makefile b/tests/test_thread_msg_block_w_queue/Makefile index 2c6cecfcce..e74bbc4b64 100644 --- a/tests/test_thread_msg_block_w_queue/Makefile +++ b/tests/test_thread_msg_block_w_queue/Makefile @@ -1,9 +1,4 @@ -# name of your project export PROJECT = test_thread_msg_block_w_queue - -export BOARD ?= native - -# the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_thread_msg_block_wo_queue/Makefile b/tests/test_thread_msg_block_wo_queue/Makefile index 0ff66bfdd3..8f6a7e4423 100644 --- a/tests/test_thread_msg_block_wo_queue/Makefile +++ b/tests/test_thread_msg_block_wo_queue/Makefile @@ -1,9 +1,4 @@ -# name of your project export PROJECT = test_thread_msg_block_wo_queue - -export BOARD ?= native - -# the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../.. +include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include diff --git a/tests/test_vtimer_msg/Makefile b/tests/test_vtimer_msg/Makefile index 439cdd428d..beb8e3800f 100644 --- a/tests/test_vtimer_msg/Makefile +++ b/tests/test_vtimer_msg/Makefile @@ -1,11 +1,6 @@ -# name of your application export PROJECT = test_vtimer_msg +include ../Makefile.tests_common -# for easy switching of boards -export BOARD ?= native - -# this has to be the absolute path of the RIOT-base dir -export RIOTBASE = $(CURDIR)/../.. ## Modules to include. USEMODULE += auto_init