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: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4730 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Michal Berger <michalx.berger@intel.com>
This commit is contained in:
parent
b7b4348233
commit
7ba6712604
@ -68,7 +68,7 @@ function build_native_dpdk() {
|
|||||||
if [[ "$SPDK_TEST_CRYPTO" -eq 1 ]]; then
|
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"
|
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"
|
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")
|
||||||
DPDK_DRIVERS+=("crypto/aesni_mb")
|
DPDK_DRIVERS+=("crypto/aesni_mb")
|
||||||
DPDK_DRIVERS+=("crypto/qat")
|
DPDK_DRIVERS+=("crypto/qat")
|
||||||
@ -76,6 +76,7 @@ function build_native_dpdk() {
|
|||||||
DPDK_DRIVERS+=("common/qat")
|
DPDK_DRIVERS+=("common/qat")
|
||||||
dpdk_cflags+=" -I$external_dpdk_base_dir/intel-ipsec-mb"
|
dpdk_cflags+=" -I$external_dpdk_base_dir/intel-ipsec-mb"
|
||||||
dpdk_ldflags+=" -L$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
|
fi
|
||||||
|
|
||||||
if [[ "$SPDK_TEST_REDUCE" -eq 1 ]]; then
|
if [[ "$SPDK_TEST_REDUCE" -eq 1 ]]; then
|
||||||
@ -107,11 +108,15 @@ function build_native_dpdk() {
|
|||||||
|
|
||||||
meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \
|
meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \
|
||||||
-Denable_docs=false -Denable_kmods=false -Dtests=false \
|
-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[@]}")
|
-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
|
||||||
ninja -C "$external_dpdk_base_dir/build-tmp" $MAKEFLAGS install
|
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"
|
cd "$orgdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,13 @@ fi
|
|||||||
# always test with SPDK shared objects.
|
# always test with SPDK shared objects.
|
||||||
export SPDK_LIB_DIR="$rootdir/build/lib"
|
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 "$1"
|
||||||
source "$rootdir/test/common/autotest_common.sh"
|
source "$rootdir/test/common/autotest_common.sh"
|
||||||
source "$rootdir/test/nvmf/common.sh"
|
source "$rootdir/test/nvmf/common.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user