• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3set -e
4set -o xtrace
5
6VERSION=`cat install/VERSION`
7
8rm -rf results
9cd /piglit
10
11PIGLIT_OPTIONS=$(echo $PIGLIT_OPTIONS | head -n 1)
12set +e
13xvfb-run --server-args="-noreset" sh -c \
14         "export LD_LIBRARY_PATH=$OLDPWD/install/lib;
15         wflinfo --platform glx --api gl --profile core | tee /tmp/version.txt | grep \"Mesa $VERSION\\\$\" &&
16         ./piglit run -j${FDO_CI_CONCURRENT:-4} $PIGLIT_OPTIONS $PIGLIT_PROFILES $OLDPWD/results"
17retVal=$?
18if [ $retVal -ne 0 ]; then
19    echo "Found $(cat /tmp/version.txt), expected $VERSION"
20fi
21set -e
22
23PIGLIT_RESULTS=${PIGLIT_RESULTS:-$PIGLIT_PROFILES}
24mkdir -p .gitlab-ci/piglit
25cp $OLDPWD/install/piglit/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
26./piglit summary console $OLDPWD/results | head -n -1 | grep -v ": pass" >.gitlab-ci/piglit/$PIGLIT_RESULTS.txt
27
28if diff -q .gitlab-ci/piglit/$PIGLIT_RESULTS.txt{.baseline,}; then
29    exit 0
30fi
31
32./piglit summary html --exclude-details=pass $OLDPWD/summary $OLDPWD/results
33
34echo Unexpected change in results:
35diff -u .gitlab-ci/piglit/$PIGLIT_RESULTS.txt{.baseline,}
36exit 1
37