Commit 5aaa207a authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

tests: Run make clean only when SPDK was configured



Otherwise the cmd fails due to the lack of config.mk. This forces
autopackage.sh, test_make.sh, etc. to be executed in the environment
where SPDK was already built which shouldn't be really a hard
requirement as they always re-build the SPDK for their own purposes.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
parent 302f3159
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,7 +24,9 @@ MAKEFLAGS=${MAKEFLAGS:--j16}
cd $rootdir

timing_enter porcelain_check
if [[ -e $rootdir/mk/config.mk ]]; then
	$MAKE clean
fi

if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
	echo make clean left the following files:
+3 −1
Original line number Diff line number Diff line
@@ -20,7 +20,9 @@ sudo HUGEMEM="$EXTERNAL_MAKE_HUGEMEM" $SPDK_DIR/scripts/setup.sh
if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then
	WITH_DPDK="--with-dpdk=$SPDK_RUN_EXTERNAL_DPDK"
fi
if [[ -e $SPDK_DIR/mk/config.mk ]]; then
	make -C $SPDK_DIR clean
fi
$SPDK_DIR/configure --with-shared --without-ocf --disable-asan $WITH_DPDK
make -C $SPDK_DIR -j$(nproc)

+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ if [ "$SPDK_TEST_OCF" -eq 1 ]; then
	config_params="$config_params --with-ocf=$rootdir/ocf.a"
fi

if [[ -f $rootdir/mk/spdk.common.mk ]]; then
if [[ -f $rootdir/mk/config.mk ]]; then
	$MAKE $MAKEFLAGS clean
fi