autotest/common: set MAKEFLAGS at the top of the file
This way all the ./configure parameters are setup in one place without any unrelated code in the middle. Change-Id: I1cd8dc05e326b9ab3e8e51c193dd422fd8b5a00b Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453873 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
24a67e29de
commit
85e70f4e21
@ -30,9 +30,21 @@ function xtrace_restore() {
|
||||
set -e
|
||||
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
MAKE=make
|
||||
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.
|
||||
export HUGEMEM=8192
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MAKE=gmake
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | egrep -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.
|
||||
export HUGEMEM=2048
|
||||
else
|
||||
@ -127,25 +139,9 @@ if [ $SPDK_RUN_ASAN -eq 1 ]; then
|
||||
config_params+=' --enable-asan'
|
||||
fi
|
||||
|
||||
case `uname` in
|
||||
FreeBSD)
|
||||
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
|
||||
MAKE=gmake
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | egrep -i 'hw.ncpu' | awk '{print $2}')}
|
||||
;;
|
||||
Linux)
|
||||
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
|
||||
MAKE=make
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
|
||||
config_params+=' --enable-coverage'
|
||||
;;
|
||||
esac
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
config_params+=' --enable-coverage'
|
||||
fi
|
||||
|
||||
# By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule.
|
||||
# If a DPDK installation is found in a well-known location though, WITH_DPDK_DIR will be
|
||||
|
Loading…
Reference in New Issue
Block a user