mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
d29652350b
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> |
||
---|---|---|
.. | ||
Makefile | ||
Makefile.test | ||
README.md | ||
test-blacklist-failure.mk | ||
test-blacklist-optional.mk | ||
test-blacklist-success.mk | ||
test-complex-failure.mk | ||
test-complex-success.mk | ||
test-conflict-failure.mk | ||
test-conflict-optional.mk | ||
test-conflict-success.mk | ||
test-empty.mk | ||
test-required-any-corner-case.mk | ||
test-required-any-fail.mk | ||
test-required-any-order.mk | ||
test-required-any-reuse-optional.mk | ||
test-required-any-reuse-required.mk | ||
test-trivial-failure.mk | ||
test-trivial-success.mk |
Simple Unit Tests for Feature Resolution
This folder contains a Makefile that runs a set of unit tests for the feature resolution logic.
Each unit test is defined in a file named tests-<NAME_OF_TEST>.mk
in which the inputs and the
expected outputs are defined. Finally, the include Makefile.test
, which will perform the tests.
The tests can be run simply by typing make
. Also, make static-test
at the root of the repo will
run these tests and, hence, these tests are also executed on each CI run.
Adding new Test Cases
Just create a new tests-<NAME_OF_NEW_TEST>.mk
file and start with the contests of an existing
test case and change the inputs and expected outputs accordingly.