From 6f6def28a773bec96f798fe92aa99eba236e3265 Mon Sep 17 00:00:00 2001 From: Toni Saario Date: Mon, 26 Aug 2024 14:46:43 +0300 Subject: [PATCH] Coin: VxWorks intel related instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Startup the correct emulator for each arch. Add a health check for emulator during test start. If emulator does not respond, restart it. Occurs in declarative tests where tests hang and crash. After the crashes the pipes also need to be reset, only emulator reset is not sufficient. Read variables from WIND_CC_SYSROOT which is the VSB path, so correct VSB is used. Change-Id: If918ee45d4fa3a452c484a48fe9507f12f788e86 Reviewed-by: Simo Fält --- coin/instructions/vxworks_test_env_setup.yaml | 24 +++++++++++++++---- coin/instructions/vxworks_testrunner.yaml | 24 ++++++++++++++++++- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/coin/instructions/vxworks_test_env_setup.yaml b/coin/instructions/vxworks_test_env_setup.yaml index 451d60c7f03..9a7e326e047 100644 --- a/coin/instructions/vxworks_test_env_setup.yaml +++ b/coin/instructions/vxworks_test_env_setup.yaml @@ -18,8 +18,22 @@ instructions: maxTimeInSeconds: 60 maxTimeBetweenOutput: 60 userMessageOnFailure: "Failed to mkfifo" + - type: EnvironmentVariable + variableName: VXWORKS_EMULATOR_TYPE + variableValue: "arm" + enable_if: + condition: property + property: target.arch + equals_value: ARMV7 + - type: EnvironmentVariable + variableName: VXWORKS_EMULATOR_TYPE + variableValue: "intel" + enable_if: + condition: property + property: target.arch + equals_value: X86_64 - type: ExecuteCommand - command: "{{.Env.HOME}}/vxworks_qemu_launcher.sh" + command: "{{.Env.HOME}}/vxworks_qemu_launcher.sh {{.Env.VXWORKS_EMULATOR_TYPE}}" maxTimeInSeconds: 60 maxTimeBetweenOutput: 60 userMessageOnFailure: "Failed to start VxWorks emulator" @@ -43,11 +57,11 @@ instructions: hosts["iptables.test-net.qt.local"]="172.31.1.1" declare -A env_vars - env_vars["LD_LIBRARY_PATH"]=$VXWORKS_TEST_LIBS_PATH - env_vars["ICU_DATA"]="/opt/fsl_imx6_2_0_6_2_VSB/3pp/ICU/icu/source/data/in/icudt73l.dat" + env_vars["LD_LIBRARY_PATH"]="$VXWORKS_TEST_LIBS_PATH" + env_vars["ICU_DATA"]="$WIND_CC_SYSROOT/3pp/ICU/icu/source/data/in/icudt73l.dat" env_vars["TMPDIR"]="/tmp" - env_vars["QT_QPA_FONTDIR"]="/opt/fsl_imx6_2_0_6_2_VSB/fonts" - env_vars["VXWORKS_CERTS_DIR"]="/opt/fsl_imx6_2_0_6_2_VSB/certs" + env_vars["QT_QPA_FONTDIR"]="$WIND_CC_SYSROOT/fonts" + env_vars["VXWORKS_CERTS_DIR"]="$WIND_CC_SYSROOT/certs" env_vars["HOME"]="/home/qt/work/vxworkshome" env_vars["QML_LOADERTHREAD_STACK_SIZE"]="131072" env_vars["QTEST_FUNCTION_TIMEOUT"]="600000" diff --git a/coin/instructions/vxworks_testrunner.yaml b/coin/instructions/vxworks_testrunner.yaml index 8f88c3eaf3e..2df33ada542 100644 --- a/coin/instructions/vxworks_testrunner.yaml +++ b/coin/instructions/vxworks_testrunner.yaml @@ -22,9 +22,31 @@ instructions: # qtest_in_vxworks_complete echo is used to detect test process completion as it will # be echoed after test process ends normally or crashes when normal log lines are not present. + # Check that emulator is functioning + echo "cmd echo \"health check\"" > /tmp/guest.in + sleep 0.5 + read -t 5 echoline /tmp/guest.in - sleep 0.5 + sleep 1 echo " /tmp/guest.in while read -t 600 line; do