Commit Graph

52 Commits (15a17dc0533f937c96cdb1f114f29313c69ab7c1)

Author SHA1 Message Date
Johannes Stratmann bf677aefb6 Revert "Merge branch 'fix-memmap-diff'"
This reverts commit 3d22c880d8.
2021-10-05 17:17:35 +02:00
Johannes Stratmann 3d22c880d8 Merge branch 'fix-memmap-diff' 2021-09-28 16:59:00 +02:00
Jerome Coutant bce33b01ff connectivity-netsocket-tests-tests-network-wifi update2
- add minor print to make debug easier
- remove not useful part
2021-09-09 10:23:42 +02:00
Jerome Coutant 787605cec4 connectivity-netsocket-tests-tests-network-wifi update
Use default NSAPI configuration
2021-09-09 10:23:33 +02:00
mateusz.kalinowski f8db068f8c Removing FIXME comment and adding empty line in the test file 2021-09-07 14:55:50 +01:00
mateusz.kalinowski ec3f4379d9 Code improvements for the unresolved comments
This patch contains improvements mentioned in the unresolved PR
comments:
- function names were changed from socket_sendmsg/socket_recvmsg to
  socket_sendto_control/socket_recvfrom_control.
- default implementation of this functions was provided in the
  NetworkStack class.
- MsgHeaderIterator accesses elements on the aligned addresses.
2021-09-03 12:49:00 +01:00
Tymoteusz Bloch bdfd98e764 New feature: send/recv message implementation added to network stack 2021-09-01 09:13:57 +01:00
Lingkai Dong 71962481a4 Unit tests: Remove mbed.h stub from target_h
The header `mbed.h` is a convenient wrapper that pre-includes some
platform headers, for use by user applications. Libraries and tests
internal to Mbed OS should not use it, and they should explicitly
include headers they need. So a stub is not needed.
2021-08-02 17:42:42 +01:00
Robert Walton a09d08917b CMake: unittests: Show all tests in CTest report
Previously a test executable was recognised as a single test by CTest.
However, test executables usually contain multiple test cases, the
results of the test cases should be individually reported. With our
previous setup we could miss test case failures that didn't cause the
executable to return an error code.

This commit uses gtest_discover_test to discover all test cases in a
test executable. This enables CTest to match test passes and failures
from the googletest binary output.
2021-07-27 21:09:39 +01:00
Hari Limaye 14cab32df4 Unittests: Make netsocket test header dependencies explicit
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-19 10:37:45 +01:00
Hari Limaye 4e54bf94d0 Unittests: Replace files with stubs in netsocket unit tests
Some netsocket unit tests depend on nanostack-libservice library, but
should use stubs instead of including the source files. We remove the
source files and link to mbed-stubs-nanostack-libservice.
2021-07-19 10:37:25 +01:00
Hari Limaye 8ad216ae1a Unittests: Clean up unused sources from netsocket
Some source files included when building netsocket unit tests with CMake
were determined to be unused by removing the files from target_sources()
and verifying that the tests still built and ran successfully. These
files have been removed from CMake builds.
2021-07-19 10:37:16 +01:00
Hari Limaye 47943dcf3d Unittests: connectivity: remove trailing whitespace 2021-07-19 10:36:54 +01: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 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 66019cb80e CMake: Move mbedtls stubs to the mbedtls dir
Move the connectivity mbedtls stubs into the connectivity/mbedtls
component directory. So we can avoid duplicating the mbed-os source
tree in a central UNITTESTS folder.
2021-07-12 07:18:41 -07:00
Rajkumar Kanagaraj bb3cd37a5e CMake: Remove mbed-stubs-rtos-headers library
- Previous changes moved all rtos stubs headers into mbed-stubs-rtos-headers
lib, but the decision to keep all stubs headers under the respective
component stubs library so moved all stubs rtos headers under
mbed-stubs-rtos and updated it depend component CMake
- Remove unnecessary add_definition call for UNITTEST as any of the stubs library
added from UNITTEST/CMakeLists.txt is not required this macro
2021-07-08 07:14:56 -07: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
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
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 f95052cf6f CMake: Require TEST_SOURCES in greentea CMake file
Assumption that greentea test file is always named main.cpp is
incorrect. Updated mbed_greentea_add_test() macro to make TEST_SOURCES
parameter compulsory, which is used to specify greentea test
file(s). This allows tests to use C, or have a different name.
Therefore also updated all pre-existing greentea test CMake files to
explicity add main.cpp to TEST_SOURCES.
2021-06-29 13:33:42 +01:00
Bora Özgen 8705a6a510 Cellular: Add AT handler buffer size to configuration 2021-06-15 15:03:57 +02:00
Rajkumar Kanagaraj 50fc85dc44 CMake: Remove all unittest.cmake script from test suite
- Remove redundant cmake script as already added the CMake configuration file
- Remove redundant empty_baseline as it is no longer needed with the help of CMake configuration file
2021-05-26 07:09:14 -07:00
Rajkumar Kanagaraj f096b3b3c3 Fix missing newline 2021-05-11 04:22:26 -07:00
Rajkumar Kanagaraj 4ade0bdbea CMake: Fix DTLS socket unittest
- Binding the socket address into network stack to avoid socket connect API call hangs in the unittest
2021-05-11 02:29:56 -07:00
Rajkumar Kanagaraj c5a4fecd28 CMake: Refactor netsocket unittest CMake
- Add Cmake configuration file
- Fix the header inclusion in DTLSSocketWrapper and TLSSocketWrapper test
2021-05-11 02:29:56 -07:00
plan-do-break-fix 915b45af23 fix(docs): corrects various typos in project documentation 2021-04-23 23:31:11 -05:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Paul Szczepanek 2fe6c7aa52 upgrade gtest to 1.10 2021-01-26 17:25:44 +00:00
Paul Szczepanek 5d26114458 astyle 2021-01-19 14:47:02 +00:00
Paul Szczepanek 5ef1f161c3
Update cert for testing server 2021-01-19 13:25:16 +00:00
Hugues Kamba 088ce195b6 CMake: Add support for netsocket/network Greentea tests
The netsocket/network Greentea tests can now be built with CMake
2021-01-11 16:34:07 +00:00
Rajkumar Kanagaraj 48829eee60 CMake: Add CMake support for netsocket greentea test 2021-01-05 09:11:22 -08:00
Martin Kojtal 9315f05719
Merge pull request #13809 from jeromecoutant/PR_CELLULAR
Remove Cellular dependency in netsocket
2020-12-17 15:41:41 +00:00
jeromecoutant 9eb86a2345 Cellular unittests update 2020-12-17 15:36:44 +01:00
jeromecoutant 8e58d64e13 Remove Cellular dependency in netsocket
Tip: Create a .mbedignore file with

connectivity/cellular*
connectivity/drivers/cellular*
2020-12-03 18:16:33 +01:00
Arto Kinnunen 9ede631e76 Update EmacTestNetworkStack
-Uncomment get_mac_address
-Document set_mac_address
2020-11-25 09:32:23 +02:00
Arto Kinnunen 2f610340ba Review corrections
-Update method set_mac_address description
-Update EMAC test method return value
2020-11-23 10:11:03 +02:00
Arto Kinnunen d001b7a441 Update unittests 2020-11-20 10:06:57 +02:00
Balaji Subramanyam 7824340676 Update README.md to remove WEP test case with NULL data 2020-10-21 10:00:27 -07:00
Balaji Subramanyam e25fdf298e Remove WEP security Green Tea Test case with NULL 2020-09-21 18:39:01 -07:00
Gregor Mayramhof 864308e020 add option for a custom cert in connectivity-netsocket-tests-tests-netsocket-tls 2020-09-01 09:18:43 +02:00
Ashok Rao 8d7c7555dc Fixing UNITTESTS 2020-08-05 17:09:21 +01:00
George Psimenos 76f37fb2bc Restructure events directory & move tests 2020-07-28 09:17:19 +01:00
Rajkumar Kanagaraj a4c1071c5b Apply suggestions from code review
Commit the reviewer suggestions

Co-authored-by: Lingkai Dong <lingkai.dong@arm.com>
2020-07-23 06:24:04 -07:00
Rajkumar Kanagaraj 947d2d75b9 Fix spell check and astyle format issue 2020-07-23 06:22:15 -07:00