Skip to content

Commit

Permalink
Merge pull request #11615 from kivaisan/remove_deprecated_cellular_tests
Browse files Browse the repository at this point in the history
Cellular: Remove old deprecated tests
  • Loading branch information
0xc0170 authored Oct 14, 2019
2 parents 3ca2e14 + b6ebfee commit 0e7d892
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 1,333 deletions.
61 changes: 58 additions & 3 deletions TESTS/netsocket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,18 @@ Wi-Fi tests require some more configuration, so for Wi-Fi purposes, the `mbed_ap
"echo-server-port" : {
"help" : "Port of echo server",
"value" : "7"
}
},
"echo-server-discard-port" : {
"help" : "Discard port of echo server",
"value" : "9"
},
"echo-server-port-tls" : {
"help" : "Port of echo server TLS",
"help" : "Port of echo server for TLS",
"value" : "2007"
},
"echo-server-discard-port-tls" : {
"help" : "Discard port of echo server for TLS",
"value" : "2009"
}
},
"target_overrides": {
Expand All @@ -403,7 +411,54 @@ Wi-Fi tests require some more configuration, so for Wi-Fi purposes, the `mbed_ap
}
```

Please, see `mbed-os/tools/test_configs` folder for examples.
Cellular tests require some more configuration, so for cellular purposes, the `mbed_app.json` might look like this:
NOTE! These are just typical settings needed for cellular. Actual configuration values depend on used target HW, SIM, modem and network capabilities.

```
{
"config": {
"echo-server-addr" : {
"help" : "IP address of echo server",
"value" : "\"echo.mbedcloudtesting.com\""
},
"echo-server-port" : {
"help" : "Port of echo server",
"value" : "7"
},
"echo-server-discard-port" : {
"help" : "Discard port of echo server",
"value" : "9"
},
"echo-server-port-tls" : {
"help" : "Port of echo server for TLS",
"value" : "2007"
},
"echo-server-discard-port-tls" : {
"help" : "Discard port of echo server for TLS",
"value" : "2009"
}
},
"target_overrides": {
"*": {
"target.network-default-interface-type": "CELLULAR",
"nsapi.default-cellular-sim-pin": "\"SIM PIN if needed\"",
"nsapi.default-cellular-plmn": "\"PLMN if needed\"",
"nsapi.default-cellular-apn": "\"APN if needed\"",
"nsapi.default-cellular-username": "\"SIM USERNAME if needed\"",
"nsapi.default-cellular-password": "\"SIM PASSWORD if needed\"",
"lwip.ipv4-enabled": true,
"lwip.ipv6-enabled": true,
"lwip.tcp-enabled": true,
"lwip.ppp-enabled": true,
"lwip.ethernet-enabled": false,
"<YOUR MODEM TARGET>.provide-default": true,
"cellular.radio-access-technology": <see supported values from cellular mbed_lib.json>
}
}
}
```

Please, see `mbed-os/tools/test_configs` folder for examples for different technologies.

Now build the test binaries:

Expand Down
17 changes: 3 additions & 14 deletions features/cellular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ This is the Github repo for Mbed cellular connectivity:
device Implementation of cellular device and state machine
targets Vendor specific cellular module adaptations

TESTS Cellular Greentea test

**Note:** Application developers should use only the `API` folder.

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

You can define the debug tracing level in the `mbed_app.json` configuration file:

```
"target_overrides": {
"*": {
Expand All @@ -48,18 +47,8 @@ You can define the debug tracing level in the `mbed_app.json` configuration file

## Greentea tests

The `TESTS` folder contains Greentea tests for cellular specific classes. You need to give relevant configuration file with `--app-config` parameter, such as:

```
mbed test -n features-cellular-tests-* --app-config features\cellular\TESTS\socket\udp\template_mbed_app.json.txt -v
```

**Note:** Greentea tests use SIM PIN, so you need to change that or your SIM card may get locked.
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`.

## Unit tests

Cellular unit tests are in Mbed OS root `UNITTESTS`. Unit tests are based on the stubbing method.

You need the following applications: `cpputest`, `gcov` and `lcov` (genhtml) for running the tests.

After you run the `run_tests` script, you can find test results in `UNITTESTS/results`, and line and function coverages in `UNITTESTS/coverages`.
Cellular unit tests are in Mbed OS root `UNITTESTS/features/cellular`.
221 changes: 0 additions & 221 deletions features/cellular/TESTS/api/cellular_device/main.cpp

This file was deleted.

Loading

0 comments on commit 0e7d892

Please sign in to comment.