Commit Graph

33552 Commits (7350b03088f3a95d0fb15733ceada8317d33ac92)

Author SHA1 Message Date
Martin Kojtal 7350b03088
Merge pull request #14872 from hallard/STM32WLEx
Add STM32WLE5 for custom targets LORA_E5 and RAK3172
2021-07-08 13:25:24 +02:00
Martin Kojtal f937383384
Merge pull request #14843 from AnishKumarHCL/interrupt_in_multiple_gpio
InterruptIn : STM32: Implemented error catching for multiple gpio on the same  irq line
2021-07-08 13:25:10 +02:00
Martin Kojtal 3fcc8347a9
Merge pull request #14844 from AnishKumarHCL/analogout_free_implementation
Analogout free implementation for F4/F7/H7 boards
2021-07-08 13:24:50 +02:00
Martin Kojtal 6597cd1ff2
Merge pull request #14887 from MubeenHCLite/CAN_bittimings_update
Updated can bit timing parameters as per the ISO11898-2
2021-07-08 13:19:12 +02:00
Martin Kojtal 4dea34a126
Merge pull request #14803 from Patater/fetchcontent-greentea
Use standalone greentea-client
2021-07-08 11:08:08 +02:00
Martin Kojtal e145ae3acd
Merge pull request #14881 from jeromecoutant/PR_LED1
Standard Pin Name: LED1 issue for targets without LED
2021-07-07 17:53:44 +02: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
Jaeden Amero b490c67241
Merge pull request #14882 from LDong-Arm/storage_tests_cleanup
Unit tests: storage: Only use headers, sources and definitions needed by each test
2021-07-07 16:12:10 +01:00
Jaeden Amero dc6dd17bb0
Merge pull request #14884 from LDong-Arm/rm_UNITTEST_macro
Remove the `UNITTEST` macro from production code
2021-07-07 15:20:31 +01:00
Jaeden Amero ef07746443 cmake: Set MBED_TEST_MODE with INTERFACE
Set MBED_TEST_MODE with INTERFACE. Use INTERFACE because mbed-os is an
interface target, and we can only set INTERFACE properties on interface
targets. This helps avoid the following error when building an
application.

    CMake Error at mbed-os/CMakeLists.txt:96 (target_compile_definitions):
      target_compile_definitions may only set INTERFACE properties on INTERFACE
        targets
2021-07-07 14:29:14 +01:00
Jaeden Amero c3f3ed7661 cmake: Use namespaced greentea client library
When using an exported or installed version of greentea, it's necessary
to use the greentea namespace.
2021-07-07 14:29:14 +01:00
Jaeden Amero 4e2206e482 Use standalone greentea-client
For CMake or Mbed CLI 2, use the standalone greentea-client.
2021-07-07 14:29:14 +01:00
Jaeden Amero 20f6b5270f Add external greentea-client dependency
Use FetchContent to obtain greentea-client at version XXX.
2021-07-07 14:29:14 +01:00
Mohammed Mubeen b5e785efd3 Updated can bit timing parameters (TSEG1, TSEG2) as per the ISO11898-2
standard
2021-07-07 16:55:20 +05:30
Martin Kojtal fea4e928d0
Merge pull request #14835 from ARMmbed/move_stubs_cellular_headers
Move stubs cellular headers
2021-07-07 11:29:37 +02:00
Jaeden Amero 0940ffe37d Add extern folder for external dependencies
Any external libraries we depend on can be added from the "extern"
folder.
2021-07-07 09:49:26 +01:00
Rajkumar Kanagaraj ef0e3f99e4 CMake: Move netsocket stub headers to the netsocket doubles dir
Previously all the netsocket stubs headers under mbed-stubs-headers,
so this PR move all netsocket stubs headers under
netsocket/tests/UNITTESTS/double directory and update CMake to include
stubs headers into mbed-stubs-netsocket library to make netsocket stubs
to be self-contained.
2021-07-07 01:33:36 -07: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
Rajkumar Kanagaraj cb343f9ba9 CMake: Update netsocket, cellular unittest to use mbed-stubs-netsocket
Update netsocket and cellular unit tests to link with a mbed-stubs-netsocket
library that it depends on instead of link with mbed-stubs
which is a group of stubs libraries.
2021-07-07 01:33:36 -07:00
Rajkumar Kanagaraj 5433365b81 CMake: Move netsocket stubs to the netsocket dir
Move the connectivity netsocket stubs into the connectivity/netsocket
component directory. So we can avoid duplicating the mbed-os source
tree in a central UNITTESTS folder.
2021-07-07 01:33:36 -07:00
Martin Kojtal 69d1db9730
Merge pull request #14849 from arduino/pr_spif_namespace
SPIFBlockDevice: Add mbed namespace to BD_ERROR_DEVICE_ERROR
2021-07-07 10:13:21 +02: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
Lingkai Dong 9b8acca136 Remove `#ifdef UNITTEST` from MbedCRC.h
Production code should not contain any test-specific checks. Rather
than checking `UNITTEST`, MbedCRC.h can simply include in all cases
<mstd_type_traits> whose unit test stub exists.

Also remove the `UNITTEST` macro from CMake definitions of kvstore
unit tests which depend on MbedCRC.h.
2021-07-06 17:29:15 +01:00
Lingkai Dong dd81b536da Unit tests: Update <mstd_type_traits> stub
The stub version of <mstd_type_traits> is mostly identical to the
production file of the same name, except the former lags behind
and doesn't contain the recent "is_constant_evaluated" feature.
It's safe to update the stub file, because "is_constant_evaluated"
only checks generic GCC and Clang versions that also apply to
compilers on PCs.

This enables MbedCRC.h to include <mstd_type_traits> without
distinguishing between Mbed applications and unit tests.
2021-07-06 17:19:19 +01:00
Lingkai Dong eb6d1aa03e Unit tests: Remove `#ifndef UNITTEST` from the mbed_assert.h stub
The stub version of mbed_assert.h is never used outside unit tests,
so the check on `UNITTEST` is redundant.
2021-07-06 16:58:06 +01:00
Lingkai Dong 3a24305916 rtos: Remove UNITTEST macro from rtos
Production code should not contain any test-specific checks. Rather
than checking `UNITTEST`, unit tests can directly set
`MBED_CONF_RTOS_PRESENT=1` to make RTOS available for testing.

Note: The cellular ATHandler test also has `MBED_CONF_RTOS_PRESENT=1`
added because `ATHandler.cpp` contains a check of this variable.
2021-07-06 16:50:49 +01:00
Jaeden Amero 9ec92f1486
Merge pull request #14874 from LDong-Arm/optional_MBED_TEST_LINK_LIBRARIES
CMake: Replace `MBED_TEST_LINK_LIBRARIES` with `MBED_TEST_BAREMETAL`
2021-07-06 16:42:25 +01:00
Lingkai Dong fcb71fb617 Unit tests: Clean up unused sources and definitions from storage 2021-07-06 16:31:03 +01:00
Lingkai Dong 5c6c08cb75 Unit tests: Make storage tests depend explicitly on headers it uses
The CMake target `mbed-headers` brings in all headers, and we are
gradually moving away from it and explicitly use only headers needed
by each unit test.
2021-07-06 16:20:16 +01:00
jeromecoutant 971d0dd3bd pin_names-generic test update before skipping it 2021-07-06 17:13:45 +02:00
jeromecoutant 64027e4a03 events-timing test should not need any LED1 2021-07-06 17:13:45 +02:00
jeromecoutant d9204d06eb generic_tests update for targets without LED1 2021-07-06 17:13:45 +02:00
Charles c8fdc0a897 added STM32WLE5CCUx + version 1.1.0 2021-07-06 17:10:53 +02:00
Charles e598f5fe61 typo + moved device_name 2021-07-06 17:10:35 +02:00
Robert Walton 55f77ea77f CMake: unit-tests: Remove --coverage option from mbed-stubs-platform
We set the --coverage flag globally in UNITTESTS/CMakeLists.txt. We
shouldn't need to also set it on mbed-stubs-platform, so remove it.
2021-07-06 13:50:46 +01:00
Robert Walton 021baa68e7 CMake: unit-tests: Split platform headers out of mbed-stubs-headers
We have a central collection of "stub headers", which makes reasoning
about dependencies rather difficult, as it forces every stub library to
depend on all available stub headers. The standard approach would be for
each stub library to expose its public headers, and its dependents to
explicitly specify a dependency on the stub library containing the
headers it needs. This is a more modular design than creating a
header-only monolith library. Move the platform stub headers from this
central library into the mbed-stubs-platform library to increase
modularity.

mbed-stubs-connectivity now depends on the mbed-stubs-platform because
it requires some headers which were moved to mbed-stubs-platform.
2021-07-06 13:50:46 +01:00
Robert Walton b73b38a01f CMake: unit-tests: Make platform stub only depend on headers it uses
Previously the platform stub library depended on `mbed-headers`, which
is a collection of all available headers in mbed-os. To make it easier
to separate the library, only depend on the headers we're actually using.
2021-07-06 13:50:46 +01: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
Robert Walton 3abc7886a9 CMake: unit-tests: CircularBuffer: Remove trailing whitespace 2021-07-06 13:48:59 +01:00
Lingkai Dong f4d551e80e CMake: Replace MBED_TEST_LINK_LIBRARIES with MBED_TEST_BAREMETAL
Currently we have `MBED_TEST_LINK_LIBRARIES` for specifying
* Whether to link `mbed-os` or `mbed-baremetal`
* Any additional libraries we want tests to link

It's not fit for purpose anymore, because
* No flavor of Mbed OS is selected by default, but we should've
really defaulted to `mbed-os`, the full RTOS version. Build doesn't
work unless `-DMBED_TEST_LINK_LIBRARIES=<...>` is passed, which
is redundant.
* A test should never need additional libraries passed via command
line - its `CMakeLists.txt` should specify what it links.

This commit replaces `MBED_TEST_LINK_LIBRARIES` with a new option
`MBED_TEST_BAREMETAL` to build a test with either RTOS (default)
or without it (by passing `-DMBED_TEST_BAREMETAL=ON`).
2021-07-06 13:43:06 +01:00
Martin Kojtal 8d3fc33965
Merge pull request #14862 from LDong-Arm/storage_stubs
Unit tests: Move storage stubs into the storage directory
2021-07-06 14:37:38 +02:00
Lingkai Dong 2a1d50f0fa app.cmake: Replace tabs with spaces
The coding standards of Mbed OS require indentation of four spaces.
2021-07-06 13:35:43 +01:00
Jaeden Amero 75808eaaf2
Merge pull request #14783 from rwalton-arm/dont_capture_stdout
tfm-post-build: Don't capture subprocess stdout
2021-07-06 12:57:45 +01:00
Martin Kojtal 80ce06fb67
Merge pull request #14876 from rwalton-arm/mbed_path_greentea
CMake: greentea: Remove dependency on global MBED_PATH
2021-07-06 13:30:25 +02:00
Robert Walton dfb4e087e3 CMake: greentea: Remove dependency on global MBED_PATH
The mbed_greentea_add_test macro required a greentea test to set an
MBED_PATH variable to the path of the mbed-os root directory, which it
attempts to add as a 'subdirectory' of the test project. We can instead
use CMake's built in CMAKE_CURRENT_LIST_DIR variable to deduce the path
to mbed-os relative to the current list file directory, removing the
need for greentea tests to set MBED_PATH.
2021-07-06 10:53:32 +01:00
Martin Kojtal 428b74623a
Merge pull request #14875 from saheerb/cloud-example-enable
enable google and azure example application tests in ci
2021-07-06 11:48:20 +02:00
Martin Kojtal 775c4486d8
Merge pull request #14864 from AnishKumarHCL/analogout_free_code_alignment
analogout: STM32: modified analogout_free api
2021-07-06 11:45:53 +02:00
Robert Walton d5a4ad1fe9 CMake: greentea: Remove call to deprecated function
mbed_greentea::mbed_greentea_add_test was calling the deprecated
`mbed_configure_app_target` function, which is currently a no-op.
2021-07-05 22:53:35 +01:00