ci: Add DEQP_EXPECTED_RENDERER support for VK tests.
authorEric Anholt <eric@anholt.net>
Tue, 26 May 2020 17:53:05 +0000 (10:53 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 28 May 2020 16:23:59 +0000 (16:23 +0000)
I used this to debug what was going on with freedreno VK in CI.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5225>

.gitlab-ci/deqp-runner.sh

index f40b72a45ed60a2415b1d388b4dbc218c84d3d03..d6e04939c580909935fd242cfad2d3ac7b46938d 100755 (executable)
@@ -204,7 +204,7 @@ parse_renderer() {
 }
 
 check_renderer() {
-    echo "Capturing renderer info for driver sanity checks"
+    echo "Capturing renderer info for GLES driver sanity checks"
     # If you're having trouble loading your driver, uncommenting this may help
     # debug.
     # export EGL_LOG_LEVEL=debug
@@ -213,6 +213,17 @@ check_renderer() {
     parse_renderer
 }
 
+check_vk_device_name() {
+    echo "Capturing device info for VK driver sanity checks"
+    $DEQP $DEQP_OPTIONS --deqp-case=dEQP-VK.info.device --deqp-log-filename=$RESULTS/deqp-info.qpa
+    DEVICENAME=`grep deviceName $RESULTS/deqp-info.qpa | sed 's|deviceName: ||g'`
+    echo "deviceName: $DEVICENAME"
+    if [ -n "$DEQP_EXPECTED_RENDERER" -a $DEVICENAME != "$DEQP_EXPECTED_RENDERER" ]; then
+        echo "Expected deviceName $DEQP_EXPECTED_RENDERER"
+        exit 1
+    fi
+}
+
 # wrapper to supress +x to avoid spamming the log
 quiet() {
     set +x
@@ -233,7 +244,9 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
     sleep 1
 fi
 
-if [ $DEQP_VER != vk ]; then
+if [ $DEQP_VER = vk ]; then
+    quiet check_vk_device_name
+else
     quiet check_renderer
 fi