test/make: add ignored libs to check_so_deps.sh

There is at least one example of an SPDK shared library dependency that
is only linked against on certain conditions, so add a framework for
dealing with those conditions now.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467699 (master)

(cherry picked from commit 18c5ce83b9)
Change-Id: I63ad767994c5f56f2908f70016e700f5bb74a5f4
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467975
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2019-09-06 09:36:26 -07:00 committed by Jim Harris
parent 79aba95edb
commit a2f6965f29

View File

@ -45,10 +45,12 @@ function confirm_deps() {
lib_make_deps=($(cat $libdeps_file | grep "DEPDIRS-${lib_shortname}" | cut -d "=" -f 2 | xargs))
lib_make_deps=($(replace_defined_variables "${lib_make_deps[@]}"))
for dep in ${lib_make_deps[@]}; do
if [[ $dep == *'$'* ]]; then
dep_no_dollar=$(echo $dep | sed 's,$(,,g' | sed 's,),,g')
fi
for ign_dep in "${IGNORED_LIBS[@]}"; do
for i in "${!lib_make_deps[@]}"; do
if [[ ${lib_make_deps[i]} == "$ign_dep" ]]; then
unset 'lib_make_deps[i]'
fi
done
done
symbols=$(readelf -s $lib | grep -E "NOTYPE.*GLOBAL.*UND" | awk '{print $8}' | sort | uniq)
@ -111,6 +113,11 @@ echo "---------------------------------------------------------------------"
SPDK_LIBS=$(ls -1 $libdir/libspdk_*.so | grep -v libspdk_env_dpdk.so)
DEP_LIBS=$(ls -1 $libdir/libspdk_*.so)
IGNORED_LIBS=()
if grep -q 'CONFIG_VHOST_INTERNAL_LIB?=n' $rootdir/mk/config.mk; then
IGNORED_LIBS+=("rte_vhost")
fi
fail_file=$output_dir/check_so_deps_fail
rm -f $fail_file