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
Rajkumar Kanagaraj
83be3f24a5
Remove mbed wait deprecated APIs
2020-04-08 10:35:07 +01:00
Kimmo Vaisanen
584d54e955
Cellular: Fix ATHandler::read_string to handle delimiter inside string
...
For example if input buffer includes:
+CCLK: "20/04/05,15:38:57+12"
read_string return "20/04/05,15:38:57+12" instead of "20/04/05"
2020-04-06 16:28:04 +03:00
Kevin Bracey
874e36e05a
Fully enforce NonCopyable
...
Make NonCopyable fully operational so it gives compile errors in all
build profiles.
2020-03-31 19:01:42 +03:00
Martin Kojtal
dba3962f16
Merge pull request #12570 from kjbracey-arm/nsapics
...
Improve nsapi_create_stack
2020-03-31 16:34:20 +02:00
Martin Kojtal
8b929726e1
Merge pull request #12609 from rajkan01/semwait_remove_deprecation
...
Remove Semaphore deprecated APIs
2020-03-31 10:36:43 +02:00
Martin Kojtal
4c6e59d714
Merge pull request #11629 from kyle-cypress/pr/tdb-bounds-refactor
...
Refactor TDB internal bounds computation
2020-03-30 09:39:15 +02:00
Anna Bridge
009ff7adf3
Merge pull request #12036 from kjbracey-arm/callback_fiddle
...
Callback extension and optimisation
2020-03-27 14:07:20 +00:00
Anna Bridge
2736896fb9
Merge pull request #12706 from hugueskamba/hk_remove_armc5_support_tests
...
Tests: Remove support for ARM Compiler 5
2020-03-27 14:05:26 +00:00
Hugues Kamba
4318a0747f
Tests: Remove support for ARM Compiler 5
...
ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.
2020-03-25 18:22:00 +00:00
Syed Fahimuddin Alavi
c6b6efc456
Added deativation of context associated with profile
...
Added emt method in At cellular context stub file
2020-03-25 16:02:18 +05:00
Kyle Kearney
85d2e8f2f2
Add kvstore/conf to unittest includes
...
The unittests compile DirectAccessDeviceKey.cpp which depends on
kv_config.h, which lives in features/storage/kvstore/conf
2020-03-24 12:36:36 -07:00
Kimmo Vaisanen
62170dd721
Netsocket: Fix SocketAddress stub for new API
2020-03-24 11:05:58 +02:00
Martin Kojtal
4fa9ccacf6
Merge pull request #12652 from jarlamsa/moduletest_filesystemstore
...
Add moduletests for FileSystemStore
2020-03-19 14:46:03 +01:00
Jarno Lamsa
e19cd14ced
Add moduletests for FileSystemStore
...
Baseline for the tests is similar to the TDBStore.
Differing from TDBStore moduletests, FileSystemStore doesn't include
tests for reserved data or corrupting the blockdevice, as it corrupts
the filesystem also.
2020-03-19 12:56:45 +02:00
Jarno Lamsa
6abb58c98b
Add new unittests for TDBStore
...
Add tests for iterators and reserved data.
2020-03-17 08:23:23 +02:00
Jarno Lamsa
8e6b9eebe2
Minor fixes to TDBStore moduletests
2020-03-17 08:21:24 +02:00
Rajkumar Kanagaraj
a6b78c6429
Remove Semaphore deprecated APIs
2020-03-16 09:37:45 -07:00
Kevin Bracey
bb733f1ee8
Callback updates
...
* Optimise clearing by adding `nullptr` overload. This overload means
`Callback(NULL)` or `Callback(0)` will no longer work; users must
use `Callback(nullptr)` or `Callback()`.
* Optimise clearing by not clearing storage - increases code size of
comparison, but that is extremely rare.
* Reduce ROM used by trivial functors - share copy/destroy code.
* Config option to force trivial functors - major ROM saving by
eliminating the "operations" table.
* Config option to eliminate comparison altogether - minor ROM saving by
eliminating zero padding.
* Conform more to `std::function` API.
2020-03-11 15:46:03 +02:00
Anna Bridge
d5f034b637
Merge pull request #12319 from maciejbocianski/fix_userallocatedevent_imp
...
Fix userallocatedevent imp
2020-03-11 12:43:17 +00:00
Rajkumar Kanagaraj
3674bd1842
Remove Mutex deprecated API
2020-03-06 09:39:30 -08:00
Kevin Bracey
0cf1fd7811
Remove unnecessary NetworkStack casts
2020-03-05 16:45:36 +02:00