diff --git a/autobuild.sh b/autobuild.sh index becb9c972..ba9c10895 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -2,6 +2,14 @@ set -e +# If the configuration of tests is not provided, no tests will be carried out. +if [[ ! -f $1 ]]; then + echo "ERROR: SPDK test configuration not specified" + exit 1 +fi + +source "$1" + rootdir=$(readlink -f $(dirname $0)) source "$rootdir/test/common/autotest_common.sh" diff --git a/autopackage.sh b/autopackage.sh index 7851fb852..ce114af4b 100755 --- a/autopackage.sh +++ b/autopackage.sh @@ -2,6 +2,14 @@ set -xe +# If the configuration of tests is not provided, no tests will be carried out. +if [[ ! -f $1 ]]; then + echo "ERROR: SPDK test configuration not specified" + exit 1 +fi + +source "$1" + rootdir=$(readlink -f $(dirname $0)) source "$rootdir/test/common/autotest_common.sh" diff --git a/autotest.sh b/autotest.sh index 949639c52..9309e9a33 100755 --- a/autotest.sh +++ b/autotest.sh @@ -4,11 +4,12 @@ rootdir=$(readlink -f $(dirname $0)) # In autotest_common.sh all tests are disabled by default. # If the configuration of tests is not provided, no tests will be carried out. -if [[ -z $1 ]]; then - echo "SPDK test configuration not specified" +if [[ ! -f $1 ]]; then + echo "ERROR: SPDK test configuration not specified" exit 1 fi +source "$1" source "$rootdir/test/common/autotest_common.sh" source "$rootdir/test/nvmf/common.sh" diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 7ab8cb7ff..d860669e8 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -59,12 +59,6 @@ export RUN_NIGHTLY : ${RUN_NIGHTLY_FAILING:=0} export RUN_NIGHTLY_FAILING -if [[ ! -z $1 ]]; then - if [ -f $1 ]; then - source $1 - fi -fi - # Set defaults for missing test config options : ${SPDK_BUILD_DOC=0}; export SPDK_BUILD_DOC : ${SPDK_BUILD_SHARED_OBJECT=0}; export SPDK_BUILD_SHARED_OBJECT