xref: /OK3568_Linux_fs/external/xserver/test/scripts/xinit-piglit-session.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/sh
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun# .xinitrc replacement to run piglit and exit.
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun# Note that piglit will run many processes against the server, so
6*4882a593Smuzhiyun# running the server with -noreset is recommended to improve runtime.
7*4882a593Smuzhiyun
8*4882a593Smuzhiyunset -e
9*4882a593Smuzhiyun
10*4882a593Smuzhiyunif test "x$PIGLIT_DIR" = "x"; then
11*4882a593Smuzhiyun    echo "PIGLIT_DIR must be set to the directory of the piglit repository."
12*4882a593Smuzhiyun    exit 1
13*4882a593Smuzhiyunfi
14*4882a593Smuzhiyun
15*4882a593Smuzhiyunif test "x$PIGLIT_RESULTS_DIR" = "x"; then
16*4882a593Smuzhiyun    echo "PIGLIT_RESULTS_DIR must be defined"
17*4882a593Smuzhiyun    exit 1
18*4882a593Smuzhiyunfi
19*4882a593Smuzhiyun
20*4882a593Smuzhiyunif test "x$XTEST_DIR" = "x"; then
21*4882a593Smuzhiyun    echo "XTEST_DIR must be set to the root of the built xtest tree."
22*4882a593Smuzhiyun    exit 1
23*4882a593Smuzhiyunfi
24*4882a593Smuzhiyun
25*4882a593Smuzhiyuncd $PIGLIT_DIR
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun# Skip some tests that are failing at the time of importing the script.
28*4882a593Smuzhiyun#    "REPORT: min_bounds, rbearing was 0, expecting 2"
29*4882a593SmuzhiyunPIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@3"
30*4882a593SmuzhiyunPIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@4"
31*4882a593SmuzhiyunPIGLIT_ARGS="$PIGLIT_ARGS -x xloadqueryfont@1"
32*4882a593SmuzhiyunPIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@1"
33*4882a593SmuzhiyunPIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@2"
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunexec ./piglit run xts-render $PIGLIT_ARGS $PIGLIT_RESULTS_DIR
36