1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles/tests/feature_resolution/test-complex-failure.mk
Marian Buschsieweke d29652350b
build system: Improve failure mode for FEAUTRES_REQUIRED_ANY
Failing to provide any of the required features can provide a message
such as:

    There are unsatisfied feature requirements: periph_uart|periph_lpuart

This can be confusing and may hide the actual. E.g. above message
was generated when using SPI on the `msb-430` and `stdio_uart`. However,
the MSB-430 board *does* provide `periph_uart`, so this looks like a bug
in the feature resolution. This changes the failure mode of
`FEATURES_REQUIRED_ANY` to just pick the first of the alternatives
given if none of the alternative is usable, which gives in the example
the following message instead:

    The following features may conflict: periph_spi periph_uart
    Rationale: Both SPI and UART are provided by the same USART
               peripheral

The output is less surprising and can provide non-obvious reasons
why `FEATURES_REQUIRED_ANY` failed to pick a feature. The downside is
that the alternatives are no longer visible. However, that output
likely was so confusing this might be for the best.

Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
2024-02-22 14:02:53 +01:00

16 lines
367 B
Makefile

# inputs
FEATURES_OPTIONAL := a b
FEATURES_REQUIRED := c d
FEATURES_REQUIRED_ANY := e|f|d a|h|i
FEATURES_PROVIDED := a b c d e f g
FEATURES_BLACKLIST := a
FEATURES_CONFLICT := f:e c:d
# expected results
EXPECTED_FEATURES_USED := a b c d
EXPECTED_FEATURES_MISSING :=
EXPECTED_FEATURES_USED_BLACKLISTED := a
EXPECTED_FEATURES_CONFLICTING := c d
include Makefile.test