From 25e84016d6d519b60017bf5c837e3eaa5f4c07d9 Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Thu, 27 Apr 2023 18:45:40 -0300 Subject: [PATCH] ci: Use absolute paths in init-stage2.sh Add absolute path for: - zramctl, maybe `/sbin/` is not in the PATH - intel-gpu-freq.sh, as this script CWD may be run outside `/` Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/common/init-stage2.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh index b9d00a1..eea7ca0 100755 --- a/.gitlab-ci/common/init-stage2.sh +++ b/.gitlab-ci/common/init-stage2.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Second-stage init, used to set up devices and our job environment before +# running tests. + # Make sure to kill itself and all the children process from this script on # exiting, since any console output may interfere with LAVA signals handling, # which based on the log console. @@ -33,10 +36,7 @@ trap cleanup INT TERM EXIT BACKGROUND_PIDS= -# Second-stage init, used to set up devices and our job environment before -# running tests. - -for path in '/set-job-env-vars.sh' './set-job-env-vars.sh'; do +for path in '/dut-env-vars.sh' '/set-job-env-vars.sh' './set-job-env-vars.sh'; do [ -f "$path" ] && source "$path" done . "$SCRIPTS_DIR"/setup-test-env.sh @@ -50,7 +50,7 @@ set -ex # Set up ZRAM HWCI_ZRAM_SIZE=2G -if zramctl --find --size $HWCI_ZRAM_SIZE -a zstd; then +if /sbin/zramctl --find --size $HWCI_ZRAM_SIZE -a zstd; then mkswap /dev/zram0 swapon /dev/zram0 echo "zram: $HWCI_ZRAM_SIZE activated" @@ -116,7 +116,7 @@ if [ "$HWCI_FREQ_MAX" = "true" ]; then # and enable throttling detection & reporting. # Additionally, set the upper limit for CPU scaling frequency to 65% of the # maximum permitted, as an additional measure to mitigate thermal throttling. - ./intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d + /intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d fi # Increase freedreno hangcheck timer because it's right at the edge of the -- 2.7.4