Commit Graph

269 Commits (c98b0d0b03bd111d47cbe0ae8d6545103a42b9e1)

Author SHA1 Message Date
Cruz Monrreal ec03df4823
Merge pull request #7980 from kjbracey-arm/thread_deprecations
Clean up rtos::Thread deprecation warnings
2018-10-15 10:09:55 -05:00
Lari-Matias Orjala 76b15726a4 update unit testing documentation for Mac OS Mojave 2018-10-15 09:02:52 +03:00
Cruz Monrreal II 0f8e337547 Merge branch 'unittests-docs' of ssh://github.com/lorjala/mbed-os into lorjala-unittests-docs 2018-10-12 12:07:03 -05:00
Kevin Bracey 1ef213ec89 Clean up Thread deprecation warnings
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Cruz Monrreal 21b4ecad1a
Merge pull request #8316 from michalpasztamobica/master
unittests: Add tests for netsocket classes
2018-10-10 10:11:12 -05:00
Mirela Chirica ffb9cdb4b3 Cellular: Registration parameters as struct 2018-10-09 10:49:47 +03:00
Mirela Chirica 723e913bcc Cellular: AT handler read string up to delimiter or stop tag 2018-10-09 10:47:25 +03:00
Cruz Monrreal b15d09173e
Merge pull request #8315 from kivaisan/fix_cellular_unittests
Fix cellular unittests
2018-10-08 10:24:31 -05:00
Michal Paszta 5b4634a1fe unittests: Added tests for netsocket classes
New classes covered with unit tests: SocketAddress, EthernetInterface, EMACInterface, WiFiAccessPoint.
Also added missing namespace in front of mbed::Callback usages.
EMACInterface is covered by the EthernetInterface unit tests.
2018-10-08 14:21:01 +02:00
Sławek Piotrowski 9b89ad2fa9 Fix hard-fault when socket created using accept() is closed
When socket created  using accept() is closed by calling the close()
method, "delete this" is executed which triggers the destructor call
on TCPSocket which in turn calls close() once again. Because _stack
is already 0 this results in a hard-fault.

Add a check that skips the rest of the close() method is the _stack
is already 0.
2018-10-06 21:15:29 +02:00
Kimmo Vaisanen b57bc3d044 Cellular: Fix ATHandler_stub compiler warnings 2018-10-03 14:46:45 +03:00
Kimmo Vaisanen 05f0ba8e97 Cellular: Fix AT_CellularStack unittest
Missing CellularSocket constructor caused uninitialized values to be used.

Also changed comparision macros to ASSERT_EQ as suggested by GoogleTest guide.
2018-10-03 14:44:34 +03:00
Antti Kauppila 48e2ccd006 equeue_stub updated and code fixed accordingly 2018-09-27 12:26:48 +03:00
Antti Kauppila a54c271814 cmake Paths corrected 2018-09-27 11:30:52 +03:00
Antti Kauppila f6ecb319d0 LoRaMac unittested 2018-09-27 11:30:52 +03:00
Antti Kauppila bd9066431f LoRaWANStack unit tested 2018-09-27 11:30:52 +03:00
Antti Kauppila e07940d5e7 LoRaMacCrypto unittested 2018-09-27 10:49:07 +03:00
Antti Kauppila f3d402f70e LoRaPHY unittested, small fixed done during tests 2018-09-27 10:49:07 +03:00
Antti Kauppila 0f8cfd8631 LoRa regions unittested, stubs licences revisited 2018-09-27 10:49:07 +03:00
Antti Kauppila 445384852e LoraPhy and regions unit test skeletons added 2018-09-27 10:49:07 +03:00
Antti Kauppila b6848c4ea4 Unit test for LorawanInterface 2018-09-27 10:49:07 +03:00
Antti Kauppila 595caf6699 LorawanInterface unit test added 2018-09-27 10:49:07 +03:00
Antti Kauppila 0f83f08043 More lorawan unit tests added 2018-09-27 10:49:07 +03:00
Antti Kauppila b6465340b5 Lorawan unittests 2018-09-27 10:49:07 +03:00
Amanda Butler 027e030d76
Edit README.md
Edit readme.
2018-09-26 12:00:47 -05:00
Martin Kojtal 4957dd537e
Merge pull request #8138 from michalpasztamobica/master
Unit tests for TCPSocket, TCPServer, UDPSocket, NetworkStack, InternetSocket
2018-09-26 09:38:20 +02:00
Martin Kojtal fc820f539c
Merge pull request #8154 from lorjala/unittests-coveragefiltering
Unit tests: add code coverage filtering
2018-09-26 09:37:46 +02:00
Mirela Chirica 30da9c1965 Cellular: Fix cellular util unit test 2018-09-24 15:15:59 +03:00
Mirela Chirica 983425e4fc Cellular: Fix cellular network unit test 2018-09-24 15:15:18 +03:00
Lari-Matias Orjala 00397b232c Unit tests: improve argument checking in coverage.py 2018-09-24 11:41:34 +03:00
Lari-Matias Orjala 04c98b0223 add coverage filtering 2018-09-24 11:41:34 +03:00
Lari-Matias Orjala 4687e50dfd Improve unit testing instructions. 2018-09-24 11:26:21 +03:00
Martin Kojtal c503dedac6
Merge pull request #8212 from lorjala/unittests-docs
Unit tests: update README.md
2018-09-24 08:34:27 +02:00
Cruz Monrreal da0c5d9a71
Merge pull request #8182 from lorjala/fix_unittests
Unit tests: fix cellular athandler unit tests and wait() declaration conflict
2018-09-21 21:30:50 -05:00
Seppo Takalo b98e6b6c23 Use SocketAddr that actually has IP bytes in UDP test 2018-09-21 14:35:12 +03:00
Seppo Takalo fa7547abd4 Fix TCPSocket::accept() unittest.
accept() is not anymore returning NULL pointer. It was a bug.
2018-09-21 14:23:06 +03:00
Michal Paszta 72233b01dd unittests: Add tests for NetworkStack class.
Improved the stubs for event queue and nsapi_dns, to allow checking if callback are handled correctly. This involves some memory allocation and deallocation.
The NetworkStackWrapper is not covered as it seems to be deprecated code.
2018-09-21 14:23:06 +03:00
Michal Paszta aa90f5bb78 unittests: Add TCPServer unit tests
TCPServer class only really implements attach method.
2018-09-21 14:23:06 +03:00
Michal Paszta 51dedfd873 unittests: Added NetworkInterface unit tests
Most functions are empty or simply return "UNSUPPORTED", but it is still worth covering this functions with unit tests to have better control of unwanted changes.
2018-09-21 14:23:06 +03:00
Michal Paszta d740d698ba unittests: InternetSocket class coverage improved.
Added more tests, improved the existing ones. setblocking tests were not checking anything, so they were removed and these functions are called in TCPSocket tests instead.
2018-09-21 14:23:06 +03:00
Michal Paszta e609e2fc5e unittests: Check NULL pointer scenario in TCPSocket::recvfrom 2018-09-21 14:23:05 +03:00
Michal Paszta 5a74481a2a unittests: improved coverage for UDPSocket and TCPSocket
Add functional and line coverage for UDPSocket and TCPSocket. The EventFlagsstub and NetworkStackstub classes are allowed to store multiple return values to allow running internal loops multiple times.
2018-09-21 14:23:05 +03:00
Lari-Matias Orjala 60bb9b7678 replace missing types 2018-09-21 13:00:47 +03:00
Lari-Matias Orjala e1f22e4982 update UNITTESTS/README.md 2018-09-21 11:55:08 +03:00
Martin Kojtal 082ba151ac
Merge pull request #8112 from studavekar/update_doc_unittest
specify mbed-cli version requirement
2018-09-21 09:48:26 +02:00
Martin Kojtal 83fc2e2d20
Merge pull request #8176 from AnttiKauppila/ut_fix
CellularDevice_stub added
2018-09-20 15:14:35 +02:00
Lari-Matias Orjala 8ff0ec7814 fix athandler unit tests and declaration conflict 2018-09-19 15:42:33 +03:00
Lari-Matias Orjala 8f340b1953 remove test suite names from cellular tests 2018-09-19 11:19:27 +03:00
Lari-Matias Orjala e0e759e0a4 update test file generator 2018-09-19 11:10:40 +03:00
Lari-Matias Orjala 3e7ee6c4d1 add auto-naming of unit test suites 2018-09-19 11:10:40 +03:00
Antti Kauppila 4f97eaee67 CellularDevice_stub added 2018-09-19 10:30:43 +03:00
Antti Kauppila 2b7a087849 Rebased & fixed 2018-09-17 12:07:43 +03:00
Antti Kauppila a6b4938844 Small improvements for test cases 2018-09-17 12:07:43 +03:00
Antti Kauppila adc4ce4385 Old Cellular UNITTESTS removed 2018-09-17 12:07:43 +03:00
Antti Kauppila 9f9aa4a210 cellular unittests ported to googletest framework 2018-09-17 12:07:43 +03:00
Cruz Monrreal aee6325baa
Merge pull request #8123 from lorjala/fix_coverage_excludes
Unit tests: fix coverage exclude paths on Windows
2018-09-14 22:58:11 -05:00
Cruz Monrreal 48d212fe51
Merge pull request #8086 from SeppoTakalo/fix_socketaddr_unittests
Fix SocketAddress unittests
2018-09-14 10:34:37 -05:00
Lari-Matias Orjala cad2761687 fix coverage exclude paths on Windows 2018-09-13 20:30:08 +03:00
Cruz Monrreal 2e5e23f7c1
Merge pull request #8066 from bridadan/move_unittest_paths_to_hyphens
Move unittest paths to hyphens
2018-09-13 11:03:01 -05:00
studavekar 493a8cd4a7 specify mbed-cli version requirement 2018-09-13 03:06:42 -05:00
Jenny Plunkett 8af0afdd2e
Fix quotes around gcovr install command 2018-09-11 17:07:02 -05:00
Seppo Takalo 7c6f1c38a8 Fix SocketAddress unittests
Add ip4tos() and stoip4() into unittests.
NOTE: Probably should have been stubbed but this way we can also
test these helper functions.
2018-09-11 18:19:11 +03:00
Brian Daniels 0bda46df07 Moving all unit tests to use hyphenated test name 2018-09-10 13:42:51 -05:00
Brian Daniels ebd1c16c9e Updating readme to use hyphens for unittest paths 2018-09-10 12:12:38 -05:00
Martin Kojtal 970bc7369c
Merge pull request #7985 from theotherjimmy/update-unittest-subcommand
Unittesting: Update Mbed CLI subcommand in Readme
2018-09-06 15:11:43 +02:00
Lari-Matias Orjala 4b042271d6 fix mutex stub for unit tests 2018-09-05 13:41:35 +03:00
Jimmy Brisson 6dcd9e13b3 Update mbed-cli subcommand 2018-09-04 10:47:04 -05:00
Lari-Matias Orjala 4cf98dda6d Unittests: update documentation for Windows 2018-08-28 09:23:25 +03:00
Lari-Matias Orjala 4dde13db6d Add unit testing framework 2018-08-27 14:32:35 +03:00