gitlab-ci: protect usage of shell variables with double quotes
authorAndres Gomez <agomez@igalia.com>
Thu, 2 Apr 2020 19:38:34 +0000 (22:38 +0300)
committerAndres Gomez <agomez@igalia.com>
Tue, 14 Apr 2020 13:07:19 +0000 (16:07 +0300)
Not really needed right now, but seems dangerous to have paths without
the double quote.

I went ahead and used in the rest of values too.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4496>

.gitlab-ci/tracie-runner-gl.sh
.gitlab-ci/tracie-runner-vk.sh

index a12ce6bff397a55b1265a4545248c39237495069..1c329c9cbe0ee1ed4f85e83904ca55ff3bd2ce65 100755 (executable)
@@ -15,12 +15,12 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/renderdoc/build/lib"
 export LD_LIBRARY_PATH="/waffle/build/lib:$LD_LIBRARY_PATH"
 
 # Set environment for apitrace executable.
-export PATH=/apitrace/build:$PATH
+export PATH="/apitrace/build:$PATH"
 
 # Use the surfaceless EGL platform.
-export EGL_PLATFORM=surfaceless
+export EGL_PLATFORM="surfaceless"
 export DISPLAY=
-export WAFFLE_PLATFORM=surfaceless_egl
+export WAFFLE_PLATFORM="surfaceless_egl"
 
 # Perform a self-test to ensure tracie is working properly.
 "$INSTALL/tracie/tests/test.sh"
@@ -30,4 +30,4 @@ export WAFFLE_PLATFORM=surfaceless_egl
 MESA_VERSION=$(cat "$INSTALL/VERSION" | sed 's/\./\\./g')
 wflinfo --platform surfaceless_egl --api gles2 | grep "Mesa $MESA_VERSION\(\s\|$\)"
 
-python3 $INSTALL/tracie/tracie.py --file $INSTALL/traces.yml --device-name $DEVICE_NAME
+python3 "$INSTALL/tracie/tracie.py" --file "$INSTALL/traces.yml" --device-name "$DEVICE_NAME"
index f234f57a283ab183730789e584dc10b44e6ae033..a3e13f6c1b4759facfa4988a5813995e64d0328c 100755 (executable)
@@ -34,4 +34,4 @@ vulkaninfo | grep "Mesa $MESA_VERSION\(\s\|$\)"
 # file:
 # https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section
 PATH="/gfxreconstruct/build/bin:$PATH" \
-    python3 $INSTALL/tracie/tracie.py --file $INSTALL/traces.yml --device-name $DEVICE_NAME
+    python3 "$INSTALL/tracie/tracie.py" --file "$INSTALL/traces.yml" --device-name "$DEVICE_NAME"