ci: Create results folder before starting virgl_test_server
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Sun, 2 Jan 2022 23:11:20 +0000 (01:11 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 18 Jan 2022 18:42:05 +0000 (18:42 +0000)
Move the statement responsible for creating the results output path
before 'virgl_test_server' is started in 'piglit-runner.sh' script.

This ensures the server log file will be available in the pipeline job
artifacts archive.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14413>

.gitlab-ci/piglit/piglit-runner.sh

index 86d83a5..e07f2b7 100755 (executable)
@@ -14,6 +14,9 @@ export LD_LIBRARY_PATH=`pwd`/install/lib/
 export EGL_PLATFORM=surfaceless
 export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.${VK_CPU:-`uname -m`}.json
 
+RESULTS=`pwd`/${PIGLIT_RESULTS_DIR:-results}
+mkdir -p $RESULTS
+
 if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
     # deqp is to use virpipe, and virgl_test_server llvmpipe
     export GALLIUM_DRIVER="$GALLIUM_DRIVER"
@@ -30,9 +33,6 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
     sleep 1
 fi
 
-RESULTS=`pwd`/${PIGLIT_RESULTS_DIR:-results}
-mkdir -p $RESULTS
-
 if [ -n "$PIGLIT_FRACTION" -o -n "$CI_NODE_INDEX" ]; then
    FRACTION=`expr ${PIGLIT_FRACTION:-1} \* ${CI_NODE_TOTAL:-1}`
 PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --fraction $FRACTION"