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: Michal Berger <michal.berger@intel.com>
Change-Id: Ie3971acbf354734ed9c5c72d49bb93fc2ccc45f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15743
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
This commit is contained in:
Michal Berger 2022-12-01 14:49:50 +01:00 committed by Tomasz Zawadzki
parent 302f315939
commit 5aaa207a05
3 changed files with 7 additions and 3 deletions

View File

@ -24,7 +24,9 @@ MAKEFLAGS=${MAKEFLAGS:--j16}
cd $rootdir
timing_enter porcelain_check
$MAKE clean
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:

View File

@ -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
make -C $SPDK_DIR clean
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)

View File

@ -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