Commit d0969027 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

autopackage: Remove .rpms between the tests



f6ab6c09 changed the glob pattern for building the rpms[] list
in the way that it now includes all the *.rpms. This breaks the test
against the native dpdk since it picks up the .rpms created by the
previous tests - this causes rpm -i to fail since packages with
conflicting contents are being installed.

To mitigate, purge all rpm packages after each test is completed.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: I9516956f241936b2be400740ce6758594092ebc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10899


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent da7c7301
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24,10 +24,11 @@ function build_rpms() (
		rpms=("$builddir/rpm/x86_64/"*.rpm)

		sudo rpm -i "${rpms[@]}"
		rpms=("${rpms[@]##*/}") rpms=("${rpms[@]%.rpm}")
		# Check if we can find one of the apps in the PATH now and verify if it doesn't miss
		# any libs.
		LIST_LIBS=yes "$rootdir/rpmbuild/rpm-deps.sh" "${SPDK_APP[@]##*/}"
		rm "${rpms[@]}"
		rpms=("${rpms[@]##*/}") rpms=("${rpms[@]%.rpm}")
		sudo rpm -e "${rpms[@]}"
	}