Commit 3f483d61 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/check_so_deps: only rebuild SPDK if config file is used



Prior to this patch SPDK was always rebuilt and it
was not possible to run the test script without config file.

Now the check_so_deps.sh can be re-run multiple times by
the developer. SPDK has to either be built manually,
or once using a config file.

Change-Id: I8a556d0cb5d99be43300e151bc00176ada1784c4
Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19280


Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent dac8b27b
Loading
Loading
Loading
Loading
+21 −18
Original line number Diff line number Diff line
@@ -13,14 +13,13 @@ fi
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)

if [[ ! -f $1 ]]; then
	echo "ERROR: SPDK test configuration not specified"
	exit 1
fi

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

config_file=$1
if [[ -e $config_file ]]; then
	source "$config_file"
fi

if [[ -d $2 ]]; then
	user_abi_dir="$2"
fi
@@ -304,8 +303,9 @@ function confirm_makefile_deps() {
	fi
}

if [[ -e $config_file ]]; then
	config_params=$(get_config_params)
if [ "$SPDK_TEST_OCF" -eq 1 ]; then
	if [[ "$SPDK_TEST_OCF" -eq 1 ]]; then
		config_params="$config_params --with-ocf=$rootdir/ocf.a"
	fi

@@ -317,6 +317,7 @@ $rootdir/configure $config_params --with-shared
	# By setting SPDK_NO_LIB_DEPS=1, we ensure that we won't create any link dependencies.
	# Then we can be sure we get a valid accounting of the symbol dependencies we have.
	SPDK_NO_LIB_DEPS=1 $MAKE $MAKEFLAGS
fi

xtrace_disable

@@ -324,6 +325,8 @@ run_test "check_header_filenames" check_header_filenames
run_test "confirm_abi_deps" confirm_abi_deps
run_test "confirm_makefile_deps" confirm_makefile_deps

if [[ -e $config_file ]]; then
	$MAKE $MAKEFLAGS clean
fi

xtrace_restore