2023-10-24 04:46:30 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2024-06-29 14:26:20 +00:00
|
|
|
builddir="$1"
|
|
|
|
tests="$2"
|
|
|
|
|
|
|
|
if [[ -z "$builddir" || -z "$tests" ]]; then
|
|
|
|
echo "Usage: test.sh <build_directory> <test_name>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-10-24 04:46:30 +00:00
|
|
|
set -eux
|
|
|
|
|
2024-09-30 21:39:13 +00:00
|
|
|
_jobs=$(nproc || sysctl -n hw.ncpu)
|
|
|
|
jobs="${FDO_CI_CONCURRENT:-$_jobs}"
|
|
|
|
|
2023-10-24 04:46:30 +00:00
|
|
|
timeout="${TIMEOUT_FACTOR:="2"}"
|
|
|
|
validate="${EXTRA_VALIDATE_ARGS:=""}"
|
|
|
|
parent="${CI_PROJECT_DIR:-$(pwd)}"
|
|
|
|
|
2024-10-25 09:12:47 +00:00
|
|
|
# Put the runtime dir inside CI_PROJECT_DIR or in /tmp if we are running locally
|
|
|
|
export XDG_RUNTIME_DIR="$(mktemp -p "${CI_PROJECT_DIR:-/tmp}" -d xdg-runtime-XXXXXX)"
|
2024-06-29 14:26:20 +00:00
|
|
|
echo "-> Running $tests"
|
2023-10-24 04:46:30 +00:00
|
|
|
|
2024-09-21 16:37:53 +00:00
|
|
|
# Disable all cpu extensions post AVX to match what valgrind supports
|
|
|
|
# https://github.com/openssl/openssl/blob/master/NOTES-VALGRIND.md
|
|
|
|
export OPENSSL_ia32cap=":0"
|
|
|
|
|
2024-10-16 19:29:04 +00:00
|
|
|
# Force Software rendering for GL and Vulkan so the tests run locally
|
|
|
|
# like they would do in the CI.
|
|
|
|
export LIBGL_ALWAYS_SOFTWARE="true"
|
|
|
|
# This the hardcoded value for llvmpipe
|
|
|
|
export MESA_VK_DEVICE_SELECT="10005:0"
|
|
|
|
|
2023-10-24 04:46:30 +00:00
|
|
|
./gst-env.py \
|
2024-06-29 14:26:20 +00:00
|
|
|
"--builddir=$builddir" \
|
|
|
|
gst-validate-launcher "$tests" \
|
2024-09-30 21:39:13 +00:00
|
|
|
--jobs "$jobs" \
|
2023-10-24 04:46:30 +00:00
|
|
|
--check-bugs \
|
|
|
|
--dump-on-failure \
|
|
|
|
--mute \
|
|
|
|
--shuffle \
|
|
|
|
--no-display \
|
2024-08-21 13:24:58 +00:00
|
|
|
--validate-generate-expectations=disabled \
|
2023-10-24 04:46:30 +00:00
|
|
|
--meson-no-rebuild \
|
|
|
|
--timeout-factor "$timeout" \
|
|
|
|
--fail-on-testlist-change \
|
|
|
|
-l "$parent/validate-logs/" \
|
|
|
|
--xunit-file "$parent/validate-logs/xunit.xml" \
|
|
|
|
$validate
|