From 88f8a6ca22738382c488b9ae68b0748e9226546b Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 30 Nov 2022 16:51:17 +0100 Subject: [PATCH] autobuild: Move .conf check to autobuild_common Also, keep it in global scope as $spdk_conf rather than passing it as a positional argument to whatever routine that may depend on it. Signed-off-by: Michal Berger Change-Id: I68532d5848e0bd7ee8519ef3e308b24ab6a38876 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15724 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Kamil Godzwon --- autobuild.sh | 8 +------- test/common/autobuild_common.sh | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index 5b3e8fdb9..186fff215 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -6,12 +6,6 @@ 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 - rootdir=$(readlink -f $(dirname $0)) source "$1" @@ -62,7 +56,7 @@ if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then fi if [[ -n $SPDK_TEST_AUTOBUILD ]]; then - run_test "autobuild" autobuild_test_suite $1 + run_test "autobuild" autobuild_test_suite elif [[ $SPDK_TEST_UNITTEST -eq 1 ]]; then run_test "unittest_build" unittest_build elif [[ $SPDK_TEST_SCANBUILD -eq 1 ]]; then diff --git a/test/common/autobuild_common.sh b/test/common/autobuild_common.sh index d7cf10bc2..64960bf70 100755 --- a/test/common/autobuild_common.sh +++ b/test/common/autobuild_common.sh @@ -331,7 +331,7 @@ check_format() { } check_so_deps() { - run_test "autobuild_check_so_deps" "$rootdir/test/make/check_so_deps.sh" "$1" + run_test "autobuild_check_so_deps" "$rootdir/test/make/check_so_deps.sh" "$spdk_conf" } external_code() { @@ -358,7 +358,7 @@ build_doc() { autobuild_test_suite_tiny() { check_format - check_so_deps "$1" + check_so_deps dpdk_pci_api } @@ -367,7 +367,7 @@ autobuild_test_suite_ext() { } autobuild_test_suite_full() { - autobuild_test_suite_tiny "$1" + autobuild_test_suite_tiny autobuild_test_suite_ext build_files build_doc @@ -375,9 +375,9 @@ autobuild_test_suite_full() { autobuild_test_suite() { case "$SPDK_TEST_AUTOBUILD" in - tiny) autobuild_test_suite_tiny "$1" ;; + tiny) autobuild_test_suite_tiny ;; ext) autobuild_test_suite_ext ;; - full) autobuild_test_suite_full "$1" ;; + full) autobuild_test_suite_full ;; esac } @@ -404,3 +404,10 @@ 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