
It's just a ton of fuss for driver developers fixing piglit tests. This makes the trace expectation files pretty silly (empty expectation, but you'll get a diff to a non-empty result when something fails) Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Adam Jackson <ajax@redhat.com> Acked-by: Andres Gomez <agomez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9226>
73 lines
2.1 KiB
Bash
Executable File
73 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
VERSION=`cat install/VERSION`
|
|
|
|
rm -rf results
|
|
cd /piglit
|
|
|
|
export OCL_ICD_VENDORS=$OLDPWD/install/etc/OpenCL/vendors/
|
|
|
|
set +e
|
|
unset DISPLAY
|
|
export LD_LIBRARY_PATH=$OLDPWD/install/lib
|
|
clinfo
|
|
|
|
# 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
|
|
|
|
./piglit run -c -j${FDO_CI_CONCURRENT:-4} $PIGLIT_OPTIONS $PIGLIT_TESTS $PIGLIT_PROFILES $OLDPWD/results
|
|
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
|
|
./piglit summary console $OLDPWD/results \
|
|
| head -n -1 \
|
|
| grep -v ": pass" \
|
|
| sed '/^summary:/Q' \
|
|
> .gitlab-ci/piglit/$PIGLIT_RESULTS.txt
|
|
|
|
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
|
|
cat .gitlab-ci/piglit/$PIGLIT_RESULTS.txt | head -n -16 | tee .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.new \
|
|
| rev | cut -f2- -d: | rev | sed "s/$/:/g" > /tmp/executed.txt
|
|
grep -F -f /tmp/executed.txt $OLDPWD/install/$PIGLIT_RESULTS.txt \
|
|
> .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline || true
|
|
else
|
|
cp $OLDPWD/install/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
|
|
cp .gitlab-ci/piglit/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.new
|
|
fi
|
|
|
|
if diff -q .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.{baseline,new}; then
|
|
exit 0
|
|
fi
|
|
|
|
./piglit summary html --exclude-details=pass $OLDPWD/summary $OLDPWD/results
|
|
|
|
echo Unexpected change in results:
|
|
diff -u .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.{baseline,new}
|
|
exit 1
|