According to unittests.txt timeout deinition, the TIMEOUT environment variable should override the optional timeout specified in unittests.cfg. Fix this by defaulting the timeout in run() to the TIMEOUT env var, followed by the timeout in unittests.cfg, and lastly by the previously defined default of 90s. Fixes: fd149358c491 ("run scripts: add timeout support") Signed-off-by: Kevin Cheng --- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/runtime.bash b/scripts/runtime.bash index 6805e97f90c8f..0704a390bfe1e 100644 --- a/scripts/runtime.bash +++ b/scripts/runtime.bash @@ -1,6 +1,5 @@ : "${RUNTIME_arch_run?}" : "${MAX_SMP:=$(getconf _NPROCESSORS_ONLN)}" -: "${TIMEOUT:=90s}" PASS() { echo -ne "\e[32mPASS\e[0m"; } SKIP() { echo -ne "\e[33mSKIP\e[0m"; } @@ -82,7 +81,7 @@ function run() local machine="$8" local check="${CHECK:-$9}" local accel="${10}" - local timeout="${11:-$TIMEOUT}" # unittests.cfg overrides the default + local timeout="${TIMEOUT:-${11:-90s}}" # TIMEOUT env var overrides unittests.cfg local disabled_if="${12}" if [ "${CONFIG_EFI}" == "y" ]; then -- 2.52.0.rc1.455.g30608eb744-goog