2020-09-28 23:40:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o xtrace
|
|
|
|
|
2021-05-05 08:10:44 +01:00
|
|
|
VERSION=`head -1 install/VERSION`
|
2021-05-31 21:01:42 +01:00
|
|
|
ROOTDIR=`pwd`
|
2020-09-28 23:40:13 +01:00
|
|
|
|
2021-05-04 20:10:54 +01:00
|
|
|
if [ -d results ]; then
|
|
|
|
cd results && rm -rf ..?* .[!.]* *
|
|
|
|
fi
|
2020-09-28 23:40:13 +01:00
|
|
|
cd /piglit
|
|
|
|
|
2021-05-31 21:01:42 +01:00
|
|
|
export OCL_ICD_VENDORS=$ROOTDIR/install/etc/OpenCL/vendors/
|
2020-09-28 23:40:13 +01:00
|
|
|
|
|
|
|
set +e
|
|
|
|
unset DISPLAY
|
2021-05-31 21:01:42 +01:00
|
|
|
export LD_LIBRARY_PATH=$ROOTDIR/install/lib
|
2020-09-28 23:40:13 +01:00
|
|
|
clinfo
|
2021-02-12 17:20:00 +00:00
|
|
|
|
|
|
|
# If the job is parallel at the gitlab job level, will take the corresponding
|
|
|
|
# fraction of the caselist.
|
|
|
|
if [ -n "$CI_NODE_INDEX" ]; then
|
|
|
|
|
|
|
|
if [ "$PIGLIT_PROFILES" != "${PIGLIT_PROFILES% *}" ]; then
|
|
|
|
echo "Can't parallelize piglit with multiple profiles"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
USE_CASELIST=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$USE_CASELIST" ]; then
|
|
|
|
./piglit print-cmd $PIGLIT_TESTS $PIGLIT_PROFILES --format "{name}" > /tmp/case-list.txt
|
|
|
|
|
|
|
|
sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /tmp/case-list.txt
|
|
|
|
|
|
|
|
PIGLIT_TESTS="--test-list /tmp/case-list.txt"
|
|
|
|
fi
|
|
|
|
|
2021-05-31 21:01:42 +01:00
|
|
|
./piglit run -c -j${FDO_CI_CONCURRENT:-4} $PIGLIT_OPTIONS $PIGLIT_TESTS $PIGLIT_PROFILES $ROOTDIR/results
|
2020-09-28 23:40:13 +01:00
|
|
|
retVal=$?
|
|
|
|
if [ $retVal -ne 0 ]; then
|
|
|
|
echo "Found $(cat /tmp/version.txt), expected $VERSION"
|
|
|
|
fi
|
|
|
|
set -e
|
|
|
|
|
|
|
|
PIGLIT_RESULTS=${PIGLIT_RESULTS:-$PIGLIT_PROFILES}
|
|
|
|
mkdir -p .gitlab-ci/piglit
|
2021-05-31 21:01:42 +01:00
|
|
|
./piglit summary console $ROOTDIR/results \
|
2021-02-25 11:21:57 +00:00
|
|
|
| tee ".gitlab-ci/piglit/$PIGLIT_RESULTS.txt.orig" \
|
2021-02-23 01:21:13 +00:00
|
|
|
| head -n -1 \
|
|
|
|
| grep -v ": pass" \
|
|
|
|
| sed '/^summary:/Q' \
|
|
|
|
> .gitlab-ci/piglit/$PIGLIT_RESULTS.txt
|
2021-02-12 17:20:00 +00:00
|
|
|
|
|
|
|
if [ -n "$USE_CASELIST" ]; then
|
|
|
|
# Just filter the expected results based on the tests that were actually
|
|
|
|
# executed, and switch to the version with no summary
|
2021-02-25 11:21:57 +00:00
|
|
|
cat .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.orig | sed '/^summary:/Q' | rev \
|
|
|
|
| cut -f2- -d: | rev | sed "s/$/:/g" > /tmp/executed.txt
|
2021-05-31 21:01:42 +01:00
|
|
|
grep -F -f /tmp/executed.txt $ROOTDIR/install/$PIGLIT_RESULTS.txt \
|
2021-02-12 17:20:00 +00:00
|
|
|
> .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline || true
|
|
|
|
else
|
2021-05-31 21:01:42 +01:00
|
|
|
cp $ROOTDIR/install/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
|
2021-02-12 17:20:00 +00:00
|
|
|
fi
|
2020-09-28 23:40:13 +01:00
|
|
|
|
2021-02-25 11:21:57 +00:00
|
|
|
if diff -q .gitlab-ci/piglit/$PIGLIT_RESULTS.txt{.baseline,}; then
|
2020-09-28 23:40:13 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-05-31 21:01:42 +01:00
|
|
|
./piglit summary html --exclude-details=pass $ROOTDIR/results/summary $ROOTDIR/results
|
2020-09-28 23:40:13 +01:00
|
|
|
|
|
|
|
echo Unexpected change in results:
|
2021-02-25 11:21:57 +00:00
|
|
|
diff -u .gitlab-ci/piglit/$PIGLIT_RESULTS.txt{.baseline,}
|
2020-09-28 23:40:13 +01:00
|
|
|
exit 1
|