Commit Graph

29 Commits (master)

Author SHA1 Message Date
Lingkai Dong dca2aa79a0 Unit tests: Remove redundant CMake target mbed-headers-base
Individual libraries' `target_h` stub headers have now all been moved
from `mbed-headers-base` to `mbed-headers-<library>`.

Note: Even though headers previously in `target_h` are technically
stubs/fakes too, they are used by not only unit tests but also regular
libraries when compiled for unit tests, because no target-specific HAL
implementation exists in this case. In order for regular library
sources to pick up `target_h` headers, those headers must

* have the same names as regular headers
* appear first in include paths

This is why those headers are part of `mbed-headers-<library>` and not
`mbed-stubs-<library>`. Before this refactoring, `mbed-headers-base`
was the first in unit tests' include paths.
2021-08-02 17:42:43 +01:00
Rajkumar Kanagaraj a61392ae30 CMake: Create mbed-headers-ble library
Previously ble headers are part of mbed-headers-connectivity, this PR
moves ble headers into new mbed-headers-ble to make ble stubs to be
more self-contained and improves the composition of the library.
2021-07-21 01:51:48 -07:00
Rajkumar Kanagaraj 22b2e9f800 CMake: Add mbed-headers-nanostack-libservice library
Previously all nanostack libservice headers part of
mbed-headers-connectivity. This PR moves all the nanostack
libservice headers into newly added mbed-headers-nanostack-libraries.
This makes the nanostack libservice stubs more self-contained and
improves the composition of the library.
2021-07-13 05:49:53 -07:00
Rajkumar Kanagaraj d95bf96bbf CMake: Move nanostack libservice stubs to the connectivity/libraries dir
Move the connectivity nanostack-libservice stubs into the connectivity/libraries
directory where the nanostack libservice component present as nanostack
libservice source copied from the external repo. So we can avoid duplicating
the mbed-os source tree in a central UNITTESTS folder.
2021-07-13 05:49:53 -07:00
Rajkumar Kanagaraj d57ed8d95a CMake: Move mbedtls stub headers to the mbedtls doubles dir
Previously all the mbedtls stubs headers under mbed-stubs-headers,
so this PR move all mbedtls stubs headers under
mbedtls/tests/UNITTESTS/double directory and update CMake to include
stubs headers into mbed-stubs-mbedtls library to make mbedtls stubs
to be self-contained.
2021-07-12 07:19:04 -07:00
Rajkumar Kanagaraj ef7699d824 CMake: Update netsocket, lorawan unittest to use mbed-stubs-mbedtls
Update netsocket and lorawan unit tests to link with a mbed-stubs-mbedtls
library that it depends on instead of link with mbed-stubs
which is a group of stubs libraries.
2021-07-12 07:18:41 -07:00
Rajkumar Kanagaraj 65d202b93b CMake: unit-tests: Move mbed-headers-events to the events directory
Move the header-only mbed-headers-events library the unit test stubs
depend on into the events component directory. This makes the events
stubs more self-contained and improves the composition of the library.
2021-07-09 02:56:26 -07:00
Rajkumar Kanagaraj 88410a5f85 CMake: Move events stubs sources to the mbed-os/events directory
Move the events stub into the events component directory.
so we can avoid duplicating the mbed-os source tree in a central
UNITTESTS folder.
2021-07-09 02:56:26 -07:00
Martin Kojtal feb48fca2b
Merge pull request #14873 from ARMmbed/move_connectivity_netsocket_stubs
Move connectivity netsocket stubs
2021-07-07 17:45:47 +02:00
Jaeden Amero 8287c5221b
Merge pull request #14773 from rwalton-arm/move_platform_stub
Move mbed-stubs-platform to the platform directory
2021-07-07 16:33:35 +01:00
Rajkumar Kanagaraj 68b46f6199 CMake: Add mbed-headers-netsocket headers library
- Previously, all netsocket headers made as a part of the
mbed-headers-connectivity library. To make it easier to separate all
the netsocket headers into the separate mbed-headers-netsocket library
and keep them, as part of netsocket stubs CMake. This makes the
netsocket stubs more self-contained and improves the composition of the library.
- Update cellular, netsocket unit tests to link only with a mbed-headers-netsocket
library that it depends on instead of link with mbed-headers
which is a group of headers libraries.
2021-07-07 01:33:36 -07:00
Martin Kojtal 44d5416785
Merge pull request #14842 from ARMmbed/move_connectivity_lora_stubs
Move connectivity lora stubs
2021-07-07 09:54:58 +02:00
Robert Walton e2704749f1 CMake: unit-tests: Move mbed-headers-platform to platform directory
Move the header-only mbed-headers-platform library the unit test stubs
depend on into the platform component directory. This makes the platform
stubs more self contained and improves composition of the library.
2021-07-06 13:50:46 +01:00
Robert Walton 40435fd9b3 CMake: Move platform stubs to the mbed-os/platform directory
Move the platform stub library into the platform component directory.
This change is so we can avoid duplicating the mbed-os source tree in a
central UNITTESTS folder.
2021-07-06 13:50:42 +01:00
Lingkai Dong f8e3f71ea5 Unit tests: Remove mbed-headers-storage 2021-07-02 16:29:41 +01:00
Lingkai Dong e1331d5873 Unit tests: Create mbed-headers-kvstore
Create a CMake target mbed-headers-kvstore to separate KVStore headers
from the generic mbed-headers-storage. Update tests to use it.
2021-07-02 16:27:00 +01:00
Lingkai Dong 7c74d31c57 Unit tests: Create mbed-headers-filesystem
Create a CMake target mbed-headers-filesystem to separate FileSystem
headers from the generic mbed-headers-storage. Update tests to use it.
2021-07-02 16:25:43 +01:00
Lingkai Dong 90446a0345 Unit tests: Create mbed-headers-blockdevice
Create a CMake target mbed-headers-blockdevice to separate BlockDevice
headers from the generic mbed-headers-storage. Update tests to use it.
2021-07-02 16:25:00 +01:00
Lingkai Dong b1645b2afa Move storage stubs into subdirectories of Mbed OS storage
Move storage stubs from UNITTESTS/stubs into components inside the
top-level storage directory. Specifically,
* storage/blockdevice/tests/UNITTESTS/doubles/ for BlockDevice stubs.
* storage/kvstore/filesystemstore/tests/UNITTESTS/ for a stub used by
the FileSystemStore test. The stub has been renamed from
kv_config_stub.cpp to filesystemstore_kv_config_stub.cpp, to make it
evident why it doesn't go into storage/kvstore/kv_config/.
2021-07-02 13:44:28 +01:00
Rajkumar Kanagaraj 8c580489f6 CMake: unit-tests: Add mbed-headers-lorawan headers library
Previously, all lorawan headers made as a part of the
mbed-headers-connectivity library. To make it easier to separate all
the lorawan headers into the separate mbed-headers-lorawan library
and keep them, as part of lorawan stubs CMake. This makes the lorawan
stubs more self-contained and improves the composition of the library.
2021-07-02 05:06:09 -07:00
Rajkumar Kanagaraj bf06897b8f CMake: unit-tests: Move mbed-headers-hal to the hal directory
Move the header-only mbed-headers-hal library the unit test stubs
depend on into the hal component directory. This makes the events
stubs more self-contained and improves the composition of the library.
2021-07-01 06:07:31 -07:00
Rajkumar Kanagaraj 84bb4cc6b9 CMake: Move hal stubs sources to the mbed-os/hal directory
Move the hal stubs into the hal component directory.
so we can avoid duplicating the mbed-os source tree in a central
UNITTESTS folder.
2021-07-01 06:07:31 -07:00
Rajkumar Kanagaraj ee67310922 CMake: unit-tests: Add mbed-headers-cellular headers library
- Previously all cellular header made as a part of the
mbed-headers-connectivity library. To make it easier to separate all
the cellular headers into the separate mbed-headers-cellular library
and keep them as part of cellular stub CMake. This makes the cellular
stubs more self-contained and improves the composition of the library.
- Update all unit test that depends on cellular headers with mbed-headers-cellular library
2021-06-30 06:01:42 -07:00
Rajkumar Kanagaraj 4412e76531 CMake: unit-tests: Move mbed-headers-rtos to the rtos directory
Move the header-only mbed-headers-rtos library the unit test stubs
depend on into the rtos component directory. This makes the rtos
stubs more self-contained and improves the composition of the library.
2021-06-28 06:31:37 -07:00
Rajkumar Kanagaraj 6a5f3ae661 CMake: Move rtos stubs sources to the mbed-os/rtos directory
Move the rtos stub library into the rtos component directory.
so we can avoid duplicating the mbed-os source tree in a central
UNITTESTS folder.
2021-06-28 06:31:37 -07:00
Rajkumar Kanagaraj 05cd885931 CMake: unit-tests: Move mbed-headers-drivers to the drivers directory
Move the header-only mbed-headers-drivers library the unit test stubs
depend on into the drivers component directory. This makes the drivers
stubs more self-contained and improves the composition of the library.
2021-06-22 04:28:06 -07:00
Rajkumar Kanagaraj ae5bc5a39e CMake: Move drivers stubs to the mbed-os/drivers directory
Move the drivers stub library into the drivers component directory.
so we can avoid duplicating the mbed-os source tree in a central
UNITTESTS folder.
2021-06-22 04:28:06 -07:00
Robert Walton 314d224b30 CMake: unit-tests: Remove trailing whitespace from stubs/CMakeLists.txt 2021-06-10 23:24:43 +01:00
Rajkumar Kanagaraj d9db59f38c sort stubs into libraries 2021-05-11 02:29:56 -07:00