Commit 7ba67126 authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

autobuild.sh: fix ipsec installation for custom dpdk



- Enable shared objects
- Lininkg to libs for meson done with -Dc_link_args
- append lib path to LD_LIBRARY_PATH in case ipsec
  is needed in later build or test steps
- Save LD_LIBRARY_PATH from autobuild.sh and pass it
  to autotest.sh. This is needed for crypto tests
  using ipsec-intel-mb library.

Change-Id: I047c6d3187ea42de8790181428d18596b195ff2e
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4730


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarMichal Berger <michalx.berger@intel.com>
parent b7b43482
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ function build_native_dpdk() {
	if [[ "$SPDK_TEST_CRYPTO" -eq 1 ]]; then
		git clone --branch v0.54 --depth 1 https://github.com/intel/intel-ipsec-mb.git "$external_dpdk_base_dir/intel-ipsec-mb"
		cd "$external_dpdk_base_dir/intel-ipsec-mb"
		$MAKE $MAKEFLAGS all SHARED=n EXTRA_CFLAGS=-fPIC
		$MAKE $MAKEFLAGS all SHARED=y EXTRA_CFLAGS=-fPIC
		DPDK_DRIVERS+=("crypto")
		DPDK_DRIVERS+=("crypto/aesni_mb")
		DPDK_DRIVERS+=("crypto/qat")
@@ -76,6 +76,7 @@ function build_native_dpdk() {
		DPDK_DRIVERS+=("common/qat")
		dpdk_cflags+=" -I$external_dpdk_base_dir/intel-ipsec-mb"
		dpdk_ldflags+=" -L$external_dpdk_base_dir/intel-ipsec-mb"
		export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$external_dpdk_base_dir/intel-ipsec-mb
	fi

	if [[ "$SPDK_TEST_REDUCE" -eq 1 ]]; then
@@ -107,11 +108,15 @@ function build_native_dpdk() {

	meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \
		-Denable_docs=false -Denable_kmods=false -Dtests=false \
		-Dc_args="$dpdk_cflags $dpdk_ldflags" \
		-Dc_link_args="$dpdk_ldflags" -Dc_args="$dpdk_cflags" \
		-Dmachine=native -Ddisable_drivers=$(printf "%s," "${DPDK_DISABLED_DRIVERS[@]}")
	ninja -C "$external_dpdk_base_dir/build-tmp" $MAKEFLAGS
	ninja -C "$external_dpdk_base_dir/build-tmp" $MAKEFLAGS install

	# Save this path. In tests are run using autorun.sh then autotest.sh
	# script will be unaware of LD_LIBRARY_PATH and will fail tests.
	echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > /tmp/spdk-ld-path

	cd "$orgdir"
}

+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,13 @@ fi
# always test with SPDK shared objects.
export SPDK_LIB_DIR="$rootdir/build/lib"

# Autotest.sh, as part of autorun.sh, runs in a different
# shell process than autobuild.sh. Use helper file to pass
# over env variable containing libraries paths.
if [[ -e /tmp/spdk-ld-path ]]; then
	source /tmp/spdk-ld-path
fi

source "$1"
source "$rootdir/test/common/autotest_common.sh"
source "$rootdir/test/nvmf/common.sh"