1#!/bin/bash 2 3set -ex 4 5git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit 6pushd /piglit 7git checkout b2c9d8f56b45d79f804f4cb5ac62520f0edd8988 8 9# TODO: Remove the following patch when piglit commit got past 10# 1cd716180cfb6ef0c1fc54702460ef49e5115791 11git apply $OLDPWD/.gitlab-ci/piglit/build-piglit_backport-s3-migration.diff 12 13patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff 14cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS 15ninja $PIGLIT_BUILD_TARGETS 16find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf 17rm -rf target_api 18if [ "x$PIGLIT_BUILD_TARGETS" = "xpiglit_replayer" ]; then 19 find ! -regex "^\.$" \ 20 ! -regex "^\.\/piglit.*" \ 21 ! -regex "^\.\/framework.*" \ 22 ! -regex "^\.\/bin$" \ 23 ! -regex "^\.\/bin\/replayer\.py" \ 24 ! -regex "^\.\/templates.*" \ 25 ! -regex "^\.\/tests$" \ 26 ! -regex "^\.\/tests\/replay\.py" 2>/dev/null | xargs rm -rf 27fi 28popd 29