From a90093fe6137868f3857c95789a6b03e3ac24fd0 Mon Sep 17 00:00:00 2001 From: Tomas Halman Date: Wed, 17 Apr 2024 17:26:32 +0200 Subject: [PATCH] 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. --- .../upstream-testsuite-execution-and-rebuild-test/runtest.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/upstream-testsuite-execution-and-rebuild-test/runtest.sh b/tests/upstream-testsuite-execution-and-rebuild-test/runtest.sh index f04647c..b6ab75a 100755 --- a/tests/upstream-testsuite-execution-and-rebuild-test/runtest.sh +++ b/tests/upstream-testsuite-execution-and-rebuild-test/runtest.sh @@ -66,10 +66,11 @@ rlJournalStart rlPhaseEnd 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 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" cd ${TmpDir} while read -r I; do