autobuild: Add test for building SPDK RPMs
Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: Iea87c87367d2ed49b00e896df046e0572fecec98 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6549 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
7a5cc6cad5
commit
3bc0002511
@ -13,6 +13,37 @@ source "$1"
|
|||||||
rootdir=$(readlink -f $(dirname $0))
|
rootdir=$(readlink -f $(dirname $0))
|
||||||
source "$rootdir/test/common/autotest_common.sh"
|
source "$rootdir/test/common/autotest_common.sh"
|
||||||
|
|
||||||
|
function build_rpms() (
|
||||||
|
local version rpms
|
||||||
|
|
||||||
|
# Make sure linker will not attempt to look under DPDK's repo dir to get the libs
|
||||||
|
unset -v LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
install_uninstall_rpms() {
|
||||||
|
rpms=("$HOME/rpmbuild/RPMS/x86_64/"spdk{,-devel,{,-dpdk}-libs}-$version-1.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[@]##*/}"
|
||||||
|
sudo rpm -e "${rpms[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
build_rpm() {
|
||||||
|
MAKEFLAGS="$MAKEFLAGS" SPDK_VERSION="$version" DEPS=no "$rootdir/rpmbuild/rpm.sh" "$@"
|
||||||
|
install_uninstall_rpms
|
||||||
|
}
|
||||||
|
|
||||||
|
version="test_shared"
|
||||||
|
run_test "build_shared_rpm" build_rpm --with-shared
|
||||||
|
|
||||||
|
if [[ -n $SPDK_TEST_NATIVE_DPDK ]]; then
|
||||||
|
version="test_shared_native_dpdk"
|
||||||
|
run_test "build_shared_native_dpdk_rpm" build_rpm --with-shared --with-dpdk="$SPDK_RUN_EXTERNAL_DPDK"
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
out=$PWD
|
out=$PWD
|
||||||
|
|
||||||
MAKEFLAGS=${MAKEFLAGS:--j16}
|
MAKEFLAGS=${MAKEFLAGS:--j16}
|
||||||
@ -28,6 +59,10 @@ if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
timing_exit porcelain_check
|
timing_exit porcelain_check
|
||||||
|
|
||||||
|
if [[ $SPDK_TEST_RELEASE_BUILD -eq 1 ]]; then
|
||||||
|
run_test "build_rpms" build_rpms
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $RUN_NIGHTLY -eq 0 ]]; then
|
if [[ $RUN_NIGHTLY -eq 0 ]]; then
|
||||||
timing_finish
|
timing_finish
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -40,6 +40,7 @@ bdev_fio_rw_verify_ext
|
|||||||
bdev_fio_trim_ext
|
bdev_fio_trim_ext
|
||||||
bdev_reset
|
bdev_reset
|
||||||
build_native_dpdk
|
build_native_dpdk
|
||||||
|
build_shared_native_dpdk_rpm
|
||||||
iscsi_tgt_digest
|
iscsi_tgt_digest
|
||||||
iscsi_tgt_data_digest
|
iscsi_tgt_data_digest
|
||||||
iscsi_tgt_pmem
|
iscsi_tgt_pmem
|
||||||
|
Loading…
Reference in New Issue
Block a user