1#!/bin/sh 2 3set -ex 4 5INSTALL=`pwd`/install 6 7# Set up the driver environment. 8export LD_LIBRARY_PATH=`pwd`/install/lib/ 9export LIBVA_DRIVERS_PATH=`pwd`/install/lib/dri/ 10# libva spams driver open info by default, and that happens per testcase. 11export LIBVA_MESSAGING_LEVEL=1 12 13if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then 14 GTEST_RUNNER_OPTIONS="$GTEST_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt" 15fi 16 17# Default to an empty known flakes file if it doesn't exist. 18touch $INSTALL/$GPU_VERSION-flakes.txt 19 20if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then 21 GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$GALLIUM_DRIVER-skips.txt" 22fi 23 24if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then 25 GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$DRIVER_NAME-skips.txt" 26fi 27 28if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then 29 GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$GPU_VERSION-skips.txt" 30fi 31 32set +e 33 34gtest-runner \ 35 run \ 36 --gtest $GTEST \ 37 --output ${GTEST_RESULTS_DIR:-results} \ 38 --jobs ${FDO_CI_CONCURRENT:-4} \ 39 $GTEST_SKIPS \ 40 --flakes $INSTALL/$GPU_VERSION-flakes.txt \ 41 --fraction-start ${CI_NODE_INDEX:-1} \ 42 --fraction $((${CI_NODE_TOTAL:-1} * ${GTEST_FRACTION:-1})) \ 43 --env "LD_PRELOAD=$TEST_LD_PRELOAD" \ 44 $GTEST_RUNNER_OPTIONS 45 46GTEST_EXITCODE=$? 47 48deqp-runner junit \ 49 --testsuite gtest \ 50 --results $RESULTS/failures.csv \ 51 --output $RESULTS/junit.xml \ 52 --limit 50 \ 53 --template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml" 54 55# Report the flakes to the IRC channel for monitoring (if configured): 56if [ -n "$FLAKES_CHANNEL" ]; then 57 python3 $INSTALL/report-flakes.py \ 58 --host irc.oftc.net \ 59 --port 6667 \ 60 --results $RESULTS/results.csv \ 61 --known-flakes $INSTALL/$GPU_VERSION-flakes.txt \ 62 --channel "$FLAKES_CHANNEL" \ 63 --runner "$CI_RUNNER_DESCRIPTION" \ 64 --job "$CI_JOB_ID" \ 65 --url "$CI_JOB_URL" \ 66 --branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \ 67 --branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}" 68fi 69 70exit $GTEST_EXITCODE 71