From 2099abc819ed6ab928f2d55f8e8b623af73c9917 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 16 Mar 2023 09:37:27 +0100 Subject: [PATCH] test/autobuild: Source $spdk_conf before autotest_common.sh This is to make sure we export all SPDK_* with proper values. Signed-off-by: Michal Berger Change-Id: I2f01af1a051edcec6a75f99b25b765080abf2a5d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17212 Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris Reviewed-by: Pawel Piatek Tested-by: SPDK CI Jenkins --- autobuild.sh | 1 - test/common/autobuild_common.sh | 15 ++++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index 8b975c02f..8fc7b9775 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -6,7 +6,6 @@ rootdir=$(readlink -f $(dirname $0)) -source "$1" source "$rootdir/test/common/autobuild_common.sh" SPDK_TEST_AUTOBUILD=${SPDK_TEST_AUTOBUILD:-} diff --git a/test/common/autobuild_common.sh b/test/common/autobuild_common.sh index 9733a5dc6..45f95d768 100755 --- a/test/common/autobuild_common.sh +++ b/test/common/autobuild_common.sh @@ -3,6 +3,14 @@ # Copyright (C) 2022 Intel Corporation. # All rights reserved. +spdk_conf=${spdk_conf:-"$1"} + +if [[ ! -f $spdk_conf ]]; then + echo "ERROR: SPDK test configuration not specified" + return 1 +fi + +source "$spdk_conf" source "$rootdir/test/common/autotest_common.sh" source "$rootdir/scripts/common.sh" @@ -446,10 +454,3 @@ scanbuild_exclude+=" --exclude $rootdir/xnvme --exclude /tmp" scanbuild="scan-build -o $output_dir/scan-build-tmp $scanbuild_exclude --status-bugs" config_params=$(get_config_params) - -spdk_conf=${spdk_conf:-"$1"} - -if [[ ! -f $spdk_conf ]]; then - echo "ERROR: SPDK test configuration not specified" - return 1 -fi