diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml index 4124226..83d1da2 100644 --- a/gating.yaml +++ b/gating.yaml @@ -4,3 +4,4 @@ product_versions: decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..b5711c6 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,11 @@ +--- +/: + inherit: false + +summary: Plan for running all tests + +discover: + how: fmf +execute: + how: tmt + diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..efe8d21 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,22 @@ +test: ./runtests.sh +duration: 15m +recommend: + - git + - wget + - rpm-build + - redhat-rpm-config + - autoconf + - automake + - libtool + - pkgconfig + - make + - gcc + - gcc-c++ + - libX11 + - libX11-devel + - libdrm + - libdrm-devel + - libva + - libva-devel + - wayland-devel +framework: shell diff --git a/tests/runtests.sh b/tests/runtests.sh new file mode 100755 index 0000000..6c45d63 --- /dev/null +++ b/tests/runtests.sh @@ -0,0 +1,42 @@ +#!/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="1a13ae13382b7b548f3a7e8035e1d7df66662c0a" +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