test/external_code: set LD_LIBRARY_PATH once.

Just set it once instead of doing it over and over.
This cleans up the code a lot.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I91c6ea8c02d964693909b9c53795b0f1ee09c90f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2979
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Seth Howell 2020-06-19 15:30:10 -07:00 committed by Tomasz Zawadzki
parent c75dfb4201
commit 150b9f6219

View File

@ -17,32 +17,29 @@ 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_DIR/dpdk/build/lib"
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.
run_test "external_make_tc1" make -C $test_root hello_world_bdev_shared_combo run_test "external_make_tc1" make -C $test_root hello_world_bdev_shared_combo
run_test "external_run_tc1" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT
LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru" run_test "external_run_tc1" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT
make -C $test_root clean make -C $test_root clean
# Make just the application linked against the combined SPDK shared library libspdk.so. # Make just the application linked against the combined SPDK shared library libspdk.so.
run_test "external_make_tc2" make -C $test_root hello_world_no_bdev_shared_combo run_test "external_make_tc2" make -C $test_root hello_world_no_bdev_shared_combo
run_test "external_run_tc2" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0
LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR run_test "external_run_tc2" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0
make -C $test_root clean make -C $test_root clean
# Make both the application and bdev against individual SPDK shared libraries. # Make both the application and bdev against individual SPDK shared libraries.
run_test "external_make_tc3" make -C $test_root hello_world_bdev_shared_iso run_test "external_make_tc3" make -C $test_root hello_world_bdev_shared_iso
run_test "external_run_tc3" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT
LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru" run_test "external_run_tc3" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT
make -C $test_root clean make -C $test_root clean
# Make just the application linked against individual SPDK shared libraries. # Make just the application linked against individual SPDK shared libraries.
run_test "external_make_tc4" make -C $test_root hello_world_no_bdev_shared_iso run_test "external_make_tc4" make -C $test_root hello_world_no_bdev_shared_iso
run_test "external_run_tc4" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0
LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR run_test "external_run_tc4" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0
make -C $test_root clean make -C $test_root clean
@ -52,15 +49,13 @@ make -C $SPDK_DIR -j$(nproc)
# Make both the application and bdev against individual SPDK archives. # Make both the application and bdev against individual SPDK archives.
run_test "external_make_tc5" make -C $test_root hello_world_bdev_static run_test "external_make_tc5" make -C $test_root hello_world_bdev_static
run_test "external_run_tc5" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT
LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru" run_test "external_run_tc5" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT
make -C $test_root clean make -C $test_root clean
# Make just the application linked against individual SPDK archives. # Make just the application linked against individual SPDK archives.
run_test "external_make_tc6" make -C $test_root hello_world_no_bdev_static run_test "external_make_tc6" make -C $test_root hello_world_no_bdev_static
run_test "external_run_tc6" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0
LD_LIBRARY_PATH=$SPDK_LIB_DIR:$DPDK_LIB_DIR run_test "external_run_tc6" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0
make -C $test_root clean make -C $test_root clean
make -C $SPDK_DIR -j$(nproc) clean make -C $SPDK_DIR -j$(nproc) clean