From: Panu Matilainen <pmatilai@redhat.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] scripts: support any legal git revisions as abi validation range
Date: Wed, 2 Dec 2015 18:50:47 +0200 [thread overview]
Message-ID: <aa1719d759d44dd62166432ed2179ac2c66e79b5.1449075047.git.pmatilai@redhat.com> (raw)
In addition to git tags, support validating abi between any legal
gitrevisions(7) syntaxes, such as "validate-abi.sh . -1 <target>"
"validate-abi.sh master mybrach <target>" etc in addition to
validating between tags. Makes it easier to run the validator
for in-development work.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
scripts/validate-abi.sh | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/scripts/validate-abi.sh b/scripts/validate-abi.sh
index 4476433..0e3ccd7 100755
--- a/scripts/validate-abi.sh
+++ b/scripts/validate-abi.sh
@@ -43,16 +43,15 @@ log() {
}
validate_tags() {
- git tag -l | grep -q "$TAG1"
- if [ $? -ne 0 ]
+
+ if [ -z "$HASH1" ]
then
- echo "$TAG1 is invalid"
+ echo "invalid revision: $TAG1"
return
fi
- git tag -l | grep -q "$TAG2"
- if [ $? -ne 0 ]
+ if [ -z "$HASH2" ]
then
- echo "$TAG2 is invalid"
+ echo "invalid revision: $TAG2"
return
fi
}
@@ -112,6 +111,9 @@ then
cleanup_and_exit 1
fi
+HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null)
+HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null)
+
# Make sure our tags exist
res=$(validate_tags)
if [ -n "$res" ]
@@ -120,6 +122,10 @@ then
cleanup_and_exit 1
fi
+# Make hashes available in output for non-local reference
+TAG1="$TAG1 ($HASH1)"
+TAG2="$TAG2 ($HASH2)"
+
ABICHECK=`which abi-compliance-checker 2>/dev/null`
if [ $? -ne 0 ]
then
@@ -152,7 +158,7 @@ cd $(dirname $0)/..
log "INFO" "Checking out version $TAG1 of the dpdk"
# Move to the old version of the tree
-git checkout $TAG1
+git checkout $HASH1
# Make sure we configure SHARED libraries
# Also turn off IGB and KNI as those require kernel headers to build
@@ -185,7 +191,7 @@ cd $TARGET/lib
log "INFO" "COLLECTING ABI INFORMATION FOR $TAG1"
for i in `ls *.so`
do
- $ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $TAG1
+ $ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $HASH1
done
cd ../..
@@ -194,7 +200,7 @@ git clean -f -d
git reset --hard
# Move to the new version of the tree
log "INFO" "Checking out version $TAG2 of the dpdk"
-git checkout $TAG2
+git checkout $HASH2
# Make sure we configure SHARED libraries
# Also turn off IGB and KNI as those require kernel headers to build
@@ -220,7 +226,7 @@ cd $TARGET/lib
log "INFO" "COLLECTING ABI INFORMATION FOR $TAG2"
for i in `ls *.so`
do
- $ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $TAG2
+ $ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $HASH2
done
cd ../..
--
2.5.0
next reply other threads:[~2015-12-02 16:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 16:50 Panu Matilainen [this message]
2015-12-02 18:23 ` Neil Horman
2015-12-03 12:14 ` Mcnamara, John
2015-12-03 13:28 ` Thomas Monjalon
2015-12-03 13:44 ` Panu Matilainen
2015-12-03 13:49 ` Richardson, Bruce
2015-12-03 15:46 ` Mcnamara, John
2015-12-03 13:39 ` Panu Matilainen
2015-12-03 13:41 ` Thomas Monjalon
2015-12-03 14:05 ` [dpdk-dev] [PATCH v2] " Panu Matilainen
2015-12-07 14:09 ` Panu Matilainen
2015-12-07 14:32 ` Thomas Monjalon
2015-12-07 16:08 ` Panu Matilainen
2015-12-07 22:38 ` Thomas Monjalon
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=aa1719d759d44dd62166432ed2179ac2c66e79b5.1449075047.git.pmatilai@redhat.com \
--to=pmatilai@redhat.com \
--cc=dev@dpdk.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).