~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to .gitlab-ci/piglit/piglit-runner.sh

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
set -ex
4
 
 
5
 
if [ -z "$GPU_VERSION" ]; then
6
 
   echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in your ci/gpu-version-*.txt)'
7
 
   exit 1
8
 
fi
9
 
 
10
 
INSTALL=`pwd`/install
11
 
 
12
 
# Set up the driver environment.
13
 
export LD_LIBRARY_PATH=`pwd`/install/lib/
14
 
export EGL_PLATFORM=surfaceless
15
 
export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.${VK_CPU:-`uname -m`}.json
16
 
 
17
 
RESULTS=`pwd`/${PIGLIT_RESULTS_DIR:-results}
18
 
mkdir -p $RESULTS
19
 
 
20
 
# Ensure Mesa Shader Cache resides on tmpfs.
21
 
SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
22
 
SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}
23
 
 
24
 
findmnt -n tmpfs ${SHADER_CACHE_HOME} || findmnt -n tmpfs ${SHADER_CACHE_DIR} || {
25
 
    mkdir -p ${SHADER_CACHE_DIR}
26
 
    mount -t tmpfs -o nosuid,nodev,size=2G,mode=1755 tmpfs ${SHADER_CACHE_DIR}
27
 
}
28
 
 
29
 
if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
30
 
    # deqp is to use virpipe, and virgl_test_server llvmpipe
31
 
    export GALLIUM_DRIVER="$GALLIUM_DRIVER"
32
 
 
33
 
    VTEST_ARGS="--use-egl-surfaceless"
34
 
    if [ "$VIRGL_HOST_API" = "GLES" ]; then
35
 
        VTEST_ARGS="$VTEST_ARGS --use-gles"
36
 
    fi
37
 
 
38
 
    GALLIUM_DRIVER=llvmpipe \
39
 
    GALLIVM_PERF="nopt" \
40
 
    virgl_test_server $VTEST_ARGS >$RESULTS/vtest-log.txt 2>&1 &
41
 
 
42
 
    sleep 1
43
 
fi
44
 
 
45
 
if [ -n "$PIGLIT_FRACTION" -o -n "$CI_NODE_INDEX" ]; then
46
 
   FRACTION=`expr ${PIGLIT_FRACTION:-1} \* ${CI_NODE_TOTAL:-1}`
47
 
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --fraction $FRACTION"
48
 
fi
49
 
 
50
 
# If the job is parallel at the gitab job level, take the corresponding fraction
51
 
# of the caselist.
52
 
if [ -n "$CI_NODE_INDEX" ]; then
53
 
   PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --fraction-start ${CI_NODE_INDEX}"
54
 
fi
55
 
 
56
 
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
57
 
    PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
58
 
fi
59
 
 
60
 
# Default to an empty known flakes file if it doesn't exist.
61
 
touch $INSTALL/$GPU_VERSION-flakes.txt
62
 
 
63
 
if [ -n "$VK_DRIVER" ] && [ -e "$INSTALL/$VK_DRIVER-skips.txt" ]; then
64
 
    PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$VK_DRIVER-skips.txt"
65
 
fi
66
 
 
67
 
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then
68
 
    PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GALLIUM_DRIVER-skips.txt"
69
 
fi
70
 
 
71
 
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then
72
 
    PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$DRIVER_NAME-skips.txt"
73
 
fi
74
 
 
75
 
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
76
 
    PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
77
 
fi
78
 
 
79
 
set +e
80
 
 
81
 
piglit-runner \
82
 
    run \
83
 
    --piglit-folder /piglit \
84
 
    --output $RESULTS \
85
 
    --jobs ${FDO_CI_CONCURRENT:-4} \
86
 
    --skips $INSTALL/all-skips.txt $PIGLIT_SKIPS \
87
 
    --flakes $INSTALL/$GPU_VERSION-flakes.txt \
88
 
    --profile $PIGLIT_PROFILES \
89
 
    --process-isolation \
90
 
    $PIGLIT_RUNNER_OPTIONS \
91
 
    -v -v
92
 
 
93
 
PIGLIT_EXITCODE=$?
94
 
 
95
 
deqp-runner junit \
96
 
   --testsuite $PIGLIT_PROFILES \
97
 
   --results $RESULTS/failures.csv \
98
 
   --output $RESULTS/junit.xml \
99
 
   --limit 50 \
100
 
   --template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml"
101
 
 
102
 
# Report the flakes to the IRC channel for monitoring (if configured):
103
 
if [ -n "$FLAKES_CHANNEL" ]; then
104
 
  python3 $INSTALL/report-flakes.py \
105
 
         --host irc.oftc.net \
106
 
         --port 6667 \
107
 
         --results $RESULTS/results.csv \
108
 
         --known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
109
 
         --channel "$FLAKES_CHANNEL" \
110
 
         --runner "$CI_RUNNER_DESCRIPTION" \
111
 
         --job "$CI_JOB_ID" \
112
 
         --url "$CI_JOB_URL" \
113
 
         --branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \
114
 
         --branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}"
115
 
fi
116
 
 
117
 
exit $PIGLIT_EXITCODE