radv: implement Vulkan 1.1 features and properties
[mesa.git] / .gitlab-ci / deqp-runner.sh
index c9231c7c54bf4697bc2f8b23f73cdf8fea704adb..0454f4bf171ced113bdd7322c840ba90916fe15a 100755 (executable)
@@ -1,24 +1,31 @@
-#!/bin/bash
+#!/bin/sh
 
 set -ex
 
-DEQP_OPTIONS=(--deqp-surface-width=256 --deqp-surface-height=256)
-DEQP_OPTIONS+=(--deqp-surface-type=pbuffer)
-DEQP_OPTIONS+=(--deqp-gl-config-name=rgba8888d24s8ms0)
-DEQP_OPTIONS+=(--deqp-visibility=hidden)
+DEQP_OPTIONS="--deqp-surface-width=256 --deqp-surface-height=256"
+DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=pbuffer"
+DEQP_OPTIONS="$DEQP_OPTIONS --deqp-gl-config-name=rgba8888d24s8ms0"
+DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden"
 
 # It would be nice to be able to enable the watchdog, so that hangs in a test
 # don't need to wait the full hour for the run to time out.  However, some
 # shaders end up taking long enough to compile
 # (dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 for example)
 # that they'll sporadically trigger the watchdog.
-#DEQP_OPTIONS+=(--deqp-watchdog=enable)
+#DEQP_OPTIONS="$DEQP_OPTIONS --deqp-watchdog=enable"
 
 if [ -z "$DEQP_VER" ]; then
    echo 'DEQP_VER must be set to something like "gles2", "gles31" or "vk" for the test run'
    exit 1
 fi
 
+if [ "$DEQP_VER" = "vk" ]; then
+   if [ -z "$VK_DRIVER" ]; then
+      echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
+      exit 1
+   fi
+fi
+
 if [ -z "$DEQP_SKIPS" ]; then
    echo 'DEQP_SKIPS must be set to something like "deqp-default-skips.txt"'
    exit 1
@@ -29,6 +36,7 @@ ARTIFACTS=`pwd`/artifacts
 # Set up the driver environment.
 export LD_LIBRARY_PATH=`pwd`/install/lib/
 export EGL_PLATFORM=surfaceless
+export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.x86_64.json
 
 # the runner was failing to look for libkms in /usr/local/lib for some reason
 # I never figured out.
@@ -38,7 +46,7 @@ RESULTS=`pwd`/results
 mkdir -p $RESULTS
 
 # Generate test case list file.
-if [ "$DEQP_VER" == "vk" ]; then
+if [ "$DEQP_VER" = "vk" ]; then
    cp /deqp/mustpass/vk-master.txt /tmp/case-list.txt
    DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk
 else
@@ -75,8 +83,9 @@ run_cts() {
         $XFAIL \
         --job ${DEQP_PARALLEL:-1} \
        --allow-flakes true \
+       $DEQP_RUNNER_OPTIONS \
         -- \
-        "${DEQP_OPTIONS[@]}"
+        $DEQP_OPTIONS
 }
 
 report_flakes() {
@@ -182,7 +191,7 @@ quiet generate_junit $RESULTS/cts-runner-results.txt > $RESULTS/results.xml
 
 if [ $DEQP_EXITCODE -ne 0 ]; then
     # preserve caselist files in case of failures:
-    cp /tmp/cts_runner.*.txt $RESULTS/
+    cp /tmp/deqp_runner.*.txt $RESULTS/
     echo "Some unexpected results found (see cts-runner-results.txt in artifacts for full results):"
     cat $RESULTS/cts-runner-results.txt | \
         grep -v ",Pass" | \
@@ -191,8 +200,10 @@ if [ $DEQP_EXITCODE -ne 0 ]; then
         $RESULTS/cts-runner-unexpected-results.txt
     head -n 50 $RESULTS/cts-runner-unexpected-results.txt
 
-    # Save the logs for up to the first 50 unexpected results:
-    head -n 50 $RESULTS/cts-runner-unexpected-results.txt | quiet extract_xml_results /tmp/*.qpa
+    if [ -z "$DEQP_NO_SAVE_RESULTS" ]; then
+        # Save the logs for up to the first 50 unexpected results:
+        head -n 50 $RESULTS/cts-runner-unexpected-results.txt | quiet extract_xml_results /tmp/*.qpa
+    fi
 
     count=`cat $RESULTS/cts-runner-unexpected-results.txt | wc -l`
 
@@ -209,8 +220,10 @@ else
         echo "Some flakes found (see cts-runner-flakes.txt in artifacts for full results):"
         head -n 50 $RESULTS/cts-runner-flakes.txt
 
-        # Save the logs for up to the first 50 flakes:
-        head -n 50 $RESULTS/cts-runner-flakes.txt | quiet extract_xml_results /tmp/*.qpa
+        if [ -z "$DEQP_NO_SAVE_RESULTS" ]; then
+            # Save the logs for up to the first 50 flakes:
+            head -n 50 $RESULTS/cts-runner-flakes.txt | quiet extract_xml_results /tmp/*.qpa
+        fi
 
         # Report the flakes to IRC channel for monitoring (if configured):
         quiet report_flakes $RESULTS/cts-runner-flakes.txt