mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-28 04:34:25 +08:00
356c9c25c3
Interpret the value of HWCI_TEST_SCRIPT environment variable as a shell command. This allows, for example, to provide additional environment variables: HWCI_TEST_SCRIPT="VAR1=VAL1 VAR2=VAL2 /path/to/script" Additionally, add the missing execute permission flags to gtest-runner.sh script. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>
71 lines
2.2 KiB
Bash
Executable File
71 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
INSTALL=`pwd`/install
|
|
|
|
# Set up the driver environment.
|
|
export LD_LIBRARY_PATH=`pwd`/install/lib/
|
|
export LIBVA_DRIVERS_PATH=`pwd`/install/lib/dri/
|
|
# libva spams driver open info by default, and that happens per testcase.
|
|
export LIBVA_MESSAGING_LEVEL=1
|
|
|
|
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
|
|
GTEST_RUNNER_OPTIONS="$GTEST_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
|
|
fi
|
|
|
|
# Default to an empty known flakes file if it doesn't exist.
|
|
touch $INSTALL/$GPU_VERSION-flakes.txt
|
|
|
|
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then
|
|
GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$GALLIUM_DRIVER-skips.txt"
|
|
fi
|
|
|
|
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then
|
|
GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$DRIVER_NAME-skips.txt"
|
|
fi
|
|
|
|
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
|
GTEST_SKIPS="$GTEST_SKIPS --skips $INSTALL/$GPU_VERSION-skips.txt"
|
|
fi
|
|
|
|
set +e
|
|
|
|
gtest-runner \
|
|
run \
|
|
--gtest $GTEST \
|
|
--output ${GTEST_RESULTS_DIR:-results} \
|
|
--jobs ${FDO_CI_CONCURRENT:-4} \
|
|
$GTEST_SKIPS \
|
|
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
|
|
--fraction-start ${CI_NODE_INDEX:-1} \
|
|
--fraction $((${CI_NODE_TOTAL:-1} * ${GTEST_FRACTION:-1})) \
|
|
--env "LD_PRELOAD=$TEST_LD_PRELOAD" \
|
|
$GTEST_RUNNER_OPTIONS
|
|
|
|
GTEST_EXITCODE=$?
|
|
|
|
deqp-runner junit \
|
|
--testsuite gtest \
|
|
--results $RESULTS/failures.csv \
|
|
--output $RESULTS/junit.xml \
|
|
--limit 50 \
|
|
--template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml"
|
|
|
|
# Report the flakes to the IRC channel for monitoring (if configured):
|
|
if [ -n "$FLAKES_CHANNEL" ]; then
|
|
python3 $INSTALL/report-flakes.py \
|
|
--host irc.oftc.net \
|
|
--port 6667 \
|
|
--results $RESULTS/results.csv \
|
|
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
|
|
--channel "$FLAKES_CHANNEL" \
|
|
--runner "$CI_RUNNER_DESCRIPTION" \
|
|
--job "$CI_JOB_ID" \
|
|
--url "$CI_JOB_URL" \
|
|
--branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \
|
|
--branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}"
|
|
fi
|
|
|
|
exit $GTEST_EXITCODE
|