Commit dbd140b2 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

test/common: Check NASM version from within get_config_params()



This is done to avoid conflicting parameters being passed to
./configure via get_config_params(). Originally, if all previous
conditions were met, get_config_params() would return "--with-reduce"
in the string. ./configure would lookup the NASM version on its own
and disable the --with-reduce and --with-isal parameters. However,
--with-reduce would be set again by ./configure while looking up
the cmdline. This would end up with --with-reduce and --without-isal
being set together, failing the configuration.

Change-Id: I81fa1dfd4bc5b41b82525e911b1c75fc7e15fd14
Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5003


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 86eadb4d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ set -e
shopt -s expand_aliases

source "$rootdir/test/common/applications.sh"
source "$rootdir/scripts/common.sh"
if [[ -e $rootdir/test/common/build_config.sh ]]; then
	source "$rootdir/test/common/build_config.sh"
elif [[ -e $rootdir/mk/config.mk ]]; then
@@ -375,7 +376,7 @@ function get_config_params() {
	fi

	if [ -f /usr/include/libpmem.h ] && [ $SPDK_TEST_REDUCE -eq 1 ]; then
		if [ $SPDK_TEST_ISAL -eq 1 ]; then
		if ge "$(nasm --version | awk '{print $3}')" 2.14 && [[ $SPDK_TEST_ISAL -eq 1 ]]; then
			config_params+=' --with-reduce'
		fi
	fi