From patchwork Wed Jul 11 21:23:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10520611 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03977600CA for ; Wed, 11 Jul 2018 21:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E393A29312 for ; Wed, 11 Jul 2018 21:24:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D734429352; Wed, 11 Jul 2018 21:24:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D41E29312 for ; Wed, 11 Jul 2018 21:24:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 701572097E270; Wed, 11 Jul 2018 14:24:06 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6DB8C2096FADE for ; Wed, 11 Jul 2018 14:24:04 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 14:24:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,339,1526367600"; d="scan'208";a="70596323" Received: from vverma7-desk1.lm.intel.com ([10.232.112.133]) by fmsmga004.fm.intel.com with ESMTP; 11 Jul 2018 14:24:03 -0700 From: Vishal Verma To: Subject: [ndctl PATCH] contrib/do_abidiff: make the build more robust Date: Wed, 11 Jul 2018 15:23:57 -0600 Message-Id: <20180711212357.4281-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.14.4 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Use the mock config to determine the release to build for, as that will result in a build version for the running system. If the build were to fail, ensure we catch that, and if the build artifacts are missing, error out on that. Signed-off-by: Vishal Verma --- contrib/do_abidiff | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/do_abidiff b/contrib/do_abidiff index a520c3c..0bd7a16 100755 --- a/contrib/do_abidiff +++ b/contrib/do_abidiff @@ -27,8 +27,10 @@ build_rpm() # build and copy RPMs version="$(./git-version)" + release="f$(basename $(readlink -f /etc/mock/default.cfg) | cut -d- -f2)" git archive --format=tar --prefix="ndctl-${version}/" HEAD | gzip > ndctl-${version}.tar.gz - fedpkg --release master --module-name ndctl mockbuild + fedpkg --release $release --module-name ndctl mockbuild + [ "$?" -eq 0 ] || err "error building $ref" mkdir -p release/rel_${ref}/ cp results_ndctl/*/*/*.x86_64.rpm release/rel_${ref}/ @@ -52,6 +54,8 @@ do_diff() local new_lib="$(find . -regex "./release/rel_${new}/${pkg}-libs-[0-9]+.*" | head -1)" [ -n "$pkg" ] || err "specify a package for diff (ndctl, daxctl)" + [ -n "$old_base" ] || err "$pkg: old_base empty, possible build failure" + [ -n "$new_base" ] || err "$pkg: new_base empty, possible build failure" abipkgdiff --dso-only --no-added-syms --harmless --drop-private-types \ --devel1 "$old_dev" --devel2 "$new_dev" \