test/common: consolidate test params for running with external DPDK
Get rid of WITH_DPDK_DIR and SPDK_RUN_INSTALLED_DPDK, introduce SPDK_RUN_EXTERNAL_DPDK which can point to a DPDK dir. It's an empty string by default. Change-Id: Iff2b3773a4614db07f4196165087a79472e02b9a Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/867 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
52aaee43ab
commit
49473bdc81
@ -17,5 +17,5 @@ cat "$conf"
|
|||||||
|
|
||||||
# Runs agent scripts
|
# Runs agent scripts
|
||||||
$rootdir/autobuild.sh "$conf"
|
$rootdir/autobuild.sh "$conf"
|
||||||
sudo -E WITH_DPDK_DIR="$WITH_DPDK_DIR" $rootdir/autotest.sh "$conf"
|
sudo -E $rootdir/autotest.sh "$conf"
|
||||||
$rootdir/autopackage.sh "$conf"
|
$rootdir/autopackage.sh "$conf"
|
||||||
|
@ -104,8 +104,8 @@ export SPDK_TEST_REDUCE
|
|||||||
export SPDK_RUN_ASAN
|
export SPDK_RUN_ASAN
|
||||||
: ${SPDK_RUN_UBSAN=0}
|
: ${SPDK_RUN_UBSAN=0}
|
||||||
export SPDK_RUN_UBSAN
|
export SPDK_RUN_UBSAN
|
||||||
: ${SPDK_RUN_INSTALLED_DPDK=0}
|
: ${SPDK_RUN_EXTERNAL_DPDK=""}
|
||||||
export SPDK_RUN_INSTALLED_DPDK
|
export SPDK_RUN_EXTERNAL_DPDK
|
||||||
: ${SPDK_RUN_NON_ROOT=0}
|
: ${SPDK_RUN_NON_ROOT=0}
|
||||||
export SPDK_RUN_NON_ROOT
|
export SPDK_RUN_NON_ROOT
|
||||||
: ${SPDK_TEST_CRYPTO=0}
|
: ${SPDK_TEST_CRYPTO=0}
|
||||||
@ -188,19 +188,11 @@ fi
|
|||||||
if [ "$(uname -s)" = "Linux" ]; then
|
if [ "$(uname -s)" = "Linux" ]; then
|
||||||
MAKE="make"
|
MAKE="make"
|
||||||
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
|
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
|
||||||
DPDK_LINUX_DIR=/usr/share/dpdk/x86_64-default-linuxapp-gcc
|
|
||||||
if [ -d $DPDK_LINUX_DIR ] && [ $SPDK_RUN_INSTALLED_DPDK -eq 1 ]; then
|
|
||||||
WITH_DPDK_DIR=$DPDK_LINUX_DIR
|
|
||||||
fi
|
|
||||||
# Override the default HUGEMEM in scripts/setup.sh to allocate 8GB in hugepages.
|
# Override the default HUGEMEM in scripts/setup.sh to allocate 8GB in hugepages.
|
||||||
export HUGEMEM=8192
|
export HUGEMEM=8192
|
||||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||||
MAKE="gmake"
|
MAKE="gmake"
|
||||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')}
|
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')}
|
||||||
DPDK_FREEBSD_DIR=/usr/local/share/dpdk/x86_64-native-bsdapp-clang
|
|
||||||
if [ -d $DPDK_FREEBSD_DIR ] && [ $SPDK_RUN_INSTALLED_DPDK -eq 1 ]; then
|
|
||||||
WITH_DPDK_DIR=$DPDK_FREEBSD_DIR
|
|
||||||
fi
|
|
||||||
# FreeBSD runs a much more limited set of tests, so keep the default 2GB.
|
# FreeBSD runs a much more limited set of tests, so keep the default 2GB.
|
||||||
export HUGEMEM=2048
|
export HUGEMEM=2048
|
||||||
else
|
else
|
||||||
@ -413,11 +405,8 @@ function get_config_params() {
|
|||||||
config_params+=' --with-uring'
|
config_params+=' --with-uring'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule.
|
if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then
|
||||||
# If a DPDK installation is found in a well-known location though, WITH_DPDK_DIR will be
|
config_params+=" --with-dpdk=$SPDK_RUN_EXTERNAL_DPDK"
|
||||||
# set which will override the default and use that DPDK installation instead.
|
|
||||||
if [ -n "$WITH_DPDK_DIR" ]; then
|
|
||||||
config_params+=" --with-dpdk=$WITH_DPDK_DIR"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$config_params"
|
echo "$config_params"
|
||||||
@ -1200,12 +1189,12 @@ function autotest_cleanup() {
|
|||||||
function freebsd_update_contigmem_mod() {
|
function freebsd_update_contigmem_mod() {
|
||||||
if [ $(uname) = FreeBSD ]; then
|
if [ $(uname) = FreeBSD ]; then
|
||||||
kldunload contigmem.ko || true
|
kldunload contigmem.ko || true
|
||||||
if [ -n "$WITH_DPDK_DIR" ]; then
|
if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then
|
||||||
echo "Warning: SPDK only works on FreeBSD with patches that only exist in SPDK's dpdk submodule"
|
echo "Warning: SPDK only works on FreeBSD with patches that only exist in SPDK's dpdk submodule"
|
||||||
cp -f "$WITH_DPDK_DIR/kmod/contigmem.ko" /boot/modules/
|
cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/contigmem.ko" /boot/modules/
|
||||||
cp -f "$WITH_DPDK_DIR/kmod/contigmem.ko" /boot/kernel/
|
cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/contigmem.ko" /boot/kernel/
|
||||||
cp -f "$WITH_DPDK_DIR/kmod/nic_uio.ko" /boot/modules/
|
cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/nic_uio.ko" /boot/modules/
|
||||||
cp -f "$WITH_DPDK_DIR/kmod/nic_uio.ko" /boot/kernel/
|
cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/nic_uio.ko" /boot/kernel/
|
||||||
else
|
else
|
||||||
cp -f "$rootdir/dpdk/build/kmod/contigmem.ko" /boot/modules/
|
cp -f "$rootdir/dpdk/build/kmod/contigmem.ko" /boot/modules/
|
||||||
cp -f "$rootdir/dpdk/build/kmod/contigmem.ko" /boot/kernel/
|
cp -f "$rootdir/dpdk/build/kmod/contigmem.ko" /boot/kernel/
|
||||||
|
@ -169,8 +169,6 @@ SPDK_TEST_IOAT=0
|
|||||||
# requires some extra configuration. see TEST_ENV_SETUP_README
|
# requires some extra configuration. see TEST_ENV_SETUP_README
|
||||||
SPDK_TEST_VHOST=0
|
SPDK_TEST_VHOST=0
|
||||||
SPDK_TEST_VHOST_INIT=0
|
SPDK_TEST_VHOST_INIT=0
|
||||||
# Not configured here
|
|
||||||
SPDK_RUN_INSTALLED_DPDK=0
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -16,7 +16,7 @@ make -C $SPDK_DIR -j$(nproc)
|
|||||||
|
|
||||||
export SPDK_HEADER_DIR="$SPDK_DIR/include"
|
export SPDK_HEADER_DIR="$SPDK_DIR/include"
|
||||||
export SPDK_LIB_DIR="$SPDK_DIR/build/lib"
|
export SPDK_LIB_DIR="$SPDK_DIR/build/lib"
|
||||||
export DPDK_LIB_DIR="$SPDK_DIR/dpdk/build/lib"
|
export DPDK_LIB_DIR="${SPDK_RUN_EXTERNAL_DPDK:-$SPDK_DIR/dpdk/build}/lib"
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru"
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru"
|
||||||
|
|
||||||
# The default target is to make both the app and bdev and link them against the combined SPDK shared library libspdk.so.
|
# The default target is to make both the app and bdev and link them against the combined SPDK shared library libspdk.so.
|
||||||
|
Loading…
Reference in New Issue
Block a user