diff --git a/Jenkinsfile b/Jenkinsfile index ae6ec84e..96db3809 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -106,21 +106,20 @@ pipeline { sh "rm -f ~/.xtag/status.lock ~/.xtag/acquired" } } - // TODO Disabled till https://xmosjira.atlassian.net/browse/AP-353 is fixed - //stage('Run RTOS Drivers WiFi test') { - // steps { - // withTools(params.TOOLS_VERSION) { - // withVenv { - // script { - // withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> - // sh "test/rtos_drivers/wifi/check_wifi.sh " + adapterIDs[0] - // } - // sh "pytest test/rtos_drivers/wifi" - // } - // } - // } - // } - //} + stage('Run RTOS Drivers WiFi test') { + steps { + withTools(params.TOOLS_VERSION) { + withVenv { + script { + withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> + sh "test/rtos_drivers/wifi/check_wifi.sh " + adapterIDs[0] + } + sh "pytest test/rtos_drivers/wifi" + } + } + } + } + } stage('Run RTOS Drivers HIL test') { steps { withTools(params.TOOLS_VERSION) { diff --git a/test/rtos_drivers/wifi/check_wifi.sh b/test/rtos_drivers/wifi/check_wifi.sh index 7398ab4b..cd311b09 100755 --- a/test/rtos_drivers/wifi/check_wifi.sh +++ b/test/rtos_drivers/wifi/check_wifi.sh @@ -28,7 +28,7 @@ done # assign vars REPORT=testing/test.rpt FIRMWARE=test_rtos_driver_wifi.xe -TIMEOUT_S=60 +TIMEOUT_S=90 if [ ! -z "${@:$OPTIND:1}" ] then ADAPTER_ID="--adapter-id ${@:$OPTIND:1}" diff --git a/test/rtos_drivers/wifi/src/individual_tests/wifi/local/wifi_test.c b/test/rtos_drivers/wifi/src/individual_tests/wifi/local/wifi_test.c index 0d1e9146..ce381b1a 100644 --- a/test/rtos_drivers/wifi/src/individual_tests/wifi/local/wifi_test.c +++ b/test/rtos_drivers/wifi/src/individual_tests/wifi/local/wifi_test.c @@ -94,6 +94,32 @@ static void scan(void) { } } +static void ip_info_printf(void) { + + uint32_t ulIPAddress, ulNetMask, ulGatewayAddress, ulDNSServerAddress; + int8_t cBuffer[ 16 ]; + + local_printf("Getting FreeRTOS IP Configuration"); + FreeRTOS_GetAddressConfiguration( &ulIPAddress, &ulNetMask, &ulGatewayAddress, + &ulDNSServerAddress ); + + /* Convert the IP address to a string then print it out. */ + FreeRTOS_inet_ntoa( ulIPAddress, cBuffer ); + local_printf( "IP Address: %s", cBuffer ); + + /* Convert the net mask to a string then print it out. */ + FreeRTOS_inet_ntoa( ulNetMask, cBuffer ); + local_printf( "Subnet Mask: %s", cBuffer ); + + /* Convert the IP address of the gateway to a string then print it out. */ + FreeRTOS_inet_ntoa( ulGatewayAddress, cBuffer ); + local_printf( "Gateway IP Address: %s", cBuffer ); + + /* Convert the IP address of the DNS server to a string then print it out. */ + FreeRTOS_inet_ntoa( ulDNSServerAddress, cBuffer ); + local_printf( "DNS server IP Address: %s", cBuffer ); +} + int wifi_conn_mgr_event_cb(int event, char *ssid, char *password) { switch (event) { case WIFI_CONN_MGR_EVENT_STARTUP: @@ -122,6 +148,7 @@ int wifi_conn_mgr_event_cb(int event, char *ssid, char *password) { while (WIFI_GetIP(ip) != eWiFiSuccess) { vTaskDelay(pdMS_TO_TICKS(100)); } + ip_info_printf(); WIFI_GetHostIP("xmos.com", ip); local_printf("xmos.com has IP address %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); local_printf("Attemping to ping xmos.com"); @@ -264,10 +291,10 @@ static int main_test(wifi_test_ctx_t *ctx) BaseType_t ret = xTaskNotifyWait((uint32_t)0, (uint32_t)0, (uint32_t*) &status, - pdMS_TO_TICKS(30000)); + pdMS_TO_TICKS(60000)); if (ret == pdFALSE) { - local_printf("Failed to recieve ping result after 30 seconds"); + local_printf("Failed to recieve ping result after 60 seconds"); return -1; }