Skip to content

Commit 59a80c0

Browse files
committed
integration-tests: Fix nightly job failures
With FreeRTOS/FreeRTOS-Plus-TCP@4471af6, a validation logic has been introduced which checks, if one of the address in an IP packet is loopback then both source and destination addresses must be loopback. For network interface tests, we run the server on the local machine and use loopback interface address in integration tests to communicate with the server. This causes validation logic to fail, as the destination address in the IP in the packet returned by the server is not a loopback address, but instead address assigned to the device. As a workaround, we use the ethernet interface address of the host machine instead of loopback to communicate with the server. In addition, add a job retry logic to nightly build jobs so that, jobs gets restarted for known failures. Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent 0336143 commit 59a80c0

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.gitlab-ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,19 @@ integration-tests:
280280
- git config --global user.email "[email protected]"
281281
- git config --global user.name "ci"
282282
- git config --global core.autocrlf input
283+
# With https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/commit/4471af64de1d481374881917bbba8736b1217530,
284+
# a validation logic has been introduced which checks, if one of the
285+
# address in an IP packet is loopback then both source and destination
286+
# addresses must be loopback. For network interface tests, we run the
287+
# server on the local machine and use loopback interface address in
288+
# integration tests to communicate with the server. This causes
289+
# validation logic to fail, as the destination address in the IP in the
290+
# packet returned by the server is not a loopback address, but instead
291+
# address assigned to the device. As a workaround, we use the ethernet
292+
# interface address of the host machine instead of loopback to
293+
# communicate with the server.
294+
- host_ip_address=`ifconfig eth0 | grep -w 'inet' | awk '{print $2}'`
295+
- sed -i "s/#define ECHO_SERVER_ENDPOINT .*$/#define ECHO_SERVER_ENDPOINT \"$host_ip_address\"/g" applications/freertos_iot_libraries_tests/test_param_config.h
283296
- ./tools/scripts/build.sh ${APP} --target $TARGET --toolchain $TOOLCHAIN --certificate_path $PWD/certificate.pem --private_key_path $PWD/private_key.pem
284297
- pushd components/tools/freertos_libraries_integration_tests/library/tools/echo_server
285298
- go run echo_server.go&
@@ -304,6 +317,12 @@ integration-tests:
304317
-
305318
<< : [*pipeline_config_corstone300, *pipeline_config_toolchain]
306319
APP: [freertos-iot-libraries-tests]
320+
retry:
321+
max: 2
322+
when:
323+
- script_failure
324+
- stuck_or_timeout_failure
325+
- runner_system_failure
307326
variables:
308327
GIT_SUBMODULE_STRATEGY: recursive
309328

@@ -363,6 +382,12 @@ sw-vsi-configs-test:
363382
INFERENCE: [SOFTWARE]
364383
AUDIO: [ROM, VSI]
365384
TOOLCHAIN: [ARMCLANG]
385+
retry:
386+
max: 2
387+
when:
388+
- script_failure
389+
- stuck_or_timeout_failure
390+
- runner_system_failure
366391
variables:
367392
GIT_SUBMODULE_STRATEGY: recursive
368393

@@ -404,6 +429,12 @@ gnu-toolchain-test:
404429
INFERENCE: [ETHOS, SOFTWARE]
405430
AUDIO: [ROM,VSI]
406431
TOOLCHAIN: [GNU]
432+
retry:
433+
max: 2
434+
when:
435+
- script_failure
436+
- stuck_or_timeout_failure
437+
- runner_system_failure
407438
variables:
408439
GIT_SUBMODULE_STRATEGY: recursive
409440

release_changes/202404301414.change

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
integration-tests: Fix nightly job failures

0 commit comments

Comments
 (0)