mirror of https://github.com/ARMmbed/mbed-os.git
TESTS: rename variable interface to fix broken tests
parent
77927d0c7a
commit
8301854be1
|
@ -56,15 +56,15 @@ void led_thread()
|
|||
#endif
|
||||
|
||||
#define MAX_RETRIES 3
|
||||
NetworkInterface *interface = NULL;
|
||||
NetworkInterface *netif = NULL;
|
||||
static control_t setup_network(const size_t call_count)
|
||||
{
|
||||
interface = NetworkInterface::get_default_instance();
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(interface, "failed to initialize network");
|
||||
netif = NetworkInterface::get_default_instance();
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(netif, "failed to initialize network");
|
||||
|
||||
nsapi_error_t err = -1;
|
||||
for (int tries = 0; tries < MAX_RETRIES; tries++) {
|
||||
err = interface->connect();
|
||||
err = netif->connect();
|
||||
if (err == NSAPI_ERROR_OK) {
|
||||
break;
|
||||
} else {
|
||||
|
@ -78,34 +78,34 @@ static control_t setup_network(const size_t call_count)
|
|||
|
||||
static control_t download_128(const size_t call_count)
|
||||
{
|
||||
download_test(interface, story, sizeof(story), 128);
|
||||
download_test(netif, story, sizeof(story), 128);
|
||||
|
||||
return CaseNext;
|
||||
}
|
||||
static control_t download_256(const size_t call_count)
|
||||
{
|
||||
download_test(interface, story, sizeof(story), 256);
|
||||
download_test(netif, story, sizeof(story), 256);
|
||||
|
||||
return CaseNext;
|
||||
}
|
||||
|
||||
static control_t download_1k(const size_t call_count)
|
||||
{
|
||||
download_test(interface, story, sizeof(story), 1024);
|
||||
download_test(netif, story, sizeof(story), 1024);
|
||||
|
||||
return CaseNext;
|
||||
}
|
||||
|
||||
static control_t download_2k(const size_t call_count)
|
||||
{
|
||||
download_test(interface, story, sizeof(story), 2 * 1024);
|
||||
download_test(netif, story, sizeof(story), 2 * 1024);
|
||||
|
||||
return CaseNext;
|
||||
}
|
||||
|
||||
static control_t download_4k(const size_t call_count)
|
||||
{
|
||||
download_test(interface, story, sizeof(story), 4 * 1024);
|
||||
download_test(netif, story, sizeof(story), 4 * 1024);
|
||||
|
||||
return CaseNext;
|
||||
}
|
||||
|
|
|
@ -61,16 +61,16 @@ void led_thread()
|
|||
#endif
|
||||
|
||||
#define MAX_RETRIES 3
|
||||
NetworkInterface *interface = NULL;
|
||||
NetworkInterface *netif = NULL;
|
||||
|
||||
static control_t setup_network(const size_t call_count)
|
||||
{
|
||||
interface = NetworkInterface::get_default_instance();
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(interface, "failed to initialize network");
|
||||
netif = NetworkInterface::get_default_instance();
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(netif, "failed to initialize network");
|
||||
|
||||
nsapi_error_t err = -1;
|
||||
for (int tries = 0; tries < MAX_RETRIES; tries++) {
|
||||
err = interface->connect();
|
||||
err = netif->connect();
|
||||
if (err == NSAPI_ERROR_OK) {
|
||||
break;
|
||||
} else {
|
||||
|
@ -106,7 +106,7 @@ static uint32_t thread_counter = 0;
|
|||
void download_fn()
|
||||
{
|
||||
uint32_t thread_id = core_util_atomic_incr_u32(&thread_counter, 1);
|
||||
download_test(interface, story, sizeof(story), 256, thread_id);
|
||||
download_test(netif, story, sizeof(story), 256, thread_id);
|
||||
}
|
||||
void file_fn(size_t buffer)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue