Commit Graph

33494 Commits (971d0dd3bdbe1c633d1693f60a0f5c988c1ee506)

Author SHA1 Message Date
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
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
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
saheerb bf84452c60 enable google and azure example application tests in ci 2021-07-05 20:30:35 +01:00
anish-k eb06d5eb59 analogout: STM32: modified analogout_free api
removed hardcoded pins, implemented multi channel check
implemented DAC_2 initialization for H7 board
Added  #if defined DAC_CHANNEL_2
2021-07-02 21:34:24 +05:30
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 352ad1a55f Unit tests: Limit storage stubs to link what it uses 2021-07-02 13:44:28 +01:00
Lingkai Dong 7e03912587 Unit tests: Do not include mbed.h in storage stubs
The header `mbed.h` pulls in headers from a number of Mbed OS
components that are not necessarily used. It was intended for user
applications only, and libraries and unit tests should explicitly
include library headers it uses to limit dependencies.

This change avoids having to link unnecessary libraries in storage
unit tests' CMake definitions.
2021-07-02 13:44:28 +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
Lingkai Dong 436291fd89 CMake: storage: Remove trailing whitespaces 2021-07-02 13:44:28 +01:00
Lingkai Dong 71b179d12d Unit tests: Remove unused EmulatedSD 2021-07-02 13:44:28 +01:00
Robert Walton da6febf616 CMake: mbed_greentea: Remove trailing whitespace 2021-07-02 11:44:51 +01:00
Jaeden Amero 4e121a7d79
Merge pull request #14850 from OpenNuvoton/nuvoton_psa_nv_seed
PSA: Fix compile error with NV seed
2021-07-02 09:55:57 +01:00
Martin Kojtal d83494f54b
Merge pull request #14820 from paul-szczepanek-arm/events-doc
BLE: Clarify ble event docs with crossreferences
2021-07-01 17:17:49 +02:00
Martin Kojtal d0c446875b
Merge pull request #14827 from ARMmbed/move_hal_stubs
Move hal stubs to hal directory
2021-07-01 16:28:04 +02:00
Rajkumar Kanagaraj 26c608b241 CMake: Remove --coverage link option from mbed-stubs-hal
The --coverage flag globally set in UNITTESTS/CMakeLists.txt
and configuring the same option again in mbed-stubs-hal is
redundant so remove it
2021-07-01 06:07:31 -07:00
Rajkumar Kanagaraj fe0298a1a3 CMake: unit-tests: Make hal stubs only depend on headers it uses
Previously the hal 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 using.
2021-07-01 06:07:31 -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
Chun-Chieh Li 51f74bcda3 PSA: Fix compile error with NV seed
This compile error can reproduce when both PSA V7M and MBEDTLS_ENTROPY_NV_SEED are both enabled.
2021-07-01 17:44:33 +08:00
Jaeden Amero b5c2f7079e
Merge pull request #14718 from Meano/develop
Feature: Make changes for Cortex-A5 support
2021-07-01 10:23:41 +01:00
Martin Kojtal 43116a2822
Merge pull request #14807 from noonfom/m2354-psa-v8-m-devices
M2354: inherit PSA_V8_M devices
2021-07-01 10:52:53 +02:00
Martin Kojtal aa0aa3dc65
Merge pull request #14816 from artokin/nanostack_release_14_0_0_master
Nanostack release v14.0.0
2021-07-01 10:52:18 +02:00
Martin Kojtal 022b5a2b85
Merge pull request #14834 from ARMmbed/move_connectivity_cellular_stubs
Move connectivity cellular stubs
2021-06-30 17:18:28 +02:00
Martin Kojtal 66a770e92e
Merge pull request #14780 from Patater/update-python-requirements
Update python requirements
2021-06-30 16:38:02 +02:00
Jaeden Amero 270ea5deb7
Merge pull request #14815 from LDong-Arm/test_psa_k64f_k66f
Enable PSA tests on K64F/K66F and fix missing PSA Crypto init in TLSSocketWrapper
2021-06-30 15:20:05 +01:00
Rajkumar Kanagaraj d8add9e1a1 CMake: unit-tests: Make cellular stub only depend on headers it uses
Previously the connectivity cellular 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 using.
2021-06-30 06:01:42 -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 fa0ab53692 CMake: Move connectivity/cellular stubs to the mbed-os/connectivity/cellular dir
Move the connectivity cellular into the connectivity/cellular component
directory. So we can avoid duplicating the mbed-os source tree in a
central UNITTESTS folder.
2021-06-30 06:01:42 -07:00
Martin Kojtal 8902a0c866
Merge pull request #14819 from ARMmbed/move_rtos_stubs
Move rtos stubs to the rtos directory
2021-06-30 11:49:41 +02:00
Jaeden Amero 043d1735a1
Merge pull request #14837 from LDong-Arm/K64F_pin_names
K64F: Fix pin names and migrate to Arduino Uno form factor
2021-06-30 09:15:54 +01:00
Jaeden Amero 9b09cddf1d python: Update requirements
Update versions of urllib3, PyYAML, jinja2, cryptography.
2021-06-30 09:12:31 +01:00
Jaeden Amero b8388cd76e travis: Drop testing Python 3.5 and 3.6
A few libraries we depend on no longer support old versions of Python
like 3.5 and 3.6. Remove testing for these old versions.
2021-06-30 09:12:31 +01:00
Jaeden Amero 4c52ad9d3e travis: Use latest pip
As we depend on the cryptography library, and the pip version that comes
with Ubuntu Focal isn't new enough to avoid the following error about a
rust compiler and pre-built wheels, ensure Travis uses an up-to-date
pip.

    error: can't find Rust compiler

    If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

    To update pip, run:

        pip install --upgrade pip
2021-06-30 09:12:31 +01:00
Jaeden Amero 0bfb1c9215 travis: Remove trailing whitespace 2021-06-30 09:12:31 +01:00
Lingkai Dong 929956d16a TLSSocketWrapper: Initialize PSA Crypto if used by Mbed TLS
When `MBEDTLS_USE_PSA_CRYPTO` is set, Mbed TLS uses the PSA Crypto API
where possible. It is necessary to initialize PSA Crypto beforehand.
2021-06-29 18:16:51 +01:00
Arto Kinnunen 9913b59901 Update file path in CMakeLists.txt
Folder 'protocols' was missing from the file path.
2021-06-29 17:50:43 +03:00
Robert Walton 6d78f93b9e tfm-post-build: Don't capture subprocess stdout
subprocess.PIPE is used to enable the parent process to communicate with
the subprocess via pipes, which mean all stdout and stderr messages are
captured and returned as part of Popen.communicate's result tuple.

In our case, we want to display the error messages on the console, so we
don't need to capture the output from stdout.

Example of a typical error message before this change:
```
Traceback (most recent call last):
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 197, in <module>
    sign_and_merge_tfm_bin(args.tfm_target, args.target_path, args.non_secure_bin, args.secure_bin)
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 81, in sign_and_merge_tfm_bin
    " secure binary, Error code: " + str(retcode))
Exception: Unable to sign musca_b1 secure binary, Error code: 1
```

Example of the error message after this change:
```
Traceback (most recent call last):
  File "/mbed-os/tools/psa/tfm/bin_utils/wrapper.py", line 13, in <module>
    import click
ModuleNotFoundError: No module named 'click'
Traceback (most recent call last):
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 194, in <module>
    sign_and_merge_tfm_bin(args.tfm_target, args.target_path, args.non_secure_bin, args.secure_bin)
  File "platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts/generate_mbed_image.py", line 80, in sign_and_merge_tfm_bin
    raise Exception("Unable to sign " + target_name +
Exception: Unable to sign musca_b1 secure binary, Error code: 1
```

This is a significant improvement as now you can see what the reason for
the failure was.
2021-06-29 15:37:44 +01:00
Jaeden Amero 472c688a83
Merge pull request #14828 from hazzlim/add-cmake-supports-psa-tests
CMake: Add CMake to mbed-psa greentea tests
2021-06-29 15:17:01 +01:00
Hari Limaye f69a37518f CMake: Add support for PSA compliance_its tests
PSA compliance_its tests can now be built with CMake.
2021-06-29 13:33:51 +01:00