-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathrun-cts.sh
executable file
·61 lines (56 loc) · 1.46 KB
/
run-cts.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later
# See Notices.txt for copyright information
set -e
do_update=1
do_run=1
if [[ "$*" == '--no-update' ]]; then
do_update=0
elif [[ "$*" == '--update-only' ]]; then
do_update=1
do_run=0
elif [[ "$*" != '' ]]; then
printf "unknown arguments\nusage: %s [--no-update] [--update-only]\n" "$0" >&2
exit 1
fi
cts_output="$(realpath TestResults.qpa)"
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
elif ((do_update)); then
(
cd "$cts_source"
git pull
)
fi
cts_build="$(realpath VK-GL-CTS/build)"
if ((do_update)); then
(
cd "$cts_source"
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
)
if ((do_run)); then
exec ./run.sh bash -c "cd '$cts_build'/external/vulkancts/modules/vulkan; exec ./deqp-vk --deqp-caselist-file='$cts_source'/external/vulkancts/mustpass/master/vk-default.txt --deqp-log-images=disable --deqp-log-shader-sources=disable --deqp-log-filename='$cts_output'"
fi