change cts log file location to make more accessible
[kazan.git] / run-cts.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 # Copyright 2018 Jacob Lifshay
4
5 set -e
6
7 do_update=1
8 if [[ "$*" == '--no-update' ]]; then
9 do_update=0
10 elif [[ "$*" != '' ]]; then
11 printf "unknown arguments\nusage: %s [--no-update]\n" "$0" >&2
12 exit 1
13 fi
14
15 cts_output="$(realpath TestResults.qpa)"
16
17 cts_source="$(realpath VK-GL-CTS)"
18
19 if [[ ! -d "$cts_source" ]]; then
20 if ((do_update)); then
21 git clone "https://github.com/KhronosGroup/VK-GL-CTS"
22 else
23 echo "need to run without --no-update" >&2
24 exit 1
25 fi
26 fi
27 cts_build="$(realpath VK-GL-CTS/build)"
28 if ((do_update)); then
29 (
30 cd "$cts_source"
31 git pull
32 python2 external/fetch_sources.py
33 )
34 fi
35 if [[ ! -d "$cts_build" ]]; then
36 if ((do_update)); then
37 (
38 mkdir "$cts_build"
39 cd "$cts_build"
40 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
41 )
42 else
43 echo "need to run without --no-update" >&2
44 exit 1
45 fi
46 fi
47 (
48 cd "$cts_build"
49 ninja
50 )
51 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 --deqp-log-filename='$cts_output'"