numam-spdk/autopackage.sh
Daniel Verkamp 93dfce27d6 autopackage: enable -Werror in release build
Change-Id: I9ac685cafa7b60831684cabd5396aef45944c774
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-17 10:29:11 -07:00

46 lines
796 B
Bash
Executable File

#!/usr/bin/env bash
set -xe
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/scripts/autotest_common.sh"
out=$PWD
MAKEFLAGS=${MAKEFLAGS:--j16}
cd $rootdir
timing_enter autopackage
$MAKE clean
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
(
cd "$tmpdir"/spdk-*
time $MAKE ${MAKEFLAGS} DPDK_DIR=$DPDK_DIR CONFIG_DEBUG=n CONFIG_WERROR=y
)
rm -rf "$tmpdir"
timing_exit autopackage
timing_finish