xserver-multidpi/test/scripts/xinit-piglit-session.sh
Eric Anholt deae9c7e84 test: Run some XTS5 integration tests against Xvfb if possible.
By default the tests will be skipped.  However, if you set XTEST_DIR
to the repo of a built X Test Suite and PIGLIT_DIR to a piglit repo
(no build necessary), make check will run piglit's xts-render tests
against Xvfb.

We could run more of XTS5, but I haven't spent the time identifying
what additional subset would be worth running, since much of it is
only really testing the client libraries.  We want to make sure that
we keep the runtime down, and this subset of the test suite took 92
seconds according to piglit.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-09-02 16:24:32 -04:00

48 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
# .xinitrc replacement to run piglit and exit.
#
# Note that piglit will run many processes against the server, so
# running the server with -noreset is recommended to improve runtime.
set -e
if test "x$PIGLIT_DIR" = "x"; then
echo "PIGLIT_DIR must be set to the directory of the piglit repository."
exit 1
fi
if test "x$PIGLIT_RESULTS_DIR" = "x"; then
echo "PIGLIT_RESULTS_DIR must be defined"
exit 1
fi
if test "x$XTEST_DIR" = "x"; then
echo "XTEST_DIR must be set to the root of the built xtest tree."
exit 1
fi
cd $PIGLIT_DIR
# Write the piglit.conf we'll use for our testing. Don't use the
# default piglit.conf name because that may overwrite a local
# piglit.conf.
PIGLITCONF=piglit-xserver-test.conf
cat <<EOF > $PIGLITCONF
[xts]
path=$XTEST_DIR
EOF
# Skip some tests that are failing at the time of importing the script.
# "REPORT: min_bounds, rbearing was 0, expecting 2"
PIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@3"
PIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@4"
PIGLIT_ARGS="$PIGLIT_ARGS -x xloadqueryfont@1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@2"
# "REPORT: Incorrect pixel on inside of area at point (0, 0): 0x0 != 0x1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xgetimage@7"
PIGLIT_ARGS="$PIGLIT_ARGS -x xgetsubimage@7"
exec ./piglit-run.py xts-render -f $PIGLITCONF $PIGLIT_ARGS $PIGLIT_RESULTS_DIR