Merge pull request #5723 from SeppoTakalo/wifi-construtor-fix

Remove destruction of WiFi interface in test runs
pull/5746/merge
Anna Bridge 2017-12-29 14:29:38 +00:00 committed by GitHub
commit 2f4f82ec74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -50,8 +50,10 @@ WiFiInterface *get_interface()
{
static WiFiInterface *interface = NULL;
if (interface)
delete interface;
if (interface) {
interface->disconnect();
return interface;
}
#if MBED_CONF_APP_WIFI_DRIVER == INTERNAL
interface = new DRIVER();

View File

@ -59,6 +59,7 @@ utest::v1::status_t test_setup(const size_t number_of_cases) {
// Test cases
Case cases[] = {
Case("WIFI-CONSTRUCTOR", wifi_constructor),
Case("WIFI-CONNECT-NOCREDENTIALS", wifi_connect_nocredentials),
Case("WIFI-SET-CREDENTIAL", wifi_set_credential),
Case("WIFI-SET-CHANNEL", wifi_set_channel),
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
@ -73,7 +74,6 @@ Case cases[] = {
Case("WIFI-CONNECT-PARAMS-CHANNEL", wifi_connect_params_channel),
Case("WIFI-CONNECT-PARAMS-CHANNEL-FAIL", wifi_connect_params_channel_fail),
#endif
Case("WIFI-CONNECT-NOCREDENTIALS", wifi_connect_nocredentials),
#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
Case("WIFI-CONNECT", wifi_connect),
#endif