5 DEQP_OPTIONS
="--deqp-surface-width=256 --deqp-surface-height=256"
6 DEQP_OPTIONS
="$DEQP_OPTIONS --deqp-surface-type=pbuffer"
7 DEQP_OPTIONS
="$DEQP_OPTIONS --deqp-gl-config-name=rgba8888d24s8ms0"
8 DEQP_OPTIONS
="$DEQP_OPTIONS --deqp-visibility=hidden"
10 # It would be nice to be able to enable the watchdog, so that hangs in a test
11 # don't need to wait the full hour for the run to time out. However, some
12 # shaders end up taking long enough to compile
13 # (dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 for example)
14 # that they'll sporadically trigger the watchdog.
15 #DEQP_OPTIONS="$DEQP_OPTIONS --deqp-watchdog=enable"
17 if [ -z "$DEQP_VER" ]; then
18 echo 'DEQP_VER must be set to something like "gles2", "gles31" or "vk" for the test run'
22 if [ "$DEQP_VER" = "vk" ]; then
23 if [ -z "$VK_DRIVER" ]; then
24 echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
29 if [ -z "$DEQP_SKIPS" ]; then
30 echo 'DEQP_SKIPS must be set to something like "deqp-default-skips.txt"'
36 # Set up the driver environment.
37 export LD_LIBRARY_PATH
=`pwd`/install
/lib
/
38 export EGL_PLATFORM
=surfaceless
39 export VK_ICD_FILENAMES
=`pwd`/install
/share
/vulkan
/icd.d
/"$VK_DRIVER"_icd.x86_64.json
41 # the runner was failing to look for libkms in /usr/local/lib for some reason
42 # I never figured out.
43 export LD_LIBRARY_PATH
=$LD_LIBRARY_PATH:/usr
/local
/lib
48 # Generate test case list file.
49 if [ "$DEQP_VER" = "vk" ]; then
50 cp /deqp
/mustpass
/vk-master.txt
/tmp
/case-list.txt
51 DEQP
=/deqp
/external
/vulkancts
/modules
/vulkan
/deqp-vk
53 cp /deqp
/mustpass
/$DEQP_VER-master.txt
/tmp
/case-list.txt
54 DEQP
=/deqp
/modules
/$DEQP_VER/deqp-
$DEQP_VER
57 # If the job is parallel, take the corresponding fraction of the caselist.
58 # Note: N~M is a gnu sed extension to match every nth line (first line is #1).
59 if [ -n "$CI_NODE_INDEX" ]; then
60 sed -ni $CI_NODE_INDEX~
$CI_NODE_TOTAL"p" /tmp
/case-list.txt
63 if [ ! -s /tmp
/case-list.txt
]; then
64 echo "Caselist generation failed"
68 if [ -n "$DEQP_EXPECTED_FAILS" ]; then
69 XFAIL
="--xfail-list $INSTALL/$DEQP_EXPECTED_FAILS"
74 if [ -n "$DEQP_PARALLEL" ]; then
75 JOB
="--job $DEQP_PARALLEL"
85 --caselist $caselist \
86 --exclude-list $INSTALL/$DEQP_SKIPS \
90 $DEQP_RUNNER_OPTIONS \
96 if [ -z "$FLAKES_CHANNEL" ]; then
100 bot
="$CI_RUNNER_DESCRIPTION-$CI_PIPELINE_ID"
101 channel
="$FLAKES_CHANNEL"
104 echo USER
$bot unused unused
:Gitlab CI Notifier
108 desc
="Flakes detected in job: $CI_JOB_URL on $CI_RUNNER_DESCRIPTION"
109 if [ -n "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ]; then
110 desc
="$desc on branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME ($CI_MERGE_REQUEST_TITLE)"
112 echo "PRIVMSG $channel :$desc"
113 for flake
in `cat $flakes`; do
114 echo "PRIVMSG $channel :$flake"
116 echo "PRIVMSG $channel :See $CI_JOB_URL/artifacts/browse/results/"
118 ) | nc irc.freenode.net
6667 > /dev
/null
122 extract_xml_result
() {
126 start
="#beginTestCaseResult $testcase"
128 while IFS
= read -r line
; do
129 if [ "$line" = "$start" ]; then
131 echo "#beginSession" > $dst
133 while IFS
= read -r line
; do
134 if [ "$line" = "#endTestCaseResult" ]; then
136 echo "#endSession" >> $dst
137 /deqp
/executor
/testlog-to-xml
$dst "$RESULTS/$testcase.xml"
138 # copy the stylesheets here so they only end up in artifacts
139 # if we have one or more result xml in artifacts
140 cp /deqp
/testlog.css
"$RESULTS/"
141 cp /deqp
/testlog.xsl
"$RESULTS/"
152 extract_xml_results
() {
154 while IFS
= read -r testcase
; do
155 testcase
=${testcase%,*}
156 extract_xml_result
$testcase $qpas
160 # Generate junit results
163 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
165 echo "<testsuite name=\"$DEQP_VER-$CI_NODE_INDEX\">"
169 # avoid counting Skip's in the # of tests:
170 if [ "$result" = "Skip" ]; then
173 echo "<testcase name=\"$testcase\">"
174 if [ "$result" != "Pass" ]; then
175 echo "<failure type=\"$result\">"
176 echo "$result: See $CI_JOB_URL/artifacts/results/$testcase.xml"
186 RENDERER
=`grep -A1 TestCaseResult.\*info.renderer $RESULTS/deqp-info.qpa | grep '<Text' | sed 's|.*<Text>||g' | sed 's|</Text>||g'`
187 VERSION
=`grep -A1 TestCaseResult.\*info.version $RESULTS/deqp-info.qpa | grep '<Text' | sed 's|.*<Text>||g' | sed 's|</Text>||g'`
188 echo "Renderer: $RENDERER"
189 echo "Version: $VERSION "
193 echo "Capturing renderer info for driver sanity checks"
194 # If you're having trouble loading your driver, uncommenting this may help
196 # export EGL_LOG_LEVEL=debug
197 $DEQP $DEQP_OPTIONS --deqp-case=dEQP-GLES2.info.\
* --deqp-log-filename=$RESULTS/deqp-info.qpa
201 # wrapper to supress +x to avoid spamming the log
208 if [ $DEQP_VER != vk
]; then
212 run_cts
$DEQP /tmp
/case-list.txt
$RESULTS/cts-runner-results.txt
215 # junit is disabled, because it overloads gitlab.freedesktop.org to parse it.
216 #quiet generate_junit $RESULTS/cts-runner-results.txt > $RESULTS/results.xml
218 if [ $DEQP_EXITCODE -ne 0 ]; then
219 # preserve caselist files in case of failures:
220 cp /tmp
/deqp_runner.
*.txt
$RESULTS/
221 cat $RESULTS/cts-runner-results.txt | \
224 grep -v ",ExpectedFail" > \
225 $RESULTS/cts-runner-unexpected-results.txt
227 if [ -z "$DEQP_NO_SAVE_RESULTS" ]; then
228 echo "Some unexpected results found (see cts-runner-results.txt in artifacts for full results):"
229 head -n 50 $RESULTS/cts-runner-unexpected-results.txt
231 # Save the logs for up to the first 50 unexpected results:
232 head -n 50 $RESULTS/cts-runner-unexpected-results.txt | quiet extract_xml_results
/tmp
/*.qpa
234 echo "Unexpected results found:"
235 cat $RESULTS/cts-runner-unexpected-results.txt
238 count
=`cat $RESULTS/cts-runner-unexpected-results.txt | wc -l`
240 # Re-run fails to detect flakes. But use a small threshold, if
241 # something was fundamentally broken, we don't want to re-run
242 # the entire caselist
244 cat $RESULTS/cts-runner-results.txt | \
246 $RESULTS/cts-runner-flakes.txt
248 count
=`cat $RESULTS/cts-runner-flakes.txt | wc -l`
249 if [ $count -gt 0 ]; then
250 echo "Some flakes found (see cts-runner-flakes.txt in artifacts for full results):"
251 head -n 50 $RESULTS/cts-runner-flakes.txt
253 if [ -z "$DEQP_NO_SAVE_RESULTS" ]; then
254 # Save the logs for up to the first 50 flakes:
255 head -n 50 $RESULTS/cts-runner-flakes.txt | quiet extract_xml_results
/tmp
/*.qpa
258 # Report the flakes to IRC channel for monitoring (if configured):
259 quiet report_flakes
$RESULTS/cts-runner-flakes.txt
261 # no flakes, so clean-up:
262 rm $RESULTS/cts-runner-flakes.txt