1bf215546Sopenharmony_ci#!/bin/bash 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ciset -ex 4bf215546Sopenharmony_ci 5bf215546Sopenharmony_cigit config --global user.email "mesa@example.com" 6bf215546Sopenharmony_cigit config --global user.name "Mesa CI" 7bf215546Sopenharmony_cigit clone \ 8bf215546Sopenharmony_ci https://github.com/KhronosGroup/VK-GL-CTS.git \ 9bf215546Sopenharmony_ci -b vulkan-cts-1.3.3.0 \ 10bf215546Sopenharmony_ci --depth 1 \ 11bf215546Sopenharmony_ci /VK-GL-CTS 12bf215546Sopenharmony_cipushd /VK-GL-CTS 13bf215546Sopenharmony_ci 14bf215546Sopenharmony_ci# Apply a patch to update zlib link to an available version. 15bf215546Sopenharmony_ci# vulkan-cts-1.3.3.0 uses zlib 1.2.12 which was removed from zlib server due to 16bf215546Sopenharmony_ci# a CVE. See https://zlib.net/ 17bf215546Sopenharmony_ci# FIXME: Remove this patch when uprev to 1.3.4.0+ 18bf215546Sopenharmony_ciwget -O- https://github.com/KhronosGroup/VK-GL-CTS/commit/6bb2e7d64261bedb503947b1b251b1eeeb49be73.patch | 19bf215546Sopenharmony_ci git am - 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_ci# --insecure is due to SSL cert failures hitting sourceforge for zlib and 22bf215546Sopenharmony_ci# libpng (sigh). The archives get their checksums checked anyway, and git 23bf215546Sopenharmony_ci# always goes through ssh or https. 24bf215546Sopenharmony_cipython3 external/fetch_sources.py --insecure 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_cimkdir -p /deqp 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci# Save the testlog stylesheets: 29bf215546Sopenharmony_cicp doc/testlog-stylesheet/testlog.{css,xsl} /deqp 30bf215546Sopenharmony_cipopd 31bf215546Sopenharmony_ci 32bf215546Sopenharmony_cipushd /deqp 33bf215546Sopenharmony_ci# When including EGL/X11 testing, do that build first and save off its 34bf215546Sopenharmony_ci# deqp-egl binary. 35bf215546Sopenharmony_cicmake -S /VK-GL-CTS -B . -G Ninja \ 36bf215546Sopenharmony_ci -DDEQP_TARGET=x11_egl_glx \ 37bf215546Sopenharmony_ci -DCMAKE_BUILD_TYPE=Release \ 38bf215546Sopenharmony_ci $EXTRA_CMAKE_ARGS 39bf215546Sopenharmony_cininja modules/egl/deqp-egl 40bf215546Sopenharmony_cicp /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11 41bf215546Sopenharmony_ci 42bf215546Sopenharmony_ci 43bf215546Sopenharmony_cicmake -S /VK-GL-CTS -B . -G Ninja \ 44bf215546Sopenharmony_ci -DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \ 45bf215546Sopenharmony_ci -DCMAKE_BUILD_TYPE=Release \ 46bf215546Sopenharmony_ci $EXTRA_CMAKE_ARGS 47bf215546Sopenharmony_cininja 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_cimv /deqp/modules/egl/deqp-egl-x11 /deqp/modules/egl/deqp-egl 50bf215546Sopenharmony_ci 51bf215546Sopenharmony_ci# Copy out the mustpass lists we want. 52bf215546Sopenharmony_cimkdir /deqp/mustpass 53bf215546Sopenharmony_cifor mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do 54bf215546Sopenharmony_ci cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \ 55bf215546Sopenharmony_ci >> /deqp/mustpass/vk-master.txt 56bf215546Sopenharmony_cidone 57bf215546Sopenharmony_ci 58bf215546Sopenharmony_cicp \ 59bf215546Sopenharmony_ci /deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \ 60bf215546Sopenharmony_ci /deqp/mustpass/. 61bf215546Sopenharmony_cicp \ 62bf215546Sopenharmony_ci /deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \ 63bf215546Sopenharmony_ci /deqp/mustpass/. 64bf215546Sopenharmony_cicp \ 65bf215546Sopenharmony_ci /deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \ 66bf215546Sopenharmony_ci /deqp/mustpass/. 67bf215546Sopenharmony_cicp \ 68bf215546Sopenharmony_ci /deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \ 69bf215546Sopenharmony_ci /deqp/mustpass/. 70bf215546Sopenharmony_ci 71bf215546Sopenharmony_ci# Save *some* executor utils, but otherwise strip things down 72bf215546Sopenharmony_ci# to reduct deqp build size: 73bf215546Sopenharmony_cimkdir /deqp/executor.save 74bf215546Sopenharmony_cicp /deqp/executor/testlog-to-* /deqp/executor.save 75bf215546Sopenharmony_cirm -rf /deqp/executor 76bf215546Sopenharmony_cimv /deqp/executor.save /deqp/executor 77bf215546Sopenharmony_ci 78bf215546Sopenharmony_ci# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above. 79bf215546Sopenharmony_cirm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass 80bf215546Sopenharmony_cirm -rf /deqp/external/vulkancts/modules/vulkan/vk-master* 81bf215546Sopenharmony_cirm -rf /deqp/external/vulkancts/modules/vulkan/vk-default 82bf215546Sopenharmony_ci 83bf215546Sopenharmony_cirm -rf /deqp/external/openglcts/modules/cts-runner 84bf215546Sopenharmony_cirm -rf /deqp/modules/internal 85bf215546Sopenharmony_cirm -rf /deqp/execserver 86bf215546Sopenharmony_cirm -rf /deqp/framework 87bf215546Sopenharmony_cifind -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' | xargs rm -rf 88bf215546Sopenharmony_ci${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk 89bf215546Sopenharmony_ci${STRIP_CMD:-strip} external/openglcts/modules/glcts 90bf215546Sopenharmony_ci${STRIP_CMD:-strip} modules/*/deqp-* 91bf215546Sopenharmony_cidu -sh * 92bf215546Sopenharmony_cirm -rf /VK-GL-CTS 93bf215546Sopenharmony_cipopd 94