From 809fa26deb9989363b3a127ce4d1fad03a45ab0d Mon Sep 17 00:00:00 2001 From: Václav Kadlčík Date: Sep 24 2021 11:12:50 +0000 Subject: Fix the setup in tests/Sanity/testsuite "koji download-build" is a wrong tool to download artifacts being tested. They are freshly scratch-built and hosted in a local repo called "test-artifacts" unknown to koji. Using "dnf download" directly and limited to that specific repo is a correct way to reach them. I'm adding a fallback using the repo's local files just in case "dnf" suffers some temporary hiccup. --- diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh index e11c162..7687113 100755 --- a/tests/Sanity/testsuite/runtest.sh +++ b/tests/Sanity/testsuite/runtest.sh @@ -40,12 +40,13 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlRun -l "rpm -qf $(which $GCC)" 0 "Checking gcc rpm version" + rlRun "NVR=$(rpm -q --qf='%{NAME}-%{VERSION}-%{RELEASE}' $PACKAGE)" rlRun "TMP=`mktemp -d`" rlRun "pushd $TMP" - rlRun "koji download-build --arch=src $PACKAGE" - rlRun "dnf builddep -y *src.rpm" - rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm" + rlRun "dnf download --disablerepo='*' --enablerepo=test-artifacts --source $NVR || cp /var/share/test-artifacts/$NVR.src.rpm ." + rlRun "dnf builddep -y $NVR.src.rpm" + rlRun "rpm --define='_topdir $TMP' -Uvh $NVR.src.rpm" rlRun "${RPMBUILD_GCC:+CC=$RPMBUILD_GCC} rpmbuild --define='_topdir $TMP' -bc SPECS/${CMD}.spec" rlPhaseEnd