1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

Merge pull request #12009 from cladmi/pr/application/board_equal/bug

dist/tools/build_system_sanity_check: check BOARD set as ?=
This commit is contained in:
Juan I Carrano 2019-08-20 16:52:21 +02:00 committed by GitHub
commit d2970332fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 4 deletions

View File

@ -126,6 +126,19 @@ check_deprecated_vars_patterns() {
| error_with_message 'Deprecated variables or patterns:'
}
# Applications Makefile must not set 'BOARD =' unconditionally
check_not_setting_board_equal() {
local patterns=()
local pathspec=()
patterns+=(-e '^[[:space:]]*BOARD[[:space:]]*=')
pathspec+=('**/Makefile')
git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \
| error_with_message 'Applications Makefile should use "BOARD ?="'
}
error_on_input() {
! grep ''
}
@ -134,6 +147,7 @@ all_checks() {
check_not_parsing_features
check_not_exporting_variables
check_deprecated_vars_patterns
check_not_setting_board_equal
}
main() {

View File

@ -1,6 +1,6 @@
include ../Makefile.tests_common
BOARD ?= microbit
BOARD = microbit
include ../Makefile.tests_common
# This test application is for the BBC micro:bit only
BOARD_WHITELIST := microbit

View File

@ -1,7 +1,6 @@
BOARD ?= sltb001a
include ../Makefile.tests_common
BOARD = sltb001a
BOARD_WHITELIST := ikea-tradfri \
slstk3401a \
slstk3402a \