From 184325fd2b396a3d4ef67bc7a8875f9b0362caf3 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Mon, 16 Jan 2023 13:20:06 +0100 Subject: [PATCH] test/packaging: Don't install DPDK RPMs from the remote by default This may cause unwanted intermittent issues depending on how long dnf syncs its repos - on occasion it takes too much time leading to job timeouts under the CI. As an alternative, look under a specific path to see if dpdk{,-devel}.rpm are already in place and install them locally - VM images on the CI side will be already provisioned with all needed dependencies. Signed-off-by: Michal Berger Change-Id: Ic924574889b52d521db4799cbb12b4c238a2fe3a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16304 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Konrad Sztyber Reviewed-by: Pawel Piatek --- test/packaging/rpm/rpm.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/packaging/rpm/rpm.sh b/test/packaging/rpm/rpm.sh index e6011e8fd..4c63dc102 100755 --- a/test/packaging/rpm/rpm.sh +++ b/test/packaging/rpm/rpm.sh @@ -7,6 +7,7 @@ testdir=$(readlink -f "$(dirname "$0")") rootdir=$(readlink -f "$testdir/../../../") source "$rootdir/test/common/autotest_common.sh" +shopt -s extglob builddir=$SPDK_TEST_STORAGE/test-rpm @@ -47,9 +48,16 @@ build_shared_rpm() { } build_rpm_with_rpmed_dpdk() { - local es=0 + local es=0 dpdk_rpms=() - sudo dnf install -y dpdk-devel + dpdk_rpms=(/var/spdk/dependencies/autotest/dpdk/dpdk?(-devel).rpm) + if ((${#dpdk_rpms[@]} == 2)); then # dpdk, dpdk-devel + echo "INFO: Installing DPDK from local package: $(rpm -q --queryformat="%{VERSION}" "${dpdk_rpms[0]}")" >&2 + sudo rpm -i "${dpdk_rpms[@]}" + else + echo "WARNING: No local packages found, trying to install DPDK from the remote" >&2 + sudo dnf install -y dpdk-devel + fi build_rpm --with-shared --with-dpdk || es=$? if ((es == 11)); then