Commit Graph

641 Commits (mbed-os-6.17.0-rc1)

Author SHA1 Message Date
Rajkumar Kanagaraj 8f238f13b1 CMake: Move lorawan stubs to the lorawan dir
Move the connectivity lorawan stubs into the connectivity/lorawan
component directory. So we can avoid duplicating the mbed-os source
tree in a central UNITTESTS folder.
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 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
Martin Kojtal 16acae3bd0
Merge pull request #14716 from boraozgen/at-handler-buffer-size-config
Cellular: Add AT handler buffer size to configuration
2021-06-29 11:29:48 +02:00
Rajkumar Kanagaraj 8efb322e15 CMake: unit-tests: Update connectivity stubs and their unittests
mbed-stubs-connectivity now depends on the mbed-stubs-rtos and
mbed-stubs-rtos-headers because it requires some headers and sources
which were moved to mbed-stubs-rtos and mbed-stubs-rtos-headers.
2021-06-28 06:31:37 -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 062638e835 CMake: Move rtos stub headers to the rtos/tests/UNITTESTS/double directory
Move rtos stubs headers to the mbed-os/rtos/tests/UNITTESTS/double
directory and update CMake to create a mbed-stubs-rtos-headers
library for rtos stub headers
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
Paul Szczepanek 7b4d1d59f1 add new BLE API call to sync security db with persisten storage 2021-06-23 22:25:00 +01: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
Bora Özgen 8705a6a510 Cellular: Add AT handler buffer size to configuration 2021-06-15 15:03:57 +02:00
Martin Kojtal 50e23b75f8
Merge pull request #14765 from rwalton-arm/fix_unittest_check
Fix unittest check
2021-06-14 10:17:17 +02:00
Paul Szczepanek 86426102ec
remove unittest readme 2021-06-11 10:44:38 +01:00
Robert Walton d4f01818b4 CMake: unit-tests: Fetch googletest master
googletest now follows the "Abseil Live at HEAD" philosophy, which means
they recommend using the latest commit on the master branch and always
compiling from source. They recommend this to avoid version mismatch
issues and "diamond dependency" problems which are common in dependency
graphs with pinned versions. Google make the "promise" that future
changes won't break downstream code if it follows the "Abseil
compatability guidelines".

Upping the version to master also fixes some CMake configure time
warnings that were present with the older tagged releases of googletest:

CMake Deprecation Warning at __build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at __build/_deps/googletest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at __build/_deps/googletest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
2021-06-10 23:25:19 +01:00
Robert Walton 314d224b30 CMake: unit-tests: Remove trailing whitespace from stubs/CMakeLists.txt 2021-06-10 23:24:43 +01:00
Paul Szczepanek 36d9b86d46
fix typos
Co-authored-by: Chris Swinchatt <christopher.swinchatt@arm.com>
2021-06-10 11:56:16 +01:00
Paul Szczepanek 3fa779692c Add a readme to unit tests 2021-06-07 16:44:34 +01:00
Paul Szczepanek 8557529ae3 missing newlines 2021-06-07 16:30:35 +01:00
Paul Szczepanek cc0729a678 add missing tuple c++ replacement for unittests 2021-06-06 11:54:24 +01:00
Paul Szczepanek 2975c7cfe9 add fake googlemock BLE API for unittests 2021-06-06 11:54:24 +01:00
Paul Szczepanek 3290c944e8 add fake event queue for unittests 2021-06-06 11:25:38 +01:00
Martin Kojtal bc7fc2b2e7
Merge pull request #14708 from Patater/fix-test-function-return
test: Fix function does not return a value warnings
2021-05-31 12:20:00 +02:00
Jaeden Amero 7f7571657e test: Fix function does not return a value warnings
Many test stub functions are meant to return a value, but weren't. Clang
would generate a warning for each instance where we weren't returning
anything in a function that was meant to return a value.

    warning: non-void function does not return a value [-Wreturn-type]

For a specific example, my_radio::time_on_air() is supposed to return a
uint32_t, but wasn't returning anything. We'll return a zero instead of
relying on undefined behavior.

Without this, clang 11.0.1 was generating a virtual function
implementation with a `ud2` instruction to abort at run-time, causing
some execution of some unit tests to abort.

    Running main() from gmock_main.cc
    [==========] Running 10 tests from 1 test suite.
    [----------] Global test environment set-up.
    [----------] 10 tests from Test_LoRaPHYUS915
    [ RUN      ] Test_LoRaPHYUS915.constructor
    [       OK ] Test_LoRaPHYUS915.constructor (0 ms)
    [ RUN      ] Test_LoRaPHYUS915.restore_default_channels
    [       OK ] Test_LoRaPHYUS915.restore_default_channels (0 ms)
    [ RUN      ] Test_LoRaPHYUS915.rx_config
    [       OK ] Test_LoRaPHYUS915.rx_config (0 ms)
    [ RUN      ] Test_LoRaPHYUS915.tx_config
    Process 35669 stopped
    * thread #1, name = 'lorawan-loraphy-', stop reason = signal SIGILL: privileged instruction
        frame #0: 0x0000000000276f73 lorawan-loraphy-us915-unittest`my_radio::time_on_air(this=0x0000000800c2b048, modem=MODEM_LORA, pkt_len='\0') at Test_LoRaPHYUS915.cpp:90:5
       87       };
       88
       89       virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
    -> 90       {
       91       };
       92
       93       virtual bool perform_carrier_sense(radio_modems_t modem,
    (lldb) disassemble --pc
    lorawan-loraphy-us915-unittest`my_radio::time_on_air:
    ->  0x276f73 <+67>: ud2
        0x276f75:       int3
        0x276f76:       int3
        0x276f77:       int3
    (lldb)
2021-05-27 09:38:18 +01: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 10625b35b1 CMake: Update hal and platform stub CMake linker options for coverage
- Armclang is not working when we add gcov as target_link_libraries,
modified to pass as linker options with --coverage so it can work armclang and gcc
2021-05-11 04:27:09 -07:00
Rajkumar Kanagaraj f93f71b260 CMake: Update build tools python modules to pick refactored way of unittest CMake
- Update mbed_unittest python module to pick unittest from mbed os root
CMake configuration file
- Add BUILD_TESTING flag ON in test python module
2021-05-11 02:49:03 -07:00
Rajkumar Kanagaraj a88f43f367 CMake: Update mbed os, unittest CMake and add CMAKE_CROSSCOMPILING guard
- Add a new MbedOS project in mbed os root CMake which can be used along with
  BUILD_TESTING conditional check for enabling the unittest build
- Update UNITTEST CMake for setting the CMake configuration like c, cxx flags etc.,
- Add if CMAKE_CROSSCOMPILING conditional check wherever target configuration check
  and toolchain configuration to avoid such configuration gets included for unittest build.
2021-05-11 02:49:03 -07:00
Paul Szczepanek 452c45b37a CMake: Update target_h stub headers
- Avoid using cmsis headers as it brings more redundant dependency into unittest build and for unittest build, all the required OS flags can provide from mbed rtos types header so replaced cmsis header with mbed os types header
2021-05-11 02:29:56 -07:00
Rajkumar Kanagaraj 9e6217924c CMake: Remove duplicate documents
- Remove the readme as it is a duplicate content of official document
  https://os.mbed.com/docs/mbed-os/v6.9/debug-test/unit-testing.html
2021-05-11 02:29:56 -07:00
Rajkumar Kanagaraj d9db59f38c sort stubs into libraries 2021-05-11 02:29:56 -07:00
Vincent Coubard 70920d442f Lora: Add LoRaWANTimer::clear in stubs 2021-03-12 09:48:50 +00:00
Ladislas de Toldi 6335775c58
Fix sys/stat.h issue for unit tests on macOS 2021-03-10 10:41:31 +01:00
Paul Szczepanek 1fd8818dcd update version in readme 2021-01-27 12:48:57 +00:00
Paul Szczepanek 2fe6c7aa52 upgrade gtest to 1.10 2021-01-26 17:25:44 +00:00
Lingkai Dong b3c13bbea9 Update UNITTEST for kvstore 2020-12-09 17:20:42 +00:00
Arto Kinnunen d001b7a441 Update unittests 2020-11-20 10:06:57 +02:00
Martin Kojtal 468372e759
Merge pull request #13492 from talorion/fix-PwmOut-resets-after-suspend
Fix pwm out resets after suspend
2020-09-10 12:40:18 +01:00
talorion 191ec42dd6 pwmout - UNITTESTS - add read methods for period and pulsewidth 2020-09-02 13:39:16 +02:00
Lingkai Dong af1950fb16 Add include/ path for mbed-trace 2020-09-02 12:30:59 +01:00
Lingkai Dong a88438ce04 Move mbed-trace into platform 2020-09-02 12:30:59 +01:00
Rajkumar Kanagaraj fafa0c41ed Update UNITTESTS header reference 2020-08-25 16:06:56 +01:00
Rajkumar Kanagaraj 07511d39b1 Fix UNITTESTS build failure 2020-08-14 12:32:50 +01:00
Ashok Rao 9977da64af Incorporating review comments 2020-08-12 11:18:39 +01:00
Ashok Rao da9fd2a11b Mbed OS will soon be changing directory structure to the below:
```
connectivity
├── netsocket
├── lorawan
│   ├── mbed_lib.json // nanostack-interface's mbed_lib.json
│   ├── lorastack
│   ├── tests
├── nanostack
├── cellular
├── ...

```

This PR is a part of a wider \connectivity refactoring and implements the above new directory structure for \lorawan.
2020-08-12 11:06:36 +01:00
George Psimenos 54d8fe74ca Update mbedtls paths 2020-08-11 11:32:08 +01:00
Ashok Rao 8d7c7555dc Fixing UNITTESTS 2020-08-05 17:09:21 +01:00
Anna Bridge c85b76ad05
Merge pull request #13298 from ashok-rao/platform-refactor
Refactoring \platform directory
2020-08-05 13:32:42 +01:00
Ashok Rao a78554ebfa Fixing .astyleignore conflict 2020-07-31 15:50:03 +01:00
George Psimenos 973c1dc2ff Move drivers unit tests 2020-07-31 10:04:36 +01:00
George Psimenos 99803be98f Relocate platform unit tests 2020-07-28 10:16:47 +01:00
George Psimenos 76f37fb2bc Restructure events directory & move tests 2020-07-28 09:17:19 +01:00
Martin Kojtal 6bd52719f6
Merge pull request #13335 from rajkan01/netsocket_dir_restructure
Restructure netsocket directory
2020-07-27 14:35:27 +01:00
Rajkumar Kanagaraj 59072e9f58 Update documentation reference 2020-07-23 08:31:52 -07:00
Martin Kojtal 1d9c13ed5b
Merge pull request #13307 from rajkan01/storage_kv_dir_resturcture
Restructure storage kvstore directory
2020-07-23 15:59:07 +01:00
Rajkumar Kanagaraj 21325e281a Update netsocket header and source reference in other libraries 2020-07-23 06:22:15 -07:00
Rajkumar Kanagaraj b1a5e1b72d Move Unittests closure to library 2020-07-23 06:15:13 -07:00
Lingkai Dong 22ea1e8846 Update unittest.cmake files for cellular 2020-07-22 11:06:23 +01:00
Lingkai Dong 5905438fb4 Move cellular unit tests into the library 2020-07-22 11:06:23 +01:00
Lingkai Dong 2b24a7a31e Update paths to cellular framework 2020-07-22 11:06:23 +01:00
Rajkumar Kanagaraj d956116c36 Update greentea config, header reference 2020-07-20 07:33:52 -07:00
Rajkumar Kanagaraj bb14b9ff8f move greentea and UNITTESTS closure to library 2020-07-20 07:28:53 -07:00
Martin Kojtal 3a8989a247
Merge pull request #13300 from rajkan01/storage_fsdir_restructure
Restructure storage filesystem directory
2020-07-20 15:19:17 +01:00
Martin Kojtal 2b60c871d8
Merge pull request #13264 from ashok-rao/rtos-refactor
Moving around a few items within \rtos
2020-07-20 10:39:19 +01:00
Rajkumar Kanagaraj f58c5631c0 Fix UNITTESTS issue 2020-07-19 10:02:32 -07:00
Rajkumar Kanagaraj 41f0796484 Move greentea test closure to library 2020-07-17 12:42:11 -07:00
Anna Bridge ca2f980661
Merge pull request #13273 from rajkan01/storage_rb_dir_restructure
Restructure storage blockdevice directory
2020-07-17 15:56:33 +01:00
Anna Bridge f5801aa681
Merge pull request #13254 from LDong-Arm/move_nanostack-libservice
Move nanostack-libservice into connectivity/libraries
2020-07-17 14:40:50 +01:00
Rajkumar Kanagaraj 3bcb4eb260 Unittests and Astyle:
- Update the header reference and source reference in cmake
- Update astyleignore to ignore blockdevice UNITTESTS
- Removed the redundant debug log
2020-07-17 03:12:03 -07:00
Rajkumar Kanagaraj d47689be8e Move storgae unittests 2020-07-17 03:10:58 -07:00
Anna Bridge ab5af1e4f0
Merge pull request #13244 from rajkan01/storage_restructure_initial
Move storage from features into mbed-os root directory
2020-07-17 10:52:56 +01:00
Rajkumar Kanagaraj fdaaffdc7a Stroage unittest directory restructure
- Move UNITTESTS/features/storage to UNITTESTS/storage
- update the .cmake files to refer the new directory
2020-07-10 14:59:53 +01:00
Lingkai Dong 08aec8b61c UNITTESTS: update paths to nanostack-libservice 2020-07-08 17:25:39 +01:00
Lingkai Dong a884f1ad43 UNITTESTS: Add comment for glob pattern 2020-07-08 16:39:29 +01:00
Lingkai Dong 817ff8ed8f Allow unittest.cmake from the whole mbed-os 2020-07-08 16:39:29 +01:00
Martin Kojtal b1629b7e59
Merge pull request #13098 from AriParkkila/cell-free-stack
Cellular: Fix CellularContext destructor memory leak
2020-06-17 13:24:17 +02:00
Martin Kojtal ee13b49596
Merge pull request #13093 from AriParkkila/fix-unittest-for-PPPInterface
UNITTESTS: Fix TestPPPInterface::get_interface_name
2020-06-15 11:26:25 +02:00
Ari Parkkila dd73a93887 Cellular: Fix CellularContext destructor memory leak 2020-06-10 22:21:48 -07:00
Ari Parkkila ffa075bea3 UNITTESTS: Fix TestPPPInterface::get_interface_name 2020-06-09 23:40:28 -07:00
Ari Parkkila 985e72f65d Cellular: Fix unittest for CellularNetwork 2020-06-05 00:45:49 -07:00
Kevin Bracey 74a51b6782 Add ThisThread Chrono stubs 2020-05-11 14:18:04 +03:00
Kevin Bracey ee88235e69 Add Semaphore Chrono stubs 2020-05-11 14:18:04 +03:00
Kevin Bracey 3b7eae1109 Add Kernel::impl::get_tick_count() stub 2020-05-11 14:18:04 +03:00
Kevin Bracey 355b45ade1 Cellular: Convert to Chrono
Note that documentation for random_max_start_delay config setting has
been changed to indicate that the setting is in seconds, and always has
been. No functional change.
2020-05-11 14:18:04 +03:00
Michal Paszta 56ede3aa91 Fix unittests after ExhaustibleBlockDevice adjustments for wear leveling test 2020-05-05 12:10:41 +03:00
Darryl Green 0d16ca4d8a Remove references to mbed-crypto
Signed-off-by: Darryl Green <darryl.green@arm.com>
2020-04-30 11:28:20 +01:00
Martin Kojtal d1ae0d570c
Merge pull request #12425 from kjbracey-arm/chrono
C++ Chrono support
2020-04-30 11:41:43 +02:00
Martin Kojtal 1ddfa59ea7
Merge pull request #12463 from kjbracey-arm/sockstats
Clean up and optimise socket statistics
2020-04-29 22:16:54 +02:00
Martin Kojtal 4f9d21b16a
Merge pull request #12694 from kivaisan/remove_netsocket_icetea_and_tcpserver
Remove netsocket icetea tests and TCPServer
2020-04-29 13:46:44 +02:00
Rajkumar Kanagaraj c71c980ccd Fix the CI build and unit test issue 2020-04-27 10:19:08 +03:00
Arto Kinnunen 329c5d8538 Add unittests for added methods
Add unit tests for added methods:
 -get_rtt_estimate_to_address
 -get_stagger_estimate_to_address
2020-04-23 11:58:51 +03:00
Martin Kojtal 8926ea0983
Merge pull request #12763 from kivaisan/fix_athandler_read_string
Cellular: Fix ATHandler::read_string to handle delimiter inside string
2020-04-15 09:27:40 +02:00
Kimmo Vaisanen 236054175b Netsocket: Remove deprecated TCPServer
TCPSocket should be used instead.
2020-04-14 12:13:08 +03:00
Kimmo Vaisanen e776a9bb72 Netsocket: Add get_dns_server API for NetworkInterface
With get_dns_server DNS servers can be queried from NetworkInterface object
2020-04-14 12:04:03 +03:00
Martin Kojtal 7fce7f552c
Merge pull request #12572 from rajkan01/waitapi_remove_deprecated
Remove mbed wait deprecated APIs
2020-04-09 14:57:46 +02:00
Martin Kojtal d089c86f09
Merge pull request #12581 from kjbracey-arm/hard_noncopy
Fully enforce NonCopyable
2020-04-09 10:13:37 +02:00
Martin Kojtal 149235f731
Merge pull request #12589 from u-blox/disconnect
Cellular: Add deativation of context associated with profile
2020-04-09 09:39:27 +02:00