From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 2C10D2BCE for ; Thu, 10 Mar 2016 11:54:04 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 9C5116DDDB; Thu, 10 Mar 2016 10:54:03 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org.com (vpn1-4-209.ams2.redhat.com [10.36.4.209]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2AAs2vx000307; Thu, 10 Mar 2016 05:54:02 -0500 From: Panu Matilainen To: dev@dpdk.org Date: Thu, 10 Mar 2016 12:53:35 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Subject: [dpdk-dev] [PATCH 1/3] scripts: support parallel building in validate-abi.sh via -j[N] option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 10:54:04 -0000 Signed-off-by: Panu Matilainen --- doc/guides/contributing/versioning.rst | 4 +++- scripts/validate-abi.sh | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst index ae10a98..33b03a1 100644 --- a/doc/guides/contributing/versioning.rst +++ b/doc/guides/contributing/versioning.rst @@ -469,11 +469,13 @@ utilities which can be installed via a package manager. For example:: The syntax of the ``validate-abi.sh`` utility is:: - ./scripts/validate-abi.sh + ./scripts/validate-abi.sh [-j[N]] Where ``REV1`` and ``REV2`` are valid gitrevisions(7) https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html on the local repo and target is the usual DPDK compilation target. +The optional -j[N] switch enables parallel building with at most +N simultaneous jobs, ie the same as -j option of ``make``. For example: diff --git a/scripts/validate-abi.sh b/scripts/validate-abi.sh index c36ad61..f094582 100755 --- a/scripts/validate-abi.sh +++ b/scripts/validate-abi.sh @@ -27,13 +27,20 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +case "$1" in + -j*) + MAKEJOBS="$1" + shift + ;; +esac + TAG1=$1 TAG2=$2 TARGET=$3 ABI_DIR=`mktemp -d -p /tmp ABI.XXXXXX` usage() { - echo "$0 " + echo "$0 [-j[N]] " } log() { @@ -183,7 +190,7 @@ log "INFO" "Configuring DPDK $TAG1" make config T=$TARGET O=$TARGET > $VERBOSE 2>&1 log "INFO" "Building DPDK $TAG1. This might take a moment" -make O=$TARGET > $VERBOSE 2>&1 +make $MAKEJOBS O=$TARGET > $VERBOSE 2>&1 if [ $? -ne 0 ] then @@ -214,7 +221,7 @@ log "INFO" "Configuring DPDK $TAG2" make config T=$TARGET O=$TARGET > $VERBOSE 2>&1 log "INFO" "Building DPDK $TAG2. This might take a moment" -make O=$TARGET > $VERBOSE 2>&1 +make $MAKEJOBS O=$TARGET > $VERBOSE 2>&1 if [ $? -ne 0 ] then -- 2.5.0