diff options
author | Eric Anholt <[email protected]> | 2020-05-04 13:42:41 -0700 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2020-07-08 19:31:15 +0200 |
commit | 86a59c2fa93b0410c9764f21696c42a99c709f3b (patch) | |
tree | cb7340253e645dca79479e40c28f9ca44801d823 /.gitlab-ci | |
parent | 3c6328a4680acc17c28f9719943670e3bae46894 (diff) |
ci: Clean up setup of the job-specific env vars in baremetal testing.
Avoids copy and paste errors when adding more vars.
Reviewed-by: Rob Clark <[email protected]>
(cherry picked from commit c7bbc211d681696687a134eb158d55fcb674907c)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5548>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/bare-metal/fastboot.sh | 19 | ||||
-rw-r--r-- | .gitlab-ci/bare-metal/init.sh | 7 |
2 files changed, 16 insertions, 10 deletions
diff --git a/.gitlab-ci/bare-metal/fastboot.sh b/.gitlab-ci/bare-metal/fastboot.sh index 5e57639c476..5d2d1de176c 100755 --- a/.gitlab-ci/bare-metal/fastboot.sh +++ b/.gitlab-ci/bare-metal/fastboot.sh @@ -50,11 +50,20 @@ cp -Rp $BM_ROOTFS rootfs # Set up the init script that brings up the system. cp $BM/init.sh rootfs/init -sed -i "s|DEQP_VER_REPLACE|$DEQP_VER|g" rootfs/init -sed -i "s|DEQP_PARALLEL_REPLACE|$DEQP_PARALLEL|g" rootfs/init -sed -i "s|DEQP_EXPECTED_RENDERER_REPLACE|$DEQP_EXPECTED_RENDERER|g" rootfs/init -sed -i "s|CI_NODE_INDEX_REPLACE|$CI_NODE_INDEX|g" rootfs/init -sed -i "s|CI_NODE_TOTAL_REPLACE|$CI_NODE_TOTAL|g" rootfs/init + +# Pass through relevant env vars from the gitlab job to the baremetal init script +touch rootfs/set-job-env-vars.sh +chmod +x rootfs/set-job-env-vars.sh +for var in \ + CI_NODE_INDEX \ + CI_NODE_TOTAL \ + DEQP_EXPECTED_RENDERER \ + DEQP_PARALLEL \ + DEQP_VER \ + ; do + val=`echo ${!var} | sed 's|"||g'` + echo "export $var=\"${val}\"" >> rootfs/set-job-env-vars.sh +done # Add the Mesa drivers we built, and make a consistent symlink to them. mkdir -p rootfs/$CI_PROJECT_DIR diff --git a/.gitlab-ci/bare-metal/init.sh b/.gitlab-ci/bare-metal/init.sh index ba0168691d0..edaaa9692cd 100644 --- a/.gitlab-ci/bare-metal/init.sh +++ b/.gitlab-ci/bare-metal/init.sh @@ -9,11 +9,8 @@ mkdir -p /dev/pts mount -t devpts devpts /dev/pts export DEQP_NO_SAVE_RESULTS=1 -export DEQP_VER=DEQP_VER_REPLACE -export DEQP_PARALLEL=DEQP_PARALLEL_REPLACE -export DEQP_EXPECTED_RENDERER=DEQP_EXPECTED_RENDERER_REPLACE -export CI_NODE_INDEX=CI_NODE_INDEX_REPLACE -export CI_NODE_TOTAL=CI_NODE_TOTAL_REPLACE +. /set-job-env-vars.sh + export DEQP_SKIPS=deqp-skips.txt if [ -e /install/deqp-expected-fails.txt ]; then export DEQP_EXPECTED_FAILS=deqp-expected-fails.txt |