autopackage: Remove .rpms between the tests

f6ab6c09e3 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: Michal 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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Michal Berger 2021-12-28 18:09:02 +01:00 committed by Tomasz Zawadzki
parent da7c73016e
commit d09690276e

View File

@ -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[@]}"
}