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
|
|
|
|
|
|
|
|
if [ $RUN_NIGHTLY -eq 0 ]; then
|
|
|
|
timing_finish
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
timing_enter autopackage
|
2015-09-21 14:48:40 -07:00
|
|
|
|
2017-05-08 15:07:13 -07:00
|
|
|
spdk_pv=spdk-$(date +%Y_%m_%d)
|
|
|
|
spdk_tarball=${spdk_pv}.tar
|
|
|
|
dpdk_pv=dpdk-$(date +%Y_%m_%d)
|
|
|
|
dpdk_tarball=${dpdk_pv}.tar
|
2018-08-30 16:02:18 -07:00
|
|
|
ipsec_pv=ipsec-$(date +%Y_%m_%d)
|
|
|
|
ipsec_tarball=${ipsec_pv}.tar
|
2019-01-21 17:05:59 +08:00
|
|
|
isal_pv=isal-$(date +%Y_%m_%d)
|
|
|
|
isal_tarball=${isal_pv}.tar
|
2019-02-15 18:09:29 +00:00
|
|
|
ocf_pv=ocf-$(date +%Y_%m_%d)
|
|
|
|
ocf_tarball=${ocf_pv}.tar
|
2015-09-21 14:48:40 -07:00
|
|
|
|
2019-01-21 17:05:59 +08:00
|
|
|
find . -iname "spdk-*.tar* dpdk-*.tar* ipsec-*.tar* isal-*.tar*" -delete
|
2017-05-31 15:14:50 -07:00
|
|
|
git archive HEAD^{tree} --prefix=${spdk_pv}/ -o ${spdk_tarball}
|
2015-09-21 14:48:40 -07:00
|
|
|
|
|
|
|
# Build from packaged source
|
|
|
|
tmpdir=$(mktemp -d)
|
|
|
|
echo "tmpdir=$tmpdir"
|
2017-05-08 15:07:13 -07:00
|
|
|
tar -C "$tmpdir" -xf $spdk_tarball
|
|
|
|
|
|
|
|
if [ -z "$WITH_DPDK_DIR" ]; then
|
|
|
|
cd dpdk
|
2017-05-31 15:14:50 -07:00
|
|
|
git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball}
|
2017-05-08 15:07:13 -07:00
|
|
|
cd ..
|
|
|
|
tar -C "$tmpdir/${spdk_pv}" -xf $dpdk_tarball
|
|
|
|
fi
|
|
|
|
|
2018-08-30 16:02:18 -07:00
|
|
|
if [ -d "intel-ipsec-mb" ]; then
|
|
|
|
cd intel-ipsec-mb
|
|
|
|
git archive HEAD^{tree} --prefix=intel-ipsec-mb/ -o ../${ipsec_tarball}
|
|
|
|
cd ..
|
|
|
|
tar -C "$tmpdir/${spdk_pv}" -xf $ipsec_tarball
|
|
|
|
fi
|
|
|
|
|
2019-01-21 17:05:59 +08:00
|
|
|
if [ -d "isa-l" ]; then
|
|
|
|
cd isa-l
|
|
|
|
git archive HEAD^{tree} --prefix=isa-l/ -o ../${isal_tarball}
|
|
|
|
cd ..
|
|
|
|
tar -C "$tmpdir/${spdk_pv}" -xf $isal_tarball
|
|
|
|
fi
|
|
|
|
|
2019-02-15 18:09:29 +00:00
|
|
|
if [ -d "ocf" ]; then
|
|
|
|
cd ocf
|
|
|
|
git archive HEAD^{tree} --prefix=ocf/ -o ../${ocf_tarball}
|
|
|
|
cd ..
|
|
|
|
tar -C "$tmpdir/${spdk_pv}" -xf $ocf_tarball
|
|
|
|
fi
|
|
|
|
|
2015-09-24 13:56:01 -07:00
|
|
|
(
|
|
|
|
cd "$tmpdir"/spdk-*
|
2017-05-08 15:07:13 -07:00
|
|
|
# use $config_params to get the right dependency options, but disable coverage and ubsan
|
|
|
|
# explicitly since they are not needed for this build
|
|
|
|
./configure $config_params --disable-debug --enable-werror --disable-coverage --disable-ubsan
|
2017-03-30 12:06:49 -07:00
|
|
|
time $MAKE ${MAKEFLAGS}
|
2015-09-24 13:56:01 -07:00
|
|
|
)
|
2015-09-21 14:48:40 -07:00
|
|
|
rm -rf "$tmpdir"
|
2015-10-08 12:40:44 -07:00
|
|
|
|
|
|
|
timing_exit autopackage
|
|
|
|
|
|
|
|
timing_finish
|