2015-09-21 21:48:40 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-11-02 15:49:40 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright (C) 2015 Intel Corporation
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
2015-09-21 21:48:40 +00:00
|
|
|
|
2019-12-20 00:54:15 +00:00
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
2015-09-21 21:48:40 +00:00
|
|
|
|
2019-12-20 00:54:15 +00:00
|
|
|
source "$1"
|
2022-11-18 09:27:14 +00:00
|
|
|
source "$rootdir/test/common/autobuild_common.sh"
|
2020-04-15 09:44:07 +00:00
|
|
|
|
2022-11-30 15:46:47 +00:00
|
|
|
SPDK_TEST_AUTOBUILD=${SPDK_TEST_AUTOBUILD:-}
|
2019-12-20 00:54:15 +00:00
|
|
|
umask 022
|
2015-10-08 19:40:44 +00:00
|
|
|
cd $rootdir
|
2015-09-21 21:48:40 +00:00
|
|
|
|
2019-12-20 00:54:15 +00:00
|
|
|
# Print some test system info out for the log
|
2016-12-16 17:14:48 +00:00
|
|
|
date -u
|
|
|
|
git describe --tags
|
2019-12-20 00:29:52 +00:00
|
|
|
|
2019-12-20 00:27:04 +00:00
|
|
|
if [ $SPDK_RUN_ASAN -eq 1 ]; then
|
|
|
|
run_test "asan" echo "using asan"
|
|
|
|
fi
|
2015-10-08 19:40:44 +00:00
|
|
|
|
2019-12-20 00:27:04 +00:00
|
|
|
if [ $SPDK_RUN_UBSAN -eq 1 ]; then
|
|
|
|
run_test "ubsan" echo "using ubsan"
|
|
|
|
fi
|
|
|
|
|
2020-02-13 08:30:50 +00:00
|
|
|
if [ -n "$SPDK_TEST_NATIVE_DPDK" ]; then
|
2022-11-30 16:22:13 +00:00
|
|
|
build_native_dpdk
|
2020-02-13 08:30:50 +00:00
|
|
|
fi
|
|
|
|
|
2022-11-30 15:46:47 +00:00
|
|
|
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
|
2020-02-13 08:30:50 +00:00
|
|
|
|
2021-03-10 16:34:06 +00:00
|
|
|
if [[ $SPDK_TEST_OCF -eq 1 ]]; then
|
2022-11-30 16:22:13 +00:00
|
|
|
ocf_precompile
|
2021-03-10 16:34:06 +00:00
|
|
|
fi
|
|
|
|
|
2022-01-19 13:35:39 +00:00
|
|
|
if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then
|
2022-11-30 16:22:13 +00:00
|
|
|
llvm_precompile
|
2022-01-19 13:35:39 +00:00
|
|
|
fi
|
|
|
|
|
2022-09-12 21:48:08 +00:00
|
|
|
if [[ -n $SPDK_TEST_AUTOBUILD ]]; then
|
2022-11-30 16:22:13 +00:00
|
|
|
autobuild_test_suite
|
2021-03-10 09:06:40 +00:00
|
|
|
elif [[ $SPDK_TEST_UNITTEST -eq 1 ]]; then
|
2022-11-30 16:22:13 +00:00
|
|
|
unittest_build
|
2021-03-10 16:34:06 +00:00
|
|
|
elif [[ $SPDK_TEST_SCANBUILD -eq 1 ]]; then
|
2022-11-30 16:22:13 +00:00
|
|
|
scanbuild_make
|
2017-02-15 20:16:48 +00:00
|
|
|
else
|
2022-01-19 13:35:39 +00:00
|
|
|
if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then
|
|
|
|
# if we are testing nvmf fuzz with llvm lib, --with-shared will cause lib link fail
|
|
|
|
./configure $config_params
|
|
|
|
else
|
|
|
|
# if we aren't testing the unittests, build with shared objects.
|
|
|
|
./configure $config_params --with-shared
|
|
|
|
fi
|
2019-12-20 00:38:20 +00:00
|
|
|
run_test "make" $MAKE $MAKEFLAGS
|
2017-02-15 20:16:48 +00:00
|
|
|
fi
|