test/vm_setup.sh: create reference build for ABI tests
Use already cloned sources in spdk_repo/spdk and create a reference build. SKIP_ABI_TEST flag is deliberately not added to autotest_common.sh because of it's one-time use here. Otherwise autobuild.sh would fail if vm_setup.sh is run for the first time on the system. There would be no previous reference builds to use. Change-Id: I0c32041321ca25b91acb498f852ef14e7869daf1 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1653 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
cb7a83f059
commit
f6fd622bd4
@ -24,7 +24,7 @@ VM_SETUP_PATH=$(readlink -f ${BASH_SOURCE%/*})
|
||||
|
||||
UPGRADE=false
|
||||
INSTALL=false
|
||||
CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat"
|
||||
CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,refspdk"
|
||||
LIBRXE_INSTALL=true
|
||||
|
||||
if [ $(uname -s) == "FreeBSD" ]; then
|
||||
@ -37,6 +37,53 @@ else
|
||||
PACKAGEMNG='undefined'
|
||||
fi
|
||||
|
||||
function install_reference_spdk() {
|
||||
local last_release
|
||||
local output_dir
|
||||
local config_params
|
||||
local rootdir
|
||||
|
||||
# Create a reference SPDK build for ABI tests
|
||||
if echo $CONF | grep -q refspdk; then
|
||||
git -C spdk_repo/spdk fetch --tags
|
||||
last_release=$(git -C spdk_repo/spdk tag | sort --version-sort | grep -v rc | tail -n1)
|
||||
git -C spdk_repo/spdk checkout $last_release
|
||||
git -C spdk_repo/spdk submodule update --init
|
||||
output_dir="$HOME/spdk_$(tr . _ < <(tr -d '[:alpha:]' <<< $last_release))"
|
||||
|
||||
cp -r spdk_repo/spdk $output_dir
|
||||
|
||||
cat > $HOME/autorun-spdk.conf << EOF
|
||||
SPDK_BUILD_SHARED_OBJECT=1
|
||||
SPDK_TEST_AUTOBUILD=1
|
||||
SPDK_TEST_UNITTEST=1
|
||||
SPDK_TEST_BLOCKDEV=1
|
||||
SPDK_TEST_PMDK=1
|
||||
SPDK_TEST_ISAL=1
|
||||
SPDK_TEST_REDUCE=1
|
||||
SPDK_TEST_CRYPTO=1
|
||||
SPDK_TEST_FTL=1
|
||||
SPDK_TEST_OCF=1
|
||||
SPDK_TEST_RAID5=1
|
||||
SPDK_TEST_RBD=1
|
||||
SPDK_RUN_ASAN=1
|
||||
SPDK_RUN_UBSAN=1
|
||||
EOF
|
||||
|
||||
mkdir -p $HOME/output
|
||||
rootdir="$output_dir"
|
||||
source $HOME/autorun-spdk.conf
|
||||
source $output_dir/test/common/autotest_common.sh
|
||||
|
||||
config_params="$(get_config_params)"
|
||||
$output_dir/configure $(echo $config_params | sed 's/--enable-coverage//g')
|
||||
$MAKE -C $output_dir $MAKEFLAGS include/spdk/config.h
|
||||
CONFIG_OCF_PATH="$output_dir/ocf" $MAKE -C $output_dir/lib/env_ocf $MAKEFLAGS exportlib O=$output_dir/build/ocf.a
|
||||
$output_dir/configure $config_params --with-ocf=$output_dir/build/ocf.a --with-shared
|
||||
$MAKE -C $output_dir $MAKEFLAGS
|
||||
fi
|
||||
}
|
||||
|
||||
function install_rxe_cfg() {
|
||||
if echo $CONF | grep -q librxe; then
|
||||
# rxe_cfg is used in the NVMe-oF tests
|
||||
@ -730,6 +777,9 @@ fi
|
||||
install_fio &
|
||||
|
||||
wait
|
||||
|
||||
install_reference_spdk
|
||||
|
||||
# create autorun-spdk.conf in home folder. This is sourced by the autotest_common.sh file.
|
||||
# By setting any one of the values below to 0, you can skip that specific test. If you are
|
||||
# using your autotest platform to do sanity checks before uploading to the build pool, it is
|
||||
|
Loading…
x
Reference in New Issue
Block a user