numam-spdk/autopackage.sh
Jim Harris 8d88177a4c autobuild.sh: don't check for untracked files in submodules
This is a somewhat temporary workaround for avoiding git status
errors related to symlinked files in the DPDK submodule.  The
build pools will be fixed to not change symlinks to regular
files when copying repositories between systems, but until
then apply this fix so we can move forward with switching
to DPDK 18.05 (which now has symlinked files in its
repository).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8a6df76fb77a6f3ee3817bd975d198ae4cc3014a
Reviewed-on: https://review.gerrithub.io/420444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-07-26 04:52:41 +00:00

55 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -xe
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/test/common/autotest_common.sh"
out=$PWD
MAKEFLAGS=${MAKEFLAGS:--j16}
cd $rootdir
timing_enter autopackage
$MAKE clean
if [ `git status --porcelain --ignore-submodules | wc -l` -ne 0 ]; then
echo make clean left the following files:
git status --porcelain
exit 1
fi
spdk_pv=spdk-$(date +%Y_%m_%d)
spdk_tarball=${spdk_pv}.tar
dpdk_pv=dpdk-$(date +%Y_%m_%d)
dpdk_tarball=${dpdk_pv}.tar
find . -iname "spdk-*.tar* dpdk-*.tar*" -delete
git archive HEAD^{tree} --prefix=${spdk_pv}/ -o ${spdk_tarball}
# Build from packaged source
tmpdir=$(mktemp -d)
echo "tmpdir=$tmpdir"
tar -C "$tmpdir" -xf $spdk_tarball
if [ -z "$WITH_DPDK_DIR" ]; then
cd dpdk
git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball}
cd ..
tar -C "$tmpdir/${spdk_pv}" -xf $dpdk_tarball
fi
(
cd "$tmpdir"/spdk-*
# 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
time $MAKE ${MAKEFLAGS}
)
rm -rf "$tmpdir"
timing_exit autopackage
timing_finish