Skip to content

Commit b6ebfee

Browse files
author
Kimmo Vaisanen
committed
Cellular: Remove old deprecated tests
Cellular tests have been replaced with generic mbed-os netsocket and network interface tests.
1 parent 31114ba commit b6ebfee

File tree

11 files changed

+61
-1333
lines changed

11 files changed

+61
-1333
lines changed

TESTS/netsocket/README.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,18 @@ Wi-Fi tests require some more configuration, so for Wi-Fi purposes, the `mbed_ap
386386
"echo-server-port" : {
387387
"help" : "Port of echo server",
388388
"value" : "7"
389-
}
389+
},
390+
"echo-server-discard-port" : {
391+
"help" : "Discard port of echo server",
392+
"value" : "9"
393+
},
390394
"echo-server-port-tls" : {
391-
"help" : "Port of echo server TLS",
395+
"help" : "Port of echo server for TLS",
392396
"value" : "2007"
397+
},
398+
"echo-server-discard-port-tls" : {
399+
"help" : "Discard port of echo server for TLS",
400+
"value" : "2009"
393401
}
394402
},
395403
"target_overrides": {
@@ -403,7 +411,54 @@ Wi-Fi tests require some more configuration, so for Wi-Fi purposes, the `mbed_ap
403411
}
404412
```
405413

406-
Please, see `mbed-os/tools/test_configs` folder for examples.
414+
Cellular tests require some more configuration, so for cellular purposes, the `mbed_app.json` might look like this:
415+
NOTE! These are just typical settings needed for cellular. Actual configuration values depend on used target HW, SIM, modem and network capabilities.
416+
417+
```
418+
{
419+
"config": {
420+
"echo-server-addr" : {
421+
"help" : "IP address of echo server",
422+
"value" : "\"echo.mbedcloudtesting.com\""
423+
},
424+
"echo-server-port" : {
425+
"help" : "Port of echo server",
426+
"value" : "7"
427+
},
428+
"echo-server-discard-port" : {
429+
"help" : "Discard port of echo server",
430+
"value" : "9"
431+
},
432+
"echo-server-port-tls" : {
433+
"help" : "Port of echo server for TLS",
434+
"value" : "2007"
435+
},
436+
"echo-server-discard-port-tls" : {
437+
"help" : "Discard port of echo server for TLS",
438+
"value" : "2009"
439+
}
440+
},
441+
"target_overrides": {
442+
"*": {
443+
"target.network-default-interface-type": "CELLULAR",
444+
"nsapi.default-cellular-sim-pin": "\"SIM PIN if needed\"",
445+
"nsapi.default-cellular-plmn": "\"PLMN if needed\"",
446+
"nsapi.default-cellular-apn": "\"APN if needed\"",
447+
"nsapi.default-cellular-username": "\"SIM USERNAME if needed\"",
448+
"nsapi.default-cellular-password": "\"SIM PASSWORD if needed\"",
449+
"lwip.ipv4-enabled": true,
450+
"lwip.ipv6-enabled": true,
451+
"lwip.tcp-enabled": true,
452+
"lwip.ppp-enabled": true,
453+
"lwip.ethernet-enabled": false,
454+
"<YOUR MODEM TARGET>.provide-default": true,
455+
"cellular.radio-access-technology": <see supported values from cellular mbed_lib.json>
456+
}
457+
}
458+
}
459+
```
460+
461+
Please, see `mbed-os/tools/test_configs` folder for examples for different technologies.
407462

408463
Now build the test binaries:
409464

features/cellular/README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ This is the Github repo for Mbed cellular connectivity:
99
device Implementation of cellular device and state machine
1010
targets Vendor specific cellular module adaptations
1111

12-
TESTS Cellular Greentea test
13-
1412
**Note:** Application developers should use only the `API` folder.
1513

1614
## Known limitations
@@ -28,6 +26,7 @@ You can change cellular defaults in the `mbed_lib.json` configuration file.
2826
## Debug traces
2927

3028
You can define the debug tracing level in the `mbed_app.json` configuration file:
29+
3130
```
3231
"target_overrides": {
3332
"*": {
@@ -48,18 +47,8 @@ You can define the debug tracing level in the `mbed_app.json` configuration file
4847

4948
## Greentea tests
5049

51-
The `TESTS` folder contains Greentea tests for cellular specific classes. You need to give relevant configuration file with `--app-config` parameter, such as:
52-
53-
```
54-
mbed test -n features-cellular-tests-* --app-config features\cellular\TESTS\socket\udp\template_mbed_app.json.txt -v
55-
```
56-
57-
**Note:** Greentea tests use SIM PIN, so you need to change that or your SIM card may get locked.
50+
Cellular connectivity can be tested with generic Mbed OS netsocket and network interface tests found in Mbed OS root `TESTS` directory. For more information, see `TESTS/netsocket/README.md` and `TESTS/network/interface/README.md`.
5851

5952
## Unit tests
6053

61-
Cellular unit tests are in Mbed OS root `UNITTESTS`. Unit tests are based on the stubbing method.
62-
63-
You need the following applications: `cpputest`, `gcov` and `lcov` (genhtml) for running the tests.
64-
65-
After you run the `run_tests` script, you can find test results in `UNITTESTS/results`, and line and function coverages in `UNITTESTS/coverages`.
54+
Cellular unit tests are in Mbed OS root `UNITTESTS/features/cellular`.

features/cellular/TESTS/api/cellular_device/main.cpp

Lines changed: 0 additions & 221 deletions
This file was deleted.

0 commit comments

Comments
 (0)