Skip to content

Commit

Permalink
Merge pull request #21013 from maribu/build_system/feature-conflict-i…
Browse files Browse the repository at this point in the history
…s-error

build system: error on conflicting features
  • Loading branch information
Enoch247 authored Nov 22, 2024
2 parents 87ae06a + d8304fa commit d9593c7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 150 deletions.
9 changes: 2 additions & 7 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,6 @@ include $(RIOTMAKE)/usb-codes.inc.mk
# Warn if the selected board and drivers don't provide all needed features:
ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
EXPECT_ERRORS :=
EXPECT_CONFLICT :=

# Test if there where dependencies against a module in DISABLE_MODULE.
ifneq (, $(filter $(DISABLE_MODULE), $(USEMODULE)))
Expand All @@ -962,12 +961,12 @@ ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))

# Test if any used feature conflict with another one.
ifneq (,$(FEATURES_CONFLICTING))
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)The following features may conflict:$(COLOR_RESET)"\
$(shell $(COLOR_ECHO) "$(COLOR_RED)The following features conflict:$(COLOR_RESET)"\
"$(FEATURES_CONFLICTING)" 1>&2)
ifneq (, $(FEATURES_CONFLICT_MSG))
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)Rationale: $(COLOR_RESET)$(FEATURES_CONFLICT_MSG)" 1>&2)
endif
EXPECT_CONFLICT := 1
EXPECT_ERRORS := 1
endif

# If there is a whitelist, then test if the board is whitelisted.
Expand Down Expand Up @@ -1000,10 +999,6 @@ ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
endif
endif

ifneq (, $(EXPECT_CONFLICT))
$(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))
Expand Down
13 changes: 0 additions & 13 deletions tests/build_system/warn_conflict/Makefile

This file was deleted.

41 changes: 0 additions & 41 deletions tests/build_system/warn_conflict/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions tests/build_system/warn_conflict/main.c

This file was deleted.

51 changes: 0 additions & 51 deletions tests/build_system/warn_conflict/tests/01-make.py

This file was deleted.

0 comments on commit d9593c7

Please sign in to comment.