Adjust gating tests to RHEL10

In RHEL10 rpmbuild cleans BUILDROOT and BUILD folder. We need it for tests.
Solution is to use --noclean parameter of rpmbuild.

There might be more folders in _BUILD_DIR. So we cant use `cd ${PACKAGE}-*`
Solution is to detect version number from installed package.
This commit is contained in:
Tomas Halman 2024-04-17 17:26:32 +02:00
parent 90603d1cdf
commit a90093fe61

View File

@ -66,10 +66,11 @@ rlJournalStart
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest rlPhaseStartTest
rlRun "QA_RPATHS=0x0002 rpmbuild -ba ${_SPEC_DIR}/${PACKAGE}.spec" 0 "Test: Rebuild of source '${PACKAGE}' package" rlRun "QA_RPATHS=0x0002 rpmbuild -ba --noclean ${_SPEC_DIR}/${PACKAGE}.spec" 0 "Test: Rebuild of source '${PACKAGE}' package"
rlGetPhaseState rlGetPhaseState
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
cd ${_BUILD_DIR}/${PACKAGE}-* VERSION=$(rpm -q ${PACKAGE} --qf="%{version}")
cd ${_BUILD_DIR}/${PACKAGE}-${VERSION}
rlRun -s "make check" 0 "Test: Upstream testsuite" rlRun -s "make check" 0 "Test: Upstream testsuite"
cd ${TmpDir} cd ${TmpDir}
while read -r I; do while read -r I; do