From 101cd9b6c3c8e02ef3a51e53769683c895724451 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Fri, 12 Nov 2021 09:09:08 +0100 Subject: [PATCH] CI testing: Fix the SRPM download Usually, this test is used for gating ltrace. In such case the Fedora infrastructure offers the SRPM along with other ltrace subrpms within a repo called "test-artifacts". However, this test is also used to test dejagnu, because ltrace has dejagnu based testsuite. In such case the "test-artifacts" repo has dejagnu, but not ltrace. We need to be able to get the ltrace SRPM in both cases. --- tests/Sanity/testsuite/runtest.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh index 7687113..d3b2e4a 100755 --- a/tests/Sanity/testsuite/runtest.sh +++ b/tests/Sanity/testsuite/runtest.sh @@ -44,7 +44,12 @@ rlJournalStart rlRun "TMP=`mktemp -d`" rlRun "pushd $TMP" - rlRun "dnf download --disablerepo='*' --enablerepo=test-artifacts --source $NVR || cp /var/share/test-artifacts/$NVR.src.rpm ." + set -x + dnf download --disablerepo='*' --enablerepo=test-artifacts --source $NVR || \ + cp /var/share/test-artifacts/$NVR.src.rpm . || \ + rlFetchSrcForInstalled ltrace + set +x + 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"