Skip to content

Commit

Permalink
squash! dist/tools: add build system sanity check script
Browse files Browse the repository at this point in the history
Fix that 'pathspec' must start by an inclusie pathspec in git 2.7.4
(ubuntu 16.04).
  • Loading branch information
cladmi committed Oct 17, 2018
1 parent 190df02 commit b95621f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dist/tools/buildsystem_sanity_check/check.sh
Expand Up @@ -15,21 +15,26 @@

: "${RIOTBASE:="$(cd "$(dirname "$0")/../../../" || exit; pwd)"}"

# Ignore this file when matching as it self matches)
PATHSPEC=(':!dist/tools/buildsystem_sanity_check/check.sh')
SCRIPT_PATH=dist/tools/buildsystem_sanity_check/check.sh

# Modules should not check the content of FEATURES_PROVIDED/_REQUIRED/OPTIONAL
# Handling specific behaviors/dependencies should by checking the content of:
# * `USEMODULE`
# * maybe `FEATURES_USED` if it is not a module (== not a periph_)
check_not_parsing_features() {
local patterns=()
local pathspec=("${PATHSPEC[@]}")
local pathspec=()

patterns+=(-e 'if.*filter.*FEATURES_PROVIDED')
patterns+=(-e 'if.*filter.*FEATURES_REQUIRED')
patterns+=(-e 'if.*filter.*FEATURES_OPTIONAL')

# Pathspec with exclude should start by an inclusive pathspec in git 2.7.4
pathspec+=('*')

# Ignore this file when matching as it self matches
pathspec+=(":!${SCRIPT_PATH}")

# These two files contain sanity checks using FEATURES_ so are allowed
pathspec+=(':!Makefile.include' ':!makefiles/info-global.inc.mk')

Expand Down

0 comments on commit b95621f

Please sign in to comment.