mbed-os/storage/blockdevice/COMPONENT_QSPIF
Robert Walton fca7323f73 CMake: QSPIFBlockDevice: Guard unit test directory
In the QSPIFBlockDevice component we checked if BUILD_TESTING was
enabled before adding the QSPIFBlockDevice/UNITTESTS subdirectory. In
the parent blockdevice/CMakeLists.txt we added the QSPIFBlockDevice
subdirectory to the build under two separate conditions:

* when "QSPIF" is present in MBED_TARGET_LABELS
* when building only unit tests

This wasn't quite enough, as when we build greentea tests for some
targets QSPIF is enabled in MBED_TARGET_LABELS, causing the
QSPIFBlockDevice subdirectory and its unit tests to be added when
building greentea tests. This caused a test failure on targets which
enable QSPIF:

```
The following tests FAILED:
	 40 - qspif-unittest_NOT_BUILT (Not Run)
```

To fix this we need to specifically check that we're not building
greentea tests before adding the QSPIFBlockDevice/UNITTESTS directory to
the project.

Part of this issue is our reliance on MBED_TARGET_LABELS to pull
features in to the build. We should refactor our usage of
MBED_TARGET_LABELS and use CMake target dependencies where possible.
Then we wouldn't need to add subdirectories under various, often
conflicting, scenarios. Instead the targets would always be available
and we would just choose which ones to actually build in different cases
using CMake target linking.
2021-09-15 11:38:30 +01:00
..
UNITTESTS QSPIFBlockDevice: Add unit test for the S25FS512S quirk 2021-09-10 11:33:34 +01:00
include/QSPIF QSPIFBlockDevice: Add quirk for inconsistent CR3NV register value 2021-09-10 10:49:37 +01:00
source QSPIFBlockDevice: Add quirk to ignore overlaying sectors on S25FS512S 2021-09-10 10:49:37 +01:00
CMakeLists.txt CMake: QSPIFBlockDevice: Guard unit test directory 2021-09-15 11:38:30 +01:00
mbed_lib.json QSPIFBlockDevice: fix misconception in minimum program size 2020-11-12 14:36:55 +00:00