Skip to content

Commit

Permalink
autobuild: Split test suite into corresponding SPDK_TEST_AUTOBUILD opts
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I2d74d1ee9b4b3d4dd83150b235eceff76fafd1ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15723
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
Reviewed-by: Tomasz Zawadzki <[email protected]>
  • Loading branch information
mikeBashStuff authored and tomzawadzki committed Feb 2, 2023
1 parent 3c5fdc0 commit 2bd4ba6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 17 deletions.
27 changes: 16 additions & 11 deletions autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
26 changes: 20 additions & 6 deletions test/common/autobuild_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2bd4ba6

Please sign in to comment.