Merge pull request #9718 from michalpasztamobica/greentea_tcpsocket_suite_timeout

Greentea tests: user-configurable timeouts
pull/9748/head
Martin Kojtal 2019-02-18 14:15:39 +01:00 committed by GitHub
commit 31da50e8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 2 deletions

View File

@ -61,6 +61,14 @@ void hostbyname_cb(void *data, nsapi_error_t result, SocketAddress *address);
void do_asynchronous_gethostbyname(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op_count, int *exp_ok, int *exp_no_mem, int *exp_dns_failure, int *exp_timeout);
void do_gethostbyname(const char hosts[][DNS_TEST_HOST_LEN], unsigned int op_count, int *exp_ok, int *exp_no_mem, int *exp_dns_failure, int *exp_timeout);
namespace dns_global {
#ifdef MBED_GREENTEA_TEST_DNSSOCKET_TIMEOUT_S
static const int TESTS_TIMEOUT = MBED_GREENTEA_TEST_DNSSOCKET_TIMEOUT_S;
#else
static const int TESTS_TIMEOUT = 10 * 60;
#endif
}
/*
* Test cases
*/

View File

@ -166,7 +166,7 @@ static void net_bringdown()
// Test setup
utest::v1::status_t test_setup(const size_t number_of_cases)
{
GREENTEA_SETUP(10 * 60, "default_auto");
GREENTEA_SETUP(dns_global::TESTS_TIMEOUT, "default_auto");
net_bringup();
return verbose_test_setup_handler(number_of_cases);
}

View File

@ -36,7 +36,11 @@ int fetch_stats(void);
int split2half_rmng_tcp_test_time(); // [s]
namespace tcp_global {
#ifdef MBED_GREENTEA_TEST_TCPSOCKET_TIMEOUT_S
static const int TESTS_TIMEOUT = MBED_GREENTEA_TEST_TCPSOCKET_TIMEOUT_S;
#else
static const int TESTS_TIMEOUT = (10 * 60);
#endif
static const int TCP_OS_STACK_SIZE = 2048;
static const int RX_BUFF_SIZE = 1220;

View File

@ -39,7 +39,11 @@ int fetch_stats(void);
int split2half_rmng_tls_test_time(); // [s]
namespace tls_global {
#ifdef MBED_GREENTEA_TEST_TLSSOCKET_TIMEOUT_S
static const int TESTS_TIMEOUT = MBED_GREENTEA_TEST_TLSSOCKET_TIMEOUT_S;
#else
static const int TESTS_TIMEOUT = (10 * 60);
#endif
static const int TLS_OS_STACK_SIZE = 2048;
static const int RX_BUFF_SIZE = 1220;

View File

@ -34,7 +34,11 @@ int fetch_stats(void);
int split2half_rmng_udp_test_time(); // [s]
namespace udp_global {
#ifdef MBED_GREENTEA_TEST_UDPSOCKET_TIMEOUT_S
static const int TESTS_TIMEOUT = MBED_GREENTEA_TEST_UDPSOCKET_TIMEOUT_S;
#else
static const int TESTS_TIMEOUT = 480;
#endif
}
/*

View File

@ -54,8 +54,13 @@ using namespace utest::v1;
utest::v1::status_t test_setup(const size_t number_of_cases)
{
#if !MBED_CONF_APP_ECHO_SERVER
#ifdef MBED_GREENTEA_TEST_EMAC_TIMEOUT_S
GREENTEA_SETUP(MBED_GREENTEA_TEST_EMAC_TIMEOUT_S, "default_auto");
#else
GREENTEA_SETUP(1400, "default_auto");
#endif
#endif // #ifdef MBED_GREENTEA_TEST_EMAC_TIMEOUT_S
#endif // #if !MBED_CONF_APP_ECHO_SERVER
return verbose_test_setup_handler(number_of_cases);
}

View File

@ -33,7 +33,11 @@ using namespace utest::v1;
// Test setup
utest::v1::status_t test_setup(const size_t number_of_cases)
{
#ifdef MBED_GREENTEA_TEST_INTERFACE_TIMEOUT_S
GREENTEA_SETUP(MBED_GREENTEA_TEST_INTERFACE_TIMEOUT_S, "default_auto");
#else
GREENTEA_SETUP(480, "default_auto");
#endif
return verbose_test_setup_handler(number_of_cases);
}

View File

@ -52,7 +52,11 @@ using namespace utest::v1;
utest::v1::status_t test_setup(const size_t number_of_cases)
{
#ifdef MBED_GREENTEA_TEST_WIFI_TIMEOUT_S
GREENTEA_SETUP(MBED_GREENTEA_TEST_WIFI_TIMEOUT_S, "default_auto");
#else
GREENTEA_SETUP(360, "default_auto");
#endif
return verbose_test_setup_handler(number_of_cases);
}