mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #12638 from aabadie/pr/make/application_name_tests
tests: use common APPLICATION definition + enforce the pattern with CI check
This commit is contained in:
commit
6acf47e8f6
14
dist/tools/buildsystem_sanity_check/check.sh
vendored
14
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -188,6 +188,19 @@ check_board_insufficient_memory_not_in_makefile() {
|
|||||||
| error_with_message 'Move BOARD_INSUFFICIENT_MEMORY to Makefile.ci'
|
| error_with_message 'Move BOARD_INSUFFICIENT_MEMORY to Makefile.ci'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Test applications must not define the APPLICATION variable
|
||||||
|
checks_tests_application_not_defined_in_makefile() {
|
||||||
|
local patterns=()
|
||||||
|
local pathspec=()
|
||||||
|
|
||||||
|
patterns+=(-e '^[[:space:]]*APPLICATION[[:space:]:+]=')
|
||||||
|
|
||||||
|
pathspec+=('tests/**/Makefile')
|
||||||
|
|
||||||
|
git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \
|
||||||
|
| error_with_message "Don't define APPLICATION in test Makefile"
|
||||||
|
}
|
||||||
|
|
||||||
error_on_input() {
|
error_on_input() {
|
||||||
! grep ''
|
! grep ''
|
||||||
}
|
}
|
||||||
@ -200,6 +213,7 @@ all_checks() {
|
|||||||
check_cpu_cpu_model_defined_in_makefile_features
|
check_cpu_cpu_model_defined_in_makefile_features
|
||||||
check_not_setting_board_equal
|
check_not_setting_board_equal
|
||||||
check_board_insufficient_memory_not_in_makefile
|
check_board_insufficient_memory_not_in_makefile
|
||||||
|
checks_tests_application_not_defined_in_makefile
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
APPLICATION ?= tests_$(notdir $(patsubst %/,%,$(CURDIR)))
|
APPLICATION ?= tests_$(notdir $(patsubst %/,%,$(CURDIR)))
|
||||||
ifneq (,$(filter tests_driver_%,$(APPLICATION)))
|
ifneq (,$(filter tests_driver_%,$(APPLICATION)))
|
||||||
BOARD ?= samr21-xpro
|
BOARD ?= samr21-xpro
|
||||||
endif
|
endif
|
||||||
BOARD ?= native
|
BOARD ?= native
|
||||||
RIOTBASE ?= $(CURDIR)/../..
|
RIOTBASE ?= $(CURDIR)/../..
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
APPLICATION = cflags_with_spaces
|
include ../Makefile.tests_common
|
||||||
BOARD ?= native
|
|
||||||
RIOTBASE ?= $(CURDIR)/../..
|
|
||||||
|
|
||||||
CFLAGS += -DSUPER_STRING='"I love sentences with spaces"'
|
CFLAGS += -DSUPER_STRING='"I love sentences with spaces"'
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
APPLICATION = driver_sht2x
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
FEATURES_REQUIRED = periph_i2c
|
FEATURES_REQUIRED += periph_i2c
|
||||||
|
|
||||||
USEMODULE += sht2x
|
USEMODULE += sht2x
|
||||||
USEMODULE += xtimer
|
USEMODULE += xtimer
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = driver_tps6274x
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += tps6274x
|
USEMODULE += tps6274x
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = driver_vcnl40x0
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += vcnl4010
|
USEMODULE += vcnl4010
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
APPLICATION = external_module_dirs
|
include ../Makefile.tests_common
|
||||||
BOARD ?= native
|
|
||||||
RIOTBASE ?= $(CURDIR)/../..
|
|
||||||
|
|
||||||
USEMODULE += random
|
USEMODULE += random
|
||||||
|
|
||||||
USEMODULE += external_module
|
USEMODULE += external_module
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
# name of your application
|
# use samr21-xpro as default:
|
||||||
APPLICATION = gomach
|
|
||||||
|
|
||||||
# This has to be the absolute path to the RIOT base directory:
|
|
||||||
RIOTBASE ?= $(CURDIR)/../..
|
|
||||||
|
|
||||||
# If no BOARD is found in the environment, use this default:
|
|
||||||
BOARD ?= samr21-xpro
|
BOARD ?= samr21-xpro
|
||||||
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
# Currently, GoMacH has only been tested and evaluated through on samr21-xpro and iotlab-m3
|
# Currently, GoMacH has only been tested and evaluated through on samr21-xpro and iotlab-m3
|
||||||
# nodes. Once GoMacH has also been tested through on other devices, the whitelist should
|
# nodes. Once GoMacH has also been tested through on other devices, the whitelist should
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
# name of your application
|
# use samr21-xpro as default:
|
||||||
APPLICATION = lwmac
|
|
||||||
|
|
||||||
# This has to be the absolute path to the RIOT base directory:
|
|
||||||
RIOTBASE ?= $(CURDIR)/../..
|
|
||||||
|
|
||||||
# If no BOARD is found in the environment, use this default:
|
|
||||||
BOARD ?= samr21-xpro
|
BOARD ?= samr21-xpro
|
||||||
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
# Currently, LWMAC is only tested and evaluated through on samr21-xpro.
|
# Currently, LWMAC is only tested and evaluated through on samr21-xpro.
|
||||||
# Once LWMAC has also been tested through on other boards, the whitelist should
|
# Once LWMAC has also been tested through on other boards, the whitelist should
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = gnrc_mac_timeout
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += gnrc_mac
|
USEMODULE += gnrc_mac
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = isr_yield_higher
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += xtimer
|
USEMODULE += xtimer
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = pkg_fatfs_vfs
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += fatfs_vfs
|
USEMODULE += fatfs_vfs
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = socket_zep
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
BOARD_WHITELIST = native # socket_zep is only available on native
|
BOARD_WHITELIST = native # socket_zep is only available on native
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
APPLICATION = thread_float
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += printf_float
|
USEMODULE += printf_float
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# name of your application
|
|
||||||
APPLICATION = trace
|
|
||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += trace
|
USEMODULE += trace
|
||||||
|
Loading…
Reference in New Issue
Block a user