2015-09-21 21:48:40 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2019-05-09 11:22:41 +00: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 19:40:44 +00:00
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
2018-02-27 22:14:08 +00:00
|
|
|
source "$rootdir/test/common/autotest_common.sh"
|
2015-10-03 00:11:56 +00:00
|
|
|
|
2015-09-21 21:48:40 +00:00
|
|
|
out=$PWD
|
|
|
|
|
|
|
|
MAKEFLAGS=${MAKEFLAGS:--j16}
|
2015-10-08 19:40:44 +00:00
|
|
|
cd $rootdir
|
|
|
|
|
2019-05-01 23:56:42 +00:00
|
|
|
timing_enter porcelain_check
|
2015-10-03 00:11:56 +00:00
|
|
|
$MAKE clean
|
2015-09-21 21:48:40 +00:00
|
|
|
|
2019-07-03 15:12:39 +00:00
|
|
|
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
|
2015-09-21 21:48:40 +00:00
|
|
|
echo make clean left the following files:
|
2019-01-13 22:28:03 +00:00
|
|
|
git status --porcelain --ignore-submodules
|
2015-09-21 21:48:40 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2019-05-01 23:56:42 +00:00
|
|
|
timing_exit porcelain_check
|
|
|
|
|
|
|
|
if [ $RUN_NIGHTLY -eq 0 ]; then
|
|
|
|
timing_finish
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
timing_enter autopackage
|
2015-09-21 21:48:40 +00:00
|
|
|
|
2017-05-08 22:07:13 +00: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 23:02:18 +00:00
|
|
|
ipsec_pv=ipsec-$(date +%Y_%m_%d)
|
|
|
|
ipsec_tarball=${ipsec_pv}.tar
|
2019-01-21 09:05:59 +00: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 21:48:40 +00:00
|
|
|
|
2019-01-21 09:05:59 +00:00
|
|
|
find . -iname "spdk-*.tar* dpdk-*.tar* ipsec-*.tar* isal-*.tar*" -delete
|
2017-05-31 22:14:50 +00:00
|
|
|
git archive HEAD^{tree} --prefix=${spdk_pv}/ -o ${spdk_tarball}
|
2015-09-21 21:48:40 +00:00
|
|
|
|
|
|
|
# Build from packaged source
|
|
|
|
tmpdir=$(mktemp -d)
|
|
|
|
echo "tmpdir=$tmpdir"
|
2017-05-08 22:07:13 +00:00
|
|
|
tar -C "$tmpdir" -xf $spdk_tarball
|
|
|
|
|
|
|
|
if [ -z "$WITH_DPDK_DIR" ]; then
|
|
|
|
cd dpdk
|
2017-05-31 22:14:50 +00:00
|
|
|
git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball}
|
2017-05-08 22:07:13 +00:00
|
|
|
cd ..
|
|
|
|
tar -C "$tmpdir/${spdk_pv}" -xf $dpdk_tarball
|
|
|
|
fi
|
|
|
|
|
2018-08-30 23:02:18 +00: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 09:05:59 +00: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 20:56:01 +00:00
|
|
|
(
|
|
|
|
cd "$tmpdir"/spdk-*
|
2017-05-08 22:07:13 +00: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 19:06:49 +00:00
|
|
|
time $MAKE ${MAKEFLAGS}
|
2015-09-24 20:56:01 +00:00
|
|
|
)
|
2015-09-21 21:48:40 +00:00
|
|
|
rm -rf "$tmpdir"
|
2015-10-08 19:40:44 +00:00
|
|
|
|
|
|
|
timing_exit autopackage
|
|
|
|
|
|
|
|
timing_finish
|