Antti Kauppila
814ba5ab4d
Fixed Non-IP cellular socket unittest
2019-12-27 16:04:10 +01:00
Antti Kauppila
48cf631456
relocated NonIP related files to netsocket root folder
2019-12-27 16:04:10 +01:00
Martin Kojtal
fd4288a0dc
Merge pull request #12027 from michalpasztamobica/dns_module_test
...
Modify nsapi_dns tests to be module tests
2019-12-16 09:49:16 +01:00
Antti Kauppila
40fcdb731b
Unittest cleanup made
...
CellularDevice still had the old way of defining built time defines and is now removed.
Other unittests needed some minor fixes after this.
2019-12-11 12:05:02 +02:00
Antti Kauppila
bda2d37bda
Unittests fixed
...
PRs 12051 and 11996 were merged simultaneously without running tests in between.
This caused unittests to brake and those are fixed with this commit.
2019-12-10 18:02:14 +02:00
Martin Kojtal
f10e4ac04b
Merge pull request #11996 from ARMmbed/feature-cellular
...
Feature cellular
2019-12-10 14:54:57 +01:00
Michal Paszta
fd46af67c6
Modify nsapi_dns tests to be module tests
...
The nsapi_dns tests were cross-class tests anyway, going through nsapi_dns and UDPSocket. Now they also include EthernetInterface and only mock the NetworkStack, which makes them the most cross-class module test we could think of in netsocket module.
2019-12-10 11:05:25 +02:00
Antti Kauppila
1cb3479d7a
Fixed unittests
2019-12-09 15:25:22 +02:00
Antti Kauppila
e51230c5e4
Remove CellularBase and AT_CellularBase
...
Removed CellularBase and AT_CellularBase from cellular stack and updated both code and unittests accordingly.
Moved property handling into AT_CellularDevice
2019-12-09 15:25:22 +02:00
Antti Kauppila
aac3437a22
Cleaned up athandlertest.cpp
2019-12-09 14:09:42 +02:00
Antti Kauppila
d6706d1a5f
Unittest configuration mechanism improved
...
Earlier all unittests ended up having all flags in common from all unittest targets.
This is now improved by using googletest provided mechanism to set build time compile options
All cmake files have been modified to reflect changes (when needed)
Could not figure out a syntax for {0x00, 0x00, ..., 0x00} intitializer list yet,
so those needs to be setup by updating C/CXX flags.
2019-12-09 13:11:56 +02:00
Michal Paszta
75472d0554
Adjust mbed_assert_stub file extension to .cpp
2019-12-02 20:48:16 +02:00
Michal Paszta
caf01479ea
Improve doxygen and unittest coverage for API
...
Mainly focusing on hardening the tests for return values.
2019-12-02 20:48:10 +02:00
Michal Paszta
546fdd2596
Move OnboardNetworkStackMock to a separate file
...
The mock was only used by EthernetInterface tests, but we can reuse it for other tests as well.
2019-12-02 20:47:43 +02:00
Martin Kojtal
ffdd54315f
Merge pull request #11941 from michalpasztamobica/remove_internal_string_apis
...
Remove string-based API usage within mbed-os
2019-11-28 14:26:03 +01:00
Antti Kauppila
367bae654d
Fixed crashing nsapi_dns unittest
...
Added missing "return" for NetworkStackMock's get_stack() method
2019-11-28 11:23:35 +02:00
Michal Paszta
ea04c4f85e
Remove internal usage of deprecated APIs in IPCore
...
Updated:
* netsocket classes,
* unittests, stubs and mocks,
* greentea tests
2019-11-27 20:02:20 +02:00
Martin Kojtal
58d6f5f39f
Merge pull request #11873 from AnttiKauppila/disable_sms
...
Make SMS configurable in Cellular stack
2019-11-27 09:03:55 +01:00
Martin Kojtal
7fbe0c6b41
Merge pull request #11928 from SeppoTakalo/assert_throw
...
Allow MBED_ASSERT to throw errors in unittests, so we can verify it.
2019-11-25 13:11:41 +01:00
Antti Kauppila
353782bf63
Disable SMS by default from Cellular stack
...
Put SMS behind configuration flag to save some memory (4,5kB) for Cellular users not needing SMS features.
UBlox N2XX target is also updated
2019-11-25 11:38:06 +02:00
Martin Kojtal
04ed9c5c8c
Merge pull request #11851 from amq/patch-2
...
Enable FAT ChaN lib configuration with mbed_lib.json
2019-11-22 13:38:56 +01:00
Seppo Takalo
c54d76eddf
Allow MBED_ASSERT to throw errors in unittests, so we can verify it.
...
GoogleTest allows you to check whether certain function throws errors.
For example:
ASSERT_ANY_THROW(mbed::HeapBlockDevice one(3050, 100));
or
ASSERT_NO_THROW(bd.init());
As MBED_ERROR is now only function that can throw errors, there is
no need to check the type of thrown object.
2019-11-22 13:10:46 +02:00
Michal Paszta
fd5b4b9119
Deprecate string-based APIs in IPCore
...
MBED_DEPRECATE macros is added to string-based APIs.
New, non-string-based APIs are added in their place.
Wiced binaries rebuilt
Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
2019-11-22 11:31:12 +02:00
amq
3eaa3e0325
Add fat_chan defines in storage unit tests cmake
2019-11-17 12:10:57 +01:00
Michal Paszta
4e5ea38d14
nsapi_dns: use delete[] for array alloc'd with new[]
2019-11-05 22:39:58 +02:00
Michal Paszta
a26d2d9672
Unittests for nsapi_dns
2019-11-05 11:29:36 +02:00
Martin Kojtal
355336ce43
Merge pull request #11797 from ARMmbed/IOTSTOR-941
...
IOTSTOR-953: Fix address calculations from SlicingBlockDevice
2019-11-05 09:09:14 +01:00
Martin Kojtal
fe940924cc
Merge pull request #11683 from AnttiKauppila/baremetal_support
...
Baremetal profile fixes
2019-11-04 15:53:57 +01:00
Martin Kojtal
f27aec3377
Merge pull request #11279 from cy-jayasankar/pr/added-ipv6-link-local-address-api
...
Add API to get ipv6 link local address
2019-11-04 15:28:41 +01:00
Martin Kojtal
c908404d94
Merge pull request #11783 from mirelachirica/set_baud_rate
...
Adding set baud rate routine
2019-11-04 15:27:02 +01:00
Seppo Takalo
333b281000
Add moduletest for SlicingBlockDevice
...
This uses HeapBlockDevice for providing the underlying storage block.
Check boundaries that slicingblockdevice do not overlow over to unassigned
blocks.
2019-11-04 16:13:32 +02:00
Seppo Takalo
a6d8f74b09
Add unittest for HeapBlockDevice and change some MBED_ASSERTS to errors.
2019-11-04 16:12:36 +02:00
Mirela Chirica
c484fc88f9
Cellular: Added set routine for baud rate
2019-11-01 17:21:31 +02:00
Antti Kauppila
ac0b0f1f2c
Unittests fixed
2019-11-01 15:22:28 +02:00
Jayasankar Nara
cb51fa57e2
Add API to get ipv6 link local address.
...
Protocols like mdns requires IPv6 link local address to be advertised in its
records (AAAA record). LWIP::Interface::bringup() API is creating IPv6 link
local address;But as of now there is no API exposed by mbed-os to get the
IPv6 link local address.
This new API is required to deliver mDNS library support on mbed-os for Cypress
platforms. Unit tested it by invoking get_ipv6_link_local_address with a simple
application.
2019-11-01 03:43:36 +05:30
Balaji
2d410e3c05
Rebase the code Unittests aware of InternetDatagramSocket
2019-10-28 12:10:12 -07:00
Michal Paszta
66c4b131e2
Astyle fixes
2019-10-14 14:22:31 +03:00
Michal Paszta
1706843d7d
[unittests] test for InternetSocket::close blocking
...
Close should not take place in case there is someone reading or writing to the socket.
2019-10-14 14:22:31 +03:00
Michal Paszta
8c3194ac4e
[unittests] Improve coverage
...
For the following classes:
* DTLSSocket
* NetworkInterface
* TLSSocketWrapper
2019-10-14 14:22:31 +03:00
Dominika Maziec
22b6b0fddb
unitests update for tcp and udp
2019-10-14 14:22:31 +03:00
Anna Bridge
ad891d9658
Merge pull request #11548 from AriParkkila/cell-dns-ip
...
Cellular: Fix resolving of DNS server IPv4/6 address
2019-10-07 16:46:47 +01:00
Ari Parkkila
8054b8eef8
Cellular: Fix resolving of DNS server IPv4/6 address
2019-09-25 03:16:45 -07:00
Kimmo Vaisanen
6ba0efc969
Cellular: Use more specific error codes for socket open and connect
...
- When calling socket APIs when socket is not open, NSAPI_ERROR_NO_SOCKET will be
returned instead of generic NSAPI_ERROR_DEVICE_ERROR
- If socket_send() is called when connection is not open, NSAPI_ERROR_NO_CONNECTION
will be returned instead of generic NSAPI_ERROR_DEVICE_ERROR
2019-09-25 09:25:33 +03:00
Martin Kojtal
d91ed5fa42
Merge pull request #11495 from kivaisan/improve_cellular_ut
...
Improve cellular unittests
2019-09-24 16:37:02 +02:00
Martin Kojtal
1afece7f1b
Merge pull request #11488 from kivaisan/fix_cellular_get_interface_name
...
Cellular: Fix get_interface_name to not include leading zero
2019-09-19 12:43:45 +02:00
Kimmo Vaisanen
da77cdc52e
UT for CellularDevice get/set timeouts methods
2019-09-17 12:56:47 +03:00
Kimmo Vaisanen
b6ecce0bfb
Add UT for AT_CellularNetwork::is_active_context
2019-09-17 12:56:47 +03:00
Kimmo Vaisanen
02de20acb6
Add UT for CEREG URC handler
2019-09-17 12:56:47 +03:00
Kimmo Vaisanen
d83f52a2a1
Improve UT for cellular properties
2019-09-17 12:15:18 +03:00
Kimmo Vaisanen
e824714cd8
Add UT for CellularUtil::hex_to_char and ::hex_str_to_char_str
...
Also added checks for pointer validity.
2019-09-17 12:15:03 +03:00