tools/check: use RIOTTOOLS variable
Follow up to #9067 and part of #8821
This commit is contained in:
parent
d6f9be77b5
commit
ef13d91bed
12
dist/tools/coccinelle/check.sh
vendored
12
dist/tools/coccinelle/check.sh
vendored
@ -6,9 +6,8 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
: ${RIOTBASE:=$(pwd)}
|
||||
|
||||
. ${RIOTBASE}/dist/tools/ci/changed_files.sh
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||
|
||||
EXIT_CODE=0
|
||||
|
||||
@ -26,7 +25,7 @@ indent() {
|
||||
|
||||
coccinelle_checkone() {
|
||||
OUT="$(spatch --very-quiet \
|
||||
--macro-file-builtins ${RIOTBASE}/dist/tools/coccinelle/include/riot-standard.h \
|
||||
--macro-file-builtins ${RIOTTOOLS}/coccinelle/include/riot-standard.h \
|
||||
--sp-file $patch ${FILES} | filter)"
|
||||
|
||||
if [ -n "$OUT" ]; then
|
||||
@ -65,10 +64,9 @@ fi
|
||||
: ${COCCINELLE_QUIET:=0}
|
||||
|
||||
if [ -z "$*" ]; then
|
||||
coccinelle_checkall ${RIOTBASE}/dist/tools/coccinelle/force
|
||||
coccinelle_checkall "${RIOTTOOLS}"/coccinelle/force
|
||||
|
||||
COCCINELLE_WARNONLY=1 \
|
||||
coccinelle_checkall ${RIOTBASE}/dist/tools/coccinelle/warn
|
||||
COCCINELLE_WARNONLY=1 coccinelle_checkall "${RIOTTOOLS}"/coccinelle/warn
|
||||
else
|
||||
for patch in "$@"; do
|
||||
coccinelle_checkone "$patch"
|
||||
|
||||
3
dist/tools/cppcheck/check.sh
vendored
3
dist/tools/cppcheck/check.sh
vendored
@ -8,7 +8,8 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
. ${RIOTBASE:+${RIOTBASE}/}dist/tools/ci/changed_files.sh
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||
|
||||
# Don't show warnings about unusedStructMembers by default
|
||||
DEFAULT_SUPPRESSIONS="${1}"
|
||||
|
||||
3
dist/tools/externc/check.sh
vendored
3
dist/tools/externc/check.sh
vendored
@ -8,7 +8,8 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
. ${RIOTBASE:+${RIOTBASE}/}dist/tools/ci/changed_files.sh
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||
|
||||
# prepare
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
7
dist/tools/flake8/check.sh
vendored
7
dist/tools/flake8/check.sh
vendored
@ -17,9 +17,8 @@ else
|
||||
CRESET=
|
||||
fi
|
||||
|
||||
DIST_TOOLS=${RIOTBASE:-.}/dist/tools
|
||||
|
||||
. "${DIST_TOOLS}/ci/changed_files.sh"
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||
|
||||
FILES=$(FILEREGEX='(?=*.py$|pyterm$)' changed_files)
|
||||
|
||||
@ -33,7 +32,7 @@ ${FLAKE8_CMD} --version &> /dev/null || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
ERRORS=$(${FLAKE8_CMD} --config="${DIST_TOOLS}/flake8/flake8.cfg" ${FILES})
|
||||
ERRORS=$(${FLAKE8_CMD} --config="${RIOTTOOLS}"/flake8/flake8.cfg ${FILES})
|
||||
|
||||
if [ -n "${ERRORS}" ]
|
||||
then
|
||||
|
||||
7
dist/tools/headerguards/check.sh
vendored
7
dist/tools/headerguards/check.sh
vendored
@ -6,9 +6,8 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
: ${RIOTBASE:=$(pwd)}
|
||||
|
||||
. ${RIOTBASE}/dist/tools/ci/changed_files.sh
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||
|
||||
EXIT_CODE=0
|
||||
|
||||
@ -21,7 +20,7 @@ filter() {
|
||||
}
|
||||
|
||||
_headercheck() {
|
||||
OUT="$(${RIOTBASE}/dist/tools/headerguards/headerguards.py ${FILES} | filter)"
|
||||
OUT="$(${RIOTTOOLS}/headerguards/headerguards.py ${FILES} | filter)"
|
||||
|
||||
if [ -n "$OUT" ]; then
|
||||
EXIT_CODE=1
|
||||
|
||||
3
dist/tools/licenses/check.sh
vendored
3
dist/tools/licenses/check.sh
vendored
@ -7,7 +7,8 @@
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
. ${RIOTBASE:+${RIOTBASE}/}dist/tools/ci/changed_files.sh
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||
|
||||
# customizable
|
||||
CHECKROOT=$(dirname "${0}")
|
||||
|
||||
3
dist/tools/pr_check/pr_check.sh
vendored
3
dist/tools/pr_check/pr_check.sh
vendored
@ -8,7 +8,8 @@
|
||||
#
|
||||
|
||||
EXIT_CODE=0
|
||||
source ./dist/tools/pr_check/check_labels.sh
|
||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
||||
. "${RIOTTOOLS}"/pr_check/check_labels.sh
|
||||
|
||||
if tput colors &> /dev/null && [ $(tput colors) -ge 8 ]; then
|
||||
CERROR="\e[1;31m"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user