Mesa (master): ci/bare-metal: Skip setting of unset variables at startup.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 25 18:12:38 UTC 2020
Module: Mesa
Branch: master
Commit: 9079b53987e3d8dd82b0fa40a010f32524b13aeb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9079b53987e3d8dd82b0fa40a010f32524b13aeb
Author: Eric Anholt <eric at anholt.net>
Date: Mon Jun 22 16:54:10 2020 -0700
ci/bare-metal: Skip setting of unset variables at startup.
It's silly to be setting (and logging the setting of!) all the env vars we
*didn't* set in a job.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5433>
---
.gitlab-ci/bare-metal/rootfs-setup.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh
index ba4cdf45bba..ff86054c4e6 100644
--- a/.gitlab-ci/bare-metal/rootfs-setup.sh
+++ b/.gitlab-ci/bare-metal/rootfs-setup.sh
@@ -39,7 +39,9 @@ for var in \
VK_DRIVER \
; do
val=`echo ${!var} | sed 's|"||g'`
- echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh
+ if [ -n "$val" ]; then
+ echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh
+ fi
done
echo "Variables passed through:"
cat $rootfs_dst/set-job-env-vars.sh
More information about the mesa-commit
mailing list