Browse Source

tests/warn_conflict: adapted to SPI API changes

pr/spi.typo
Hauke Petersen 6 years ago
parent
commit
f42ae58d27
  1. 5
      tests/warn_conflict/Makefile
  2. 4
      tests/warn_conflict/README.md
  3. 2
      tests/warn_conflict/test.py

5
tests/warn_conflict/Makefile

@ -5,8 +5,9 @@ include ../Makefile.tests_common
# so using this compile test on other boards will not provide the expected warning.
BOARD_WHITELIST := stm32f4discovery
# These features have a chance to use/access the shared `SPI_0` on stm32f4discovery,
# which would probably produce an unexpected behaviour in the user application.
# These features have a chance to use/access the shared `SPI_DEV(0)` on
# stm32f4discovery, which would probably produce an unexpected behavior in the
# user application.
FEATURES_REQUIRED = periph_dac periph_spi
include $(RIOTBASE)/Makefile.include

4
tests/warn_conflict/README.md

@ -9,7 +9,7 @@ It is expected to be presented with a warning on the conflicts with a short desc
```
$ make BOARD=stm32f4discovery
The following features may conflict: periph_dac periph_spi
Rationale: On stm32f4discovery boards there are the same pins for the DAC and/or SPI_0.
Rationale: On stm32f4discovery boards there are the same pins for the DAC and/or SPI_DEV(0).
EXPECT undesired behaviour!
```
@ -23,7 +23,7 @@ Whenever an application, such as this test, requires board features that match a
* Conflicting features are described in groups separated by a `:` (doublecolon) for each feature, e.g.:
`FEATURES_CONFLICT = periph_spi:periph_dac`, which states that `periph_spi` conflicts with `periph_dac`.
As seen above, this is the conflict of `SPI_0` pinout is shared with `DAC` on the [stm32f4discovery](https://github.com/RIOT-OS/RIOT/wiki/Board%3A-STM32F4discovery) board.
As seen above, this is the conflict of `SPI_DEV(0)` pinout is shared with `DAC` on the [stm32f4discovery](https://github.com/RIOT-OS/RIOT/wiki/Board%3A-STM32F4discovery) board.
* Distinct groups of conflicts are whitespace separated, e.g.:
`featureA:featureB featureC:featureD`, which states that `featureA` conflicts with `featureB`, and `featureC` conflicts with `featureD`.

2
tests/warn_conflict/test.py

@ -9,7 +9,7 @@ try:
output = subprocess.Popen(["make", "BOARD=stm32f4discovery"], stderr=subprocess.PIPE, stdout=subprocess.PIPE )
out,err = output.communicate()
compare = b'\x1b[1;33mThe following features may conflict:\x1b[0m \x1b[1;32mperiph_dac periph_spi\x1b[0m\n\x1b[1;33mRationale: \x1b[0mOn stm32f4discovery boards there are the same pins for the DAC and/or SPI_0.\n\n\x1b[1;33mEXPECT undesired behaviour!\x1b[0m\n'
compare = b'\x1b[1;33mThe following features may conflict:\x1b[0m \x1b[1;32mperiph_dac periph_spi\x1b[0m\n\x1b[1;33mRationale: \x1b[0mOn stm32f4discovery boards there are the same pins for the DAC and/or SPI_DEV(0).\n\n\x1b[1;33mEXPECT undesired behaviour!\x1b[0m\n'
if err == compare:
print("Test SUCCEEDED! Compile time output is as expected!\n")
else:

Loading…
Cancel
Save