numam-spdk/autopackage.sh
Jim Harris da992ebcc4 always ignore submodules with git-status
In a couple of cases, we do specify --ignore-submodules
for the actual check, but when dumping the results
to the console, we omit the --ignore-submodules.  Fix that.

Same for check_format.sh - don't consider submodules for
files changes that suggest a CHANGELOG.md update.

This is in preparation for adding isa-l as an SPDK
submodule.  isa-l doesn't use any .gitignore files, so I
want to make sure we're just ignoring anything related to
isa-l build artifacts.  We could probably remove our
local DPDK submodule patch to its .gitignore after this
patch but will leave that for another time.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id9be9ce87569004c426d02c6cd44d645f3ff859f

Reviewed-on: https://review.gerrithub.io/c/440808
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-18 17:21:02 +00:00

64 lines
1.5 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 --ignore-submodules
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
ipsec_pv=ipsec-$(date +%Y_%m_%d)
ipsec_tarball=${ipsec_pv}.tar
find . -iname "spdk-*.tar* dpdk-*.tar* ipsec-*.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
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
(
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