- echo 'Building using "make build-root/vagrant/build.sh"'
- # TODO: Do we want to support "${DRYRUN}" == "True"?
- make UNATTENDED=yes install-dep || die "Make install-dep failed."
- # The per_patch script calls this function twice, first for the new commit,
- # then for its parent commit. On Jenkins, no dpdk is installed at first,
- # locally it might have been installed. New dpdk is installed second call.
- # If make detects installed vpp-dpdk-dev with matching version,
- # it skips building vpp-dpdk-dkms entirely, but we need that file.
- # On the other hand, if parent uses different dpdk version,
- # The new vpp-dpdk-dkms is built, but the old one is not removed
- # from the build directory if present. (Further functions move both,
- # and during test dpkg decides on its own which version gets installed.)
- # As per_patch is too dumb (yet) to detect any of that,
- # the only safe solution is to clean build directory and force rebuild.
- # TODO: Make this function smarter and skip DPDK rebuilds if possible.
- cmd=("dpkg-query" "--showformat='$${Version}'" "--show" "vpp-dpdk-dev")
- installed_deb_ver="$(sudo "${cmd[@]}" || true)"
- if [[ -n "${installed_deb_ver}" ]]; then
- sudo dpkg --purge "vpp-dpdk-dev" || {
- die "Dpdk package uninstalation failed."
- }
+ if [ -n "${MAKE_PARALLEL_FLAGS-}" ]; then
+ echo "Building VPP. Number of cores for build set with" \
+ "MAKE_PARALLEL_FLAGS='${MAKE_PARALLEL_FLAGS}'."
+ elif [ -n "${MAKE_PARALLEL_JOBS-}" ]; then
+ echo "Building VPP. Number of cores for build set with" \
+ "MAKE_PARALLEL_JOBS='${MAKE_PARALLEL_JOBS}'."
+ else
+ echo "Building VPP. Number of cores not set, " \
+ "using build default ($(grep -c ^processor /proc/cpuinfo))."