2015-09-21 21:48:40 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2015-10-08 19:40:44 +00:00
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
|
|
|
source "$rootdir/scripts/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
|
|
|
|
|
|
|
|
timing_enter autopackage
|
2015-09-21 21:48:40 +00:00
|
|
|
|
2015-10-03 00:11:56 +00:00
|
|
|
$MAKE clean
|
2015-09-21 21:48:40 +00:00
|
|
|
|
|
|
|
if [ `git status --porcelain | wc -l` -ne 0 ]; then
|
|
|
|
echo make clean left the following files:
|
|
|
|
git status --porcelain
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
pv=spdk-$(date +%Y_%m_%d)
|
|
|
|
|
|
|
|
find . -iname "spdk-*.tar.gz" -delete
|
|
|
|
git archive HEAD -9 --prefix=${pv}/ -o ${pv}.tar.gz
|
|
|
|
|
|
|
|
tarball=$(ls -1 spdk-*.tar.gz)
|
|
|
|
if [ $PWD != $out ]; then
|
|
|
|
mv $tarball $out/
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Build from packaged source
|
|
|
|
tmpdir=$(mktemp -d)
|
|
|
|
echo "tmpdir=$tmpdir"
|
|
|
|
tar -C "$tmpdir" -xf $out/$tarball
|
2015-09-24 20:56:01 +00:00
|
|
|
(
|
|
|
|
cd "$tmpdir"/spdk-*
|
2015-10-22 19:18:38 +00:00
|
|
|
time $MAKE ${MAKEFLAGS} DPDK_DIR=$DPDK_DIR CONFIG_DEBUG=n
|
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
|