Skip to content

Clean up deprecated feature code #8685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion features/cellular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ You can define the debug tracing level in the `mbed_app.json` configuration file

"target_overrides": {
"*": {
"target.features_add": ["COMMON_PAL"],
"mbed-trace.enable": true,
"platform.stdio-convert-newlines": true,
"platform.stdio-baud-rate": 115200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@
#if MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP
#include "APN_db.h"
#endif //MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP
#if defined(FEATURE_COMMON_PAL)
#include "mbed_trace.h"
#define TRACE_GROUP "UCID"
#else
#define tr_debug(...) (void(0)) //dummies if feature common pal is not added
#define tr_info(...) (void(0)) //dummies if feature common pal is not added
#define tr_error(...) (void(0)) //dummies if feature common pal is not added
#endif //defined(FEATURE_COMMON_PAL)

/**
* PDP (packet data profile) Context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@
#include "OnboardCellularInterface.h"
#include "UDPSocket.h"
#include "TCPSocket.h"
#if defined(FEATURE_COMMON_PAL)
#include "mbed_trace.h"
#define TRACE_GROUP "TEST"
#else
#define tr_debug(...) (void(0)) //dummies if feature common pal is not added
#define tr_info(...) (void(0)) //dummies if feature common pal is not added
#define tr_error(...) (void(0)) //dummies if feature common pal is not added
#endif //defined(FEATURE_COMMON_PAL)

using namespace utest::v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@
"lwip.ethernet-enabled": false,
"lwip.ppp-enabled": true,
"lwip.tcp-enabled": true,
"target.features_add": ["LWIP", "COMMON_PAL"],
"platform.stdio-convert-newlines": true,
"platform.stdio-baud-rate": 115200,
"platform.default-serial-baud-rate": 115200,
"platform.default-serial-baud-rate": 115200,
"mbed-trace.enable": 1
}
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_compesition/lib1/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lib1",
"target_overrides": {
"*": {
"target.features_add": ["IPV4"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libl?

Also, it has a bootloader?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib1 and lib2 are just arbitrary names for "libraries" in this test. The name of the libraries don't matter and don't affect the contents of the test. They just need to be distinct.

It also doesn't actually have a bootloader, I just needed a feature label that wasn't deprecated. Strangely/happily enough, we don't have that many more deprecated feature labels! I picked the BOOTLOADER one since I figured that would be around the longest so I (hopefully) don't have to update these tests in the near future 😄

"target.features_add": ["BOOTLOADER"]
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_compesition/test_data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"test_target": {
"expected_features": ["IPV4", "STORAGE"]
"expected_features": ["BOOTLOADER", "STORAGE"]
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_conflict/lib1/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lib1",
"target_overrides": {
"*": {
"target.features_add": ["IPV4"]
"target.features_add": ["BOOTLOADER"]
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_conflict/lib2/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lib2",
"target_overrides": {
"*": {
"target.features_remove": ["IPV4"]
"target.features_remove": ["BOOTLOADER"]
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_conflict/test_data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"K64F": {
"exception_msg": "Configuration conflict. The feature IPV4 both added and removed."
"exception_msg": "Configuration conflict. The feature BOOTLOADER both added and removed."
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_recursive_add/mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"target_overrides": {
"*": {
"target.features_add": ["IPV4"]
"target.features_add": ["BOOTLOADER"]
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_recursive_add/test_data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"test_target": {
"expected_features": ["IPV4", "STORAGE"]
"expected_features": ["BOOTLOADER", "STORAGE"]
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_recursive_complex/mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"target_overrides": {
"*": {
"target.features_add": ["IPV4"],
"target.features_add": ["BOOTLOADER"],
"lib2.test": "GOOD"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "lib1",
"target_overrides": {
"*": {
"target.features_remove": ["STORAGE"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "lib2",
"target_overrides": {
"*": {
"target.features_add": ["BOOTLOADER"]
}
}
}
7 changes: 7 additions & 0 deletions tools/test/config/feature_recursive_conflict/mbed_app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"target_overrides": {
"*": {
"target.features_add": ["STORAGE"]
}
}
}
5 changes: 5 additions & 0 deletions tools/test/config/feature_recursive_conflict/test_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"K64F": {
"exception_msg": "Configuration conflict. The feature STORAGE both added and removed."
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_remove/lib1/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lib1",
"target_overrides": {
"*": {
"target.features_remove": ["IPV4"]
"target.features_remove": ["BOOTLOADER"]
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/feature_remove/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"supported_toolchains": ["GCC_ARM"],
"core": "Cortex-M0",
"extra_labels": [],
"features": ["IPV4"],
"features": ["BOOTLOADER"],
"default_lib": "std"
}
}
2 changes: 1 addition & 1 deletion tools/test/config/simple_features/mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"target_overrides": {
"*": {
"target.features": ["IPV4"]
"target.features": ["BOOTLOADER"]
}
}
}
2 changes: 1 addition & 1 deletion tools/test/config/simple_features/test_data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"test_target": {
"expected_features": ["IPV4"]
"expected_features": ["BOOTLOADER"]
}
}