1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

dist/tools: Check BOARD_INSUFFICIENT_MEMORY usage

Enforce BOARD_INSUFFICIENT_MEMORY is not managed in the Makefile in the examples
This commit is contained in:
Marian Buschsieweke 2019-10-11 16:37:11 +02:00
parent ba90ba2e2f
commit 2c996057c4
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 15 additions and 0 deletions

View File

@ -172,6 +172,20 @@ check_not_setting_board_equal() {
| error_with_message 'Applications Makefile should use "BOARD ?="'
}
# Examples must not provide BOARD_INSUFFICIENT_MEMORY in Makefile, but in
# Makefile.ci
check_board_insufficient_memory_not_in_makefile() {
local patterns=()
local pathspec=()
patterns+=(-e '^[[:space:]]*BOARD_INSUFFICIENT_MEMORY[[:space:]:]*=')
pathspec+=('examples*/Makefile')
git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \
| error_with_message 'Move BOARD_INSUFFICIENT_MEMORY to Makefile.ci'
}
error_on_input() {
! grep ''
}
@ -183,6 +197,7 @@ all_checks() {
check_board_do_not_include_cpu_features_dep
check_cpu_cpu_model_defined_in_makefile_features
check_not_setting_board_equal
check_board_insufficient_memory_not_in_makefile
}
main() {

Binary file not shown.