• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# shellcheck disable=SC2086 # we want word splitting
3set -uex
4
5uncollapsed_section_start piglit "Building piglit"
6
7# When changing this file, you need to bump the following
8# .gitlab-ci/image-tags.yml tags:
9# DEBIAN_TEST_GL_TAG
10# DEBIAN_TEST_VK_TAG
11# KERNEL_ROOTFS_TAG
12
13REV="631b72944f56e688f56a08d26c8a9f3988801a08"
14
15git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
16pushd /piglit
17git checkout "$REV"
18patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
19cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS ${EXTRA_CMAKE_ARGS:-}
20ninja ${PIGLIT_BUILD_TARGETS:-}
21find . -depth \( -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' \) \
22       ! -name 'include_test.h' -exec rm -rf {} \;
23rm -rf target_api
24if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
25    find . -depth \
26         ! -regex "^\.$" \
27         ! -regex "^\.\/piglit.*" \
28         ! -regex "^\.\/framework.*" \
29         ! -regex "^\.\/bin$" \
30         ! -regex "^\.\/bin\/replayer\.py" \
31         ! -regex "^\.\/templates.*" \
32         ! -regex "^\.\/tests$" \
33         ! -regex "^\.\/tests\/replay\.py" \
34         -exec rm -rf {} \; 2>/dev/null
35fi
36popd
37
38section_end piglit
39