Merge pull request #12452 from aabadie/pr/make/fail_by_default_on_expect_errors

Makefile.include: fail by default when errors are expected
This commit is contained in:
Francisco 2019-10-23 10:47:36 +02:00 committed by GitHub
commit 720d4bde4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -811,7 +811,12 @@ ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
$(shell $(COLOR_ECHO) "\n$(COLOR_YELLOW)EXPECT undesired behaviour!$(COLOR_RESET)" 1>&2)
endif
# Fail by default when errors are expected
CONTINUE_ON_EXPECTED_ERRORS ?= 0
ifneq (, $(EXPECT_ERRORS))
ifneq (1,$(CONTINUE_ON_EXPECTED_ERRORS))
$(error You can let the build continue on expected errors by setting CONTINUE_ON_EXPECTED_ERRORS=1 to the command line)
endif
$(shell $(COLOR_ECHO) "\n\n$(COLOR_RED)EXPECT ERRORS!$(COLOR_RESET)\n\n" 1>&2)
endif