scripts/runtime.bash: Fix TIMEOUT env var override
PATCH v2 1/1 scripts/runtime.bash: Fix TIMEOUT env var override
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.
--- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/runtime.bash +1 -2
@@ -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
Quoted 33 lines · Kevin Cheng
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 <[email protected]>--- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)scripts/runtime.bash +1
-3@@ -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 --
Quoted 2 lines
2.52.0.rc1.455.g30608eb744-goog
Merged.
Thanks,
drew