libaio/plans/libaio.fmf
2024-12-11 03:11:18 +00:00

57 lines
1.6 KiB
Plaintext

summary: libaio gating tests
prepare:
how: install
package:
- rpm-build
- gcc
- libaio-devel
- gcc-c++
- wget
discover:
how: shell
url: https://gitlab.com/redhat/centos-stream/rpms/libaio.git
ref: c10s
dist-git-source: true
dist-git-install-builddeps: true
tests:
- name: regression tests
test: |
set -x
if [ -z "$PKG_VER" ]; then
PKG_VER=`rpmspec -q --srpm --qf "%{version}" libaio.spec`
fi
if [ -z "$PKG_VER" ]; then
echo "Error: Unable to extract package version"
exit 1
fi
pushd "$TMT_SOURCE_DIR/libaio-$PKG_VER"
ls -l
cp ../tests/test_against_local.patch ./ || wget https://gitlab.cee.redhat.com/kernel-qe/kernel/-/raw/master/storage/block/libaio/harness/test_against_local.patch
if [[ ! -f test_against_local.patch ]];then
echo "Don't get the lcoal patch"
exit 1
fi
! grep -q 'make LIBAIO=-laio partcheck' harness/Makefile && patch -p0 < test_against_local.patch
if [[ $? != 0 ]];then
echo "apply local patch failed"
exit 1
fi
make install || echo "make install faield in $(pwd)"
pushd harness
make || echo "make in harness failed"
make check || exit 1
popd
popd
execute:
- how: tmt
adjust:
enabled: false
when: distro == fedora
because: They don't have access to internal repos.