ci: correct the trace image URLs in the piglit summary
authorAndres Gomez <agomez@igalia.com>
Sat, 16 Jan 2021 00:46:54 +0000 (02:46 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 Jan 2021 20:33:23 +0000 (20:33 +0000)
Fixes: 09429fa85b6 ("ci: add piglit replay jobs and remove tracie ones")
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8531>

.gitlab-ci.yml
.gitlab-ci/piglit/run.sh

index 25d7580..fb0f2f3 100644 (file)
@@ -1038,7 +1038,7 @@ meson-mingw32-x86_64:
     PIGLIT_PROFILES: replay
     PIGLIT_REPLAY_UPLOAD_TO_MINIO: 1
     PIGLIT_REPLAY_EXTRA_ARGS:  --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/
-    PIGLIT_REPLAY_REFERENCE_IMAGES_BASE_URL: "/mesa-tracie-results/$CI_PROJECT_PATH"
+    PIGLIT_REPLAY_REFERENCE_IMAGES_BASE_URL: "/mesa-tracie-results/$FDO_UPSTREAM_REPO"
     PIGLIT_REPLAY_ARTIFACTS_BASE_URL: "/artifacts/$CI_PROJECT_PATH/$CI_PIPELINE_ID/$CI_JOB_ID"
     PIGLIT_HTML_SUMMARY: 0
     PIGLIT_JUNIT_RESULTS: 1
index e320541..d59c383 100755 (executable)
@@ -202,9 +202,9 @@ if [ ${PIGLIT_HTML_SUMMARY:-1} -eq 1 ]; then
 
     if [ "x$PIGLIT_PROFILES" = "xreplay" ]; then
         find "$OLDPWD"/summary -type f -name "*.html" -print0 \
-            | xargs -0 sed -i 's@<img src="file://'"${RESULTS}"'@<img src="https://'"${MINIO_HOST}${PIGLIT_REPLAY_ARTIFACTS_BASE_URL}"'@g'
+            | xargs -0 sed -i 's%<img src="file://'"${RESULTS}"'.*-\([0-9a-f]*\)\.png%<img src="https://'"${MINIO_HOST}${PIGLIT_REPLAY_ARTIFACTS_BASE_URL}"'/traces/\1.png%g'
         find "$OLDPWD"/summary -type f -name "*.html" -print0 \
-            | xargs -0 sed -i 's@<img src="file://@<img src="https://'"${MINIO_HOST}${PIGLIT_REPLAY_REFERENCE_IMAGES_BASE_URL}"'/@g'
+            | xargs -0 sed -i 's%<img src="file://%<img src="https://'"${MINIO_HOST}${PIGLIT_REPLAY_REFERENCE_IMAGES_BASE_URL}"'/%g'
     fi
 fi