autobuild: Split test suite into corresponding SPDK_TEST_AUTOBUILD opts

New option is introduced as well, 'ext', which tells autobuild to
run only external code tests - these deserve to have their own option
as they require proper env to be in place (access to hw, hugepages,
etc.)

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I2d74d1ee9b4b3d4dd83150b235eceff76fafd1ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15723
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2022-11-30 16:46:47 +01:00 committed by Tomasz Zawadzki
parent 3c5fdc0610
commit 2bd4ba6e70
2 changed files with 36 additions and 17 deletions

View File

@ -17,6 +17,7 @@ rootdir=$(readlink -f $(dirname $0))
source "$1"
source "$rootdir/test/common/autobuild_common.sh"
SPDK_TEST_AUTOBUILD=${SPDK_TEST_AUTOBUILD:-}
umask 022
cd $rootdir
@ -36,17 +37,21 @@ if [ -n "$SPDK_TEST_NATIVE_DPDK" ]; then
run_test "build_native_dpdk" build_native_dpdk
fi
if [[ -z $SPDK_TEST_AUTOBUILD ]] || [[ $SPDK_TEST_AUTOBUILD == 'full' ]]; then
./configure $config_params
echo "** START ** Info for Hostname: $HOSTNAME"
uname -a
$MAKE cc_version
$MAKE cxx_version
echo "** END ** Info for Hostname: $HOSTNAME"
elif [[ $SPDK_TEST_AUTOBUILD != 'tiny' ]]; then
echo "ERROR: supported values for SPDK_TEST_AUTOBUILD are 'full' and 'tiny'"
exit 1
fi
case "$SPDK_TEST_AUTOBUILD" in
full)
./configure $config_params
echo "** START ** Info for Hostname: $HOSTNAME"
uname -a
$MAKE cc_version
$MAKE cxx_version
echo "** END ** Info for Hostname: $HOSTNAME"
;;
ext | tiny | "") ;;
*)
echo "ERROR: supported values for SPDK_TEST_AUTOBUILD are 'full', 'tiny' and 'ext'"
exit 1
;;
esac
if [[ $SPDK_TEST_OCF -eq 1 ]]; then
run_test "autobuild_ocf_precompile" ocf_precompile

View File

@ -356,15 +356,29 @@ build_doc() {
run_test "autobuild_build_doc" _build_doc
}
autobuild_test_suite() {
autobuild_test_suite_tiny() {
check_format
check_so_deps "$1"
dpdk_pci_api
if [[ $SPDK_TEST_AUTOBUILD == 'full' ]]; then
external_code
build_files
build_doc
fi
}
autobuild_test_suite_ext() {
external_code
}
autobuild_test_suite_full() {
autobuild_test_suite_tiny "$1"
autobuild_test_suite_ext
build_files
build_doc
}
autobuild_test_suite() {
case "$SPDK_TEST_AUTOBUILD" in
tiny) autobuild_test_suite_tiny "$1" ;;
ext) autobuild_test_suite_ext ;;
full) autobuild_test_suite_full "$1" ;;
esac
}
unittest_build() {