2015-09-21 14:48:40 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2019-05-09 13:22:41 +02:00
|
|
|
# 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"
|
|
|
|
|
2015-10-08 12:40:44 -07:00
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
2018-02-27 15:14:08 -07:00
|
|
|
source "$rootdir/test/common/autotest_common.sh"
|
2015-10-02 17:11:56 -07:00
|
|
|
|
2015-09-21 14:48:40 -07:00
|
|
|
out=$PWD
|
|
|
|
|
|
|
|
MAKEFLAGS=${MAKEFLAGS:--j16}
|
2015-10-08 12:40:44 -07:00
|
|
|
cd $rootdir
|
|
|
|
|
2019-05-01 16:56:42 -07:00
|
|
|
timing_enter porcelain_check
|
2015-10-02 17:11:56 -07:00
|
|
|
$MAKE clean
|
2015-09-21 14:48:40 -07:00
|
|
|
|
2019-07-03 17:12:39 +02:00
|
|
|
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
|
2015-09-21 14:48:40 -07:00
|
|
|
echo make clean left the following files:
|
2019-01-13 15:28:03 -07:00
|
|
|
git status --porcelain --ignore-submodules
|
2015-09-21 14:48:40 -07:00
|
|
|
exit 1
|
|
|
|
fi
|
2019-05-01 16:56:42 -07:00
|
|
|
timing_exit porcelain_check
|
|
|
|
|
2021-03-30 11:27:48 +02:00
|
|
|
if [[ $RUN_NIGHTLY -eq 0 ]]; then
|
2019-05-01 16:56:42 -07:00
|
|
|
timing_finish
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2020-04-01 03:50:01 -04:00
|
|
|
timing_enter build_release
|
2015-09-21 14:48:40 -07:00
|
|
|
|
2020-10-16 10:38:15 +02:00
|
|
|
config_params="$(get_config_params | sed 's/--enable-debug//g')"
|
2020-04-27 13:50:05 -07:00
|
|
|
if [ $(uname -s) = Linux ]; then
|
2020-10-16 10:38:15 +02:00
|
|
|
./configure $config_params --enable-lto
|
2020-04-27 13:50:05 -07:00
|
|
|
else
|
|
|
|
# LTO needs a special compiler to work on BSD.
|
2020-10-16 10:38:15 +02:00
|
|
|
./configure $config_params
|
2020-04-27 13:50:05 -07:00
|
|
|
fi
|
2020-04-01 03:50:01 -04:00
|
|
|
$MAKE ${MAKEFLAGS}
|
|
|
|
$MAKE ${MAKEFLAGS} clean
|
2015-09-21 14:48:40 -07:00
|
|
|
|
2020-04-01 03:50:01 -04:00
|
|
|
timing_exit build_release
|
2015-10-08 12:40:44 -07:00
|
|
|
|
|
|
|
timing_finish
|