From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 1/3] scripts: support parallel building in validate-abi.sh via -j[N] option Date: Thu, 10 Mar 2016 12:52:30 +0000 Message-ID: <56E16E0E.9090703@intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: Panu Matilainen , dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5BC822BCE for ; Thu, 10 Mar 2016 13:52:54 +0100 (CET) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/10/2016 10:53 AM, Panu Matilainen wrote: > Signed-off-by: Panu Matilainen > --- > doc/guides/contributing/versioning.rst | 4 +++- > scripts/validate-abi.sh | 13 ++++++++++--- > 2 files changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contri= buting/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 ma= nager. For example:: > =20 > The syntax of the ``validate-abi.sh`` utility is:: > =20 > - ./scripts/validate-abi.sh > + ./scripts/validate-abi.sh [-j[N]] > =20 > 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``. > =20 > For example: > =20 > 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 DAMAG= E. > =20 > +case "$1" in > + -j*) > + MAKEJOBS=3D"$1" > + shift > + ;; > +esac > + > TAG1=3D$1 > TAG2=3D$2 > TARGET=3D$3 > ABI_DIR=3D`mktemp -d -p /tmp ABI.XXXXXX` > =20 > usage() { > - echo "$0 " > + echo "$0 [-j[N]] " > } > =20 > log() { > @@ -183,7 +190,7 @@ log "INFO" "Configuring DPDK $TAG1" > make config T=3D$TARGET O=3D$TARGET > $VERBOSE 2>&1 > =20 > log "INFO" "Building DPDK $TAG1. This might take a moment" > -make O=3D$TARGET > $VERBOSE 2>&1 > +make $MAKEJOBS O=3D$TARGET > $VERBOSE 2>&1 > =20 > if [ $? -ne 0 ] > then > @@ -214,7 +221,7 @@ log "INFO" "Configuring DPDK $TAG2" > make config T=3D$TARGET O=3D$TARGET > $VERBOSE 2>&1 > =20 > log "INFO" "Building DPDK $TAG2. This might take a moment" > -make O=3D$TARGET > $VERBOSE 2>&1 > +make $MAKEJOBS O=3D$TARGET > $VERBOSE 2>&1 > =20 > if [ $? -ne 0 ] > then >=20 This is something good to have. I also found following is also working, not sure if need to document in script: "MAKEFLAGS=3D"-j32" ./validate-abi.sh X Y Z" And was just thinking if needs to address "-j N" usage (space after -j), it is your call. Other than this, Acked-by: Ferruh Yigit