nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Vishal Verma <vishal.l.verma@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH] contrib/do_abidiff: make the build more robust
Date: Wed, 11 Jul 2018 15:23:57 -0600	[thread overview]
Message-ID: <20180711212357.4281-1-vishal.l.verma@intel.com> (raw)

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 <vishal.l.verma@intel.com>
---
 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" \
-- 
2.14.4

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

                 reply	other threads:[~2018-07-11 21:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711212357.4281-1-vishal.l.verma@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).