From b8a51a937e6498a3be3ac355377c272246903e45 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Fri, 19 Feb 2021 09:37:17 -0500 Subject: [PATCH] test/common: move all LIB paths to autotest_common.sh The common file is sourced in all test scripts, so it is ideal place to put all library paths. It will make changes to those paths simpler in next patch. Signed-off-by: Tomasz Zawadzki Change-Id: Ic37148e6be669f296e8561d6554e735132941413 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6685 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- autotest.sh | 3 --- test/common/autotest_common.sh | 5 ++++- test/external_code/test_make.sh | 5 +---- test/nvme/hw_hotplug.sh | 4 ---- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/autotest.sh b/autotest.sh index ffc5eada5..a41ebc1d2 100755 --- a/autotest.sh +++ b/autotest.sh @@ -9,9 +9,6 @@ if [[ ! -f $1 ]]; then exit 1 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. diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 110e44781..818997a99 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -156,8 +156,11 @@ export SPDK_TEST_SCHEDULER : ${SPDK_TEST_SCANBUILD:=0} export SPDK_TEST_SCANBUILD +# always test with SPDK shared objects. +export SPDK_LIB_DIR="$rootdir/build/lib" export DPDK_LIB_DIR="${SPDK_RUN_EXTERNAL_DPDK:-$rootdir/dpdk/build}/lib" -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR +export VFIO_LIB_DIR="$rootdir/libvfio-user/build/release/lib" +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:$VFIO_LIB_DIR # Tell setup.sh to wait for block devices upon each reset export PCI_BLOCK_SYNC_ON_RESET=yes diff --git a/test/external_code/test_make.sh b/test/external_code/test_make.sh index 30beb01c9..53c05f129 100755 --- a/test/external_code/test_make.sh +++ b/test/external_code/test_make.sh @@ -22,10 +22,7 @@ $SPDK_DIR/configure --with-shared --without-isal --without-ocf --disable-asan $W make -C $SPDK_DIR -j$(nproc) export SPDK_HEADER_DIR="$SPDK_DIR/include" -export SPDK_LIB_DIR="$SPDK_DIR/build/lib" -export DPDK_LIB_DIR="${SPDK_RUN_EXTERNAL_DPDK:-$SPDK_DIR/dpdk/build}/lib" -export VFIO_LIB_DIR="$SPDK_DIR/libvfio-user/build/release/lib" -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:$VFIO_LIB_DIR:"$test_root/passthru" +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$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. run_test "external_make_hello_bdev_shared_combo" make -C $test_root hello_world_bdev_shared_combo diff --git a/test/nvme/hw_hotplug.sh b/test/nvme/hw_hotplug.sh index 49c2840be..76871583d 100755 --- a/test/nvme/hw_hotplug.sh +++ b/test/nvme/hw_hotplug.sh @@ -4,10 +4,6 @@ testdir=$(readlink -f $(dirname $0)) rootdir=$(readlink -f $testdir/../..) source $rootdir/test/common/autotest_common.sh -export SPDK_LIB_DIR="$rootdir/build/lib" -export DPDK_LIB_DIR="$rootdir/dpdk/build/lib" -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR - function insert_device() { ssh root@$ip 'Beetle --SetGpio "$gpio" HIGH' waitforblk $name