libva/tests/runtests.sh
2025-07-09 17:47:49 +02:00

43 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
function error() {
echo "$0: Error: $*" >&2
exit 1
}
function tarball_fullname() {
ls -1 $1.tar.* | head -1
}
function tarball_exists() {
ls -1 $1.tar.* > /dev/null 1>&2 && test -s $(tarball_fullname $1)
}
# Script directory is now a working directory.
cd $(dirname $0) || error "cannot cd to $(dirname $0)"
git clone https://github.com/intel/libva-utils --no-tags --no-checkout || error "cannot git clone intel/libva-utils"
# Enter the directory with unpacked sources.
cd libva-utils || error "cannot cd to libva-utils"
GIT_COMMIT_LIBVA="7bad184b2cf2ffaf4fb3cc71d4df63d7b142d592"
git reset --hard ${GIT_COMMIT_LIBVA} || error "cannot checkout the commit ${GIT_COMMIT_LIBVA}"
# Build the tests.
autoreconf -fvi || error "cannot reconfigure libva-utils"
rpm --eval '%configure --enable-tests' > configure.wrap || error "cannot wrap configure"
bash configure.wrap || error "cannot configure libva-utils"
make || error "cannot build libva-utils"
# These tests can run also in VM (other needs real working graphic adapter).
GTEST_FILTER='Internal.Resolution'
GTEST_FILTER="${GTEST_FILTER}:VAAPIFixture.getDisplay"
GTEST_FILTER="${GTEST_FILTER}:VAAPIInitTerminate.vaInitialize_vaTerminate_Bad_Environment"
GTEST_FILTER="${GTEST_FILTER}:VAAPIInitTerminate.vaInitialize_vaTerminate_Bad_vaSetDriverName"
GTEST_FILTER="${GTEST_FILTER}:VAAPIInitTerminate.InitTermWithoutDisplay"
export GTEST_FILTER
# Run the tests.
./test/test_va_api