mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #16806 from chrysn-pull-requests/which-hunt-the-good-parts
makefiles: Reject `2>&1 >/dev/null`, and weed out remaining offenders
This commit is contained in:
commit
0989cbb864
@ -51,7 +51,7 @@ endif
|
|||||||
IOTLAB_AUTH ?= $(HOME)/.iotlabrc
|
IOTLAB_AUTH ?= $(HOME)/.iotlabrc
|
||||||
IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH))
|
IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH))
|
||||||
|
|
||||||
ifneq (0,$(shell command -v iotlab-experiment -h 2>&1 > /dev/null ; echo $$?))
|
ifneq (0,$(shell command -v iotlab-experiment -h > /dev/null 2>&1; echo $$?))
|
||||||
$(info $(COLOR_RED)'iotlab-experiment' command is not available \
|
$(info $(COLOR_RED)'iotlab-experiment' command is not available \
|
||||||
please consider installing it from \
|
please consider installing it from \
|
||||||
https://pypi.python.org/pypi/iotlabcli$(COLOR_RESET))
|
https://pypi.python.org/pypi/iotlabcli$(COLOR_RESET))
|
||||||
@ -60,7 +60,7 @@ endif
|
|||||||
|
|
||||||
ifeq (iotlab-a8-m3,$(BOARD))
|
ifeq (iotlab-a8-m3,$(BOARD))
|
||||||
ifneq (,$(filter flash% reset,$(MAKECMDGOALS)))
|
ifneq (,$(filter flash% reset,$(MAKECMDGOALS)))
|
||||||
ifneq (0,$(shell command -v iotlab-ssh -h 2>&1 > /dev/null ; echo $$?))
|
ifneq (0,$(shell command -v iotlab-ssh -h > /dev/null 2>&1; echo $$?))
|
||||||
$(info $(COLOR_RED)'iotlab-ssh' command is not available \
|
$(info $(COLOR_RED)'iotlab-ssh' command is not available \
|
||||||
please consider installing it from \
|
please consider installing it from \
|
||||||
https://pypi.python.org/pypi/iotlabsshcli$(COLOR_RESET))
|
https://pypi.python.org/pypi/iotlabsshcli$(COLOR_RESET))
|
||||||
|
14
dist/tools/buildsystem_sanity_check/check.sh
vendored
14
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -349,6 +349,19 @@ check_no_riot_config() {
|
|||||||
| error_with_message "Don't push RIOT_CONFIG_* definitions upstream. Rather define configuration via Kconfig"
|
| error_with_message "Don't push RIOT_CONFIG_* definitions upstream. Rather define configuration via Kconfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_stderr_null() {
|
||||||
|
local patterns=()
|
||||||
|
local pathspec=()
|
||||||
|
|
||||||
|
patterns+=(-e '2>[[:blank:]]*&1[[:blank:]]*>[[:blank:]]*/dev/null')
|
||||||
|
|
||||||
|
pathspec+=('Makefile*')
|
||||||
|
pathspec+=('**/Makefile*')
|
||||||
|
pathspec+=('**/*.mk')
|
||||||
|
git -C "${RIOTBASE}" grep -n "${patterns[@]}" -- "${pathspec[@]}" \
|
||||||
|
| error_with_message "Redirecting stderr and stdout to /dev/null is \`>/dev/null 2>&1\`; the other way round puts the old stderr to the new stdout."
|
||||||
|
}
|
||||||
|
|
||||||
error_on_input() {
|
error_on_input() {
|
||||||
! grep ''
|
! grep ''
|
||||||
}
|
}
|
||||||
@ -369,6 +382,7 @@ all_checks() {
|
|||||||
check_no_usemodules_in_makefile_include
|
check_no_usemodules_in_makefile_include
|
||||||
check_no_pkg_source_local
|
check_no_pkg_source_local
|
||||||
check_no_riot_config
|
check_no_riot_config
|
||||||
|
check_stderr_null
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user