add script for running vulkan cts
authorJacob Lifshay <programmerjake@gmail.com>
Sun, 30 Sep 2018 03:22:42 +0000 (20:22 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Sun, 30 Sep 2018 03:22:42 +0000 (20:22 -0700)
.gitignore
run-cts.sh [new file with mode: 0755]
run.sh

index 4fffb2f89cbd8f2169ce9914bd16bd43785bb368..ad5297603e54b62dac2f7eb2292ff7cdfa231823 100644 (file)
@@ -1,2 +1,3 @@
 /target
 /Cargo.lock
+/VK-GL-CTS
diff --git a/run-cts.sh b/run-cts.sh
new file mode 100755 (executable)
index 0000000..903cb04
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+set -e
+
+do_update=1
+if [[ "$*" == '--no-update' ]]; then
+    do_update=0
+elif [[ "$*" != '' ]]; then
+    printf "unknown arguments\nusage: %s [--no-update]\n" "$0" >&2
+    exit 1
+fi
+
+cts_source="$(realpath VK-GL-CTS)"
+
+if [[ ! -d "$cts_source" ]]; then
+    if ((do_update)); then
+        git clone "https://github.com/KhronosGroup/VK-GL-CTS"
+    else
+        echo "need to run without --no-update" >&2
+        exit 1
+    fi
+fi
+cts_build="$(realpath VK-GL-CTS/build)"
+if ((do_update)); then
+    (
+        cd "$cts_source"
+        git pull
+        python2 external/fetch_sources.py
+    )
+fi
+if [[ ! -d "$cts_build" ]]; then
+    if ((do_update)); then
+        (
+            mkdir "$cts_build"
+            cd "$cts_build"
+            cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
+        )
+    else
+        echo "need to run without --no-update" >&2
+        exit 1
+    fi
+fi
+(
+    cd "$cts_build"
+    ninja
+)
+exec ./run.sh bash -c "cd '$cts_build'/external/vulkancts/modules/vulkan; exec ./deqp-vk --deqp-caselist-file='$cts_source'/external/vulkancts/mustpass/1.1.3/vk-default.txt --deqp-log-images=disable --deqp-log-shader-sources=disable"
diff --git a/run.sh b/run.sh
index 31703a94b0762a99b22e5bf696a9d06888ccbc41..869f5ef7e38fc43607916b6c224ce074bafc4d11 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
 set -e
 cargo build
-export VK_ICD_FILENAMES="$(realpath "$(ls --sort=time /home/jacob/projects/kazan/target/debug/build/vulkan-driver-*/out/kazan_driver.json | head -n 1)")"
+export VK_ICD_FILENAMES="$(realpath "$(ls --sort=time target/debug/build/vulkan-driver-*/out/kazan_driver.json | head -n 1)")"
 exec "$@"