git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal: remove duplicate function declaration
[dpdk.git]
/
scripts
/
validate-abi.sh
diff --git
a/scripts/validate-abi.sh
b/scripts/validate-abi.sh
index
12946d4
..
52e4e7a
100755
(executable)
--- a/
scripts/validate-abi.sh
+++ b/
scripts/validate-abi.sh
@@
-33,7
+33,7
@@
TARGET=$3
ABI_DIR=`mktemp -d -p /tmp ABI.XXXXXX`
usage() {
ABI_DIR=`mktemp -d -p /tmp ABI.XXXXXX`
usage() {
- echo "$0 <
TAG1> <TAG
2> <TARGET>"
+ echo "$0 <
REV1> <REV
2> <TARGET>"
}
log() {
}
log() {
@@
-43,16
+43,15
@@
log() {
}
validate_tags() {
}
validate_tags() {
- git tag -l | grep -q "$TAG1"
- if [
$? -ne 0
]
+
+ if [
-z "$HASH1"
]
then
then
- echo "
$TAG1 is invalid
"
+ echo "
invalid revision: $TAG1
"
return
fi
return
fi
- git tag -l | grep -q "$TAG2"
- if [ $? -ne 0 ]
+ if [ -z "$HASH2" ]
then
then
- echo "
$TAG2 is invalid
"
+ echo "
invalid revision: $TAG2
"
return
fi
}
return
fi
}
@@
-60,12
+59,12
@@
validate_tags() {
validate_args() {
if [ -z "$TAG1" ]
then
validate_args() {
if [ -z "$TAG1" ]
then
- echo "Must Specify
TAG
1"
+ echo "Must Specify
REV
1"
return
fi
if [ -z "$TAG2" ]
then
return
fi
if [ -z "$TAG2" ]
then
- echo "Must Specify
TAG
2"
+ echo "Must Specify
REV
2"
return
fi
if [ -z "$TARGET" ]
return
fi
if [ -z "$TARGET" ]
@@
-88,6
+87,7
@@
fixup_config() {
sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+ sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" config/defconfig_$TARGET
}
###########################################
}
###########################################
@@
-97,6
+97,17
@@
fixup_config() {
#trap on ctrl-c to clean up
trap cleanup_and_exit SIGINT
#trap on ctrl-c to clean up
trap cleanup_and_exit SIGINT
+if [ -z "$DPDK_MAKE_JOBS" ]
+then
+ # This counts the number of cpus on the system
+ if [ -e /usr/bin/lscpu ]
+ then
+ DPDK_MAKE_JOBS=`lscpu -p=cpu | grep -v "#" | wc -l`
+ else
+ DPDK_MAKE_JOBS=1
+ fi
+fi
+
#Save the current branch
CURRENT_BRANCH=`git branch | grep \* | cut -d' ' -f2`
#Save the current branch
CURRENT_BRANCH=`git branch | grep \* | cut -d' ' -f2`
@@
-121,6
+132,9
@@
then
cleanup_and_exit 1
fi
cleanup_and_exit 1
fi
+HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null | tail -1)
+HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null | tail -1)
+
# Make sure our tags exist
res=$(validate_tags)
if [ -n "$res" ]
# Make sure our tags exist
res=$(validate_tags)
if [ -n "$res" ]
@@
-129,6
+143,10
@@
then
cleanup_and_exit 1
fi
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
ABICHECK=`which abi-compliance-checker 2>/dev/null`
if [ $? -ne 0 ]
then
@@
-144,8
+162,8
@@
then
fi
log "INFO" "We're going to check and make sure that applications built"
fi
log "INFO" "We're going to check and make sure that applications built"
-log "INFO" "against DPDK DSOs from
tag
$TAG1 will still run when executed"
-log "INFO" "against DPDK DSOs built from
tag
$TAG2."
+log "INFO" "against DPDK DSOs from
version
$TAG1 will still run when executed"
+log "INFO" "against DPDK DSOs built from
version
$TAG2."
log "INFO" ""
# Check to make sure we have a clean tree
log "INFO" ""
# Check to make sure we have a clean tree
@@
-161,14
+179,14
@@
cd $(dirname $0)/..
log "INFO" "Checking out version $TAG1 of the dpdk"
# Move to the old version of the tree
log "INFO" "Checking out version $TAG1 of the dpdk"
# Move to the old version of the tree
-git checkout $
TAG
1
+git checkout $
HASH
1
fixup_config
# Checking abi compliance relies on using the dwarf information in
# The shared objects. Thats only included in the DSO's if we build
# with -g
fixup_config
# Checking abi compliance relies on using the dwarf information in
# The shared objects. Thats only included in the DSO's if we build
# with -g
-export EXTRA_CFLAGS="$EXTRA_CFLAGS -g"
+export EXTRA_CFLAGS="$EXTRA_CFLAGS -g
-O0
"
export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
# Now configure the build
export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
# Now configure the build
@@
-176,7
+194,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 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
-j$DPDK_MAKE_JOBS
O=$TARGET > $VERBOSE 2>&1
if [ $? -ne 0 ]
then
if [ $? -ne 0 ]
then
@@
-189,7
+207,7
@@
cd $TARGET/lib
log "INFO" "COLLECTING ABI INFORMATION FOR $TAG1"
for i in `ls *.so`
do
log "INFO" "COLLECTING ABI INFORMATION FOR $TAG1"
for i in `ls *.so`
do
- $ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $
TAG
1
+ $ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $
HASH
1
done
cd ../..
done
cd ../..
@@
-198,7
+216,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 reset --hard
# Move to the new version of the tree
log "INFO" "Checking out version $TAG2 of the dpdk"
-git checkout $
TAG
2
+git checkout $
HASH
2
fixup_config
fixup_config
@@
-207,7
+225,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 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
-j$DPDK_MAKE_JOBS
O=$TARGET > $VERBOSE 2>&1
if [ $? -ne 0 ]
then
if [ $? -ne 0 ]
then
@@
-219,7
+237,7
@@
cd $TARGET/lib
log "INFO" "COLLECTING ABI INFORMATION FOR $TAG2"
for i in `ls *.so`
do
log "INFO" "COLLECTING ABI INFORMATION FOR $TAG2"
for i in `ls *.so`
do
- $ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $
TAG
2
+ $ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $
HASH
2
done
cd ../..
done
cd ../..