2011-06-04 22:27:38 +00:00
|
|
|
#!/bin/bash
|
2013-07-12 21:53:52 +00:00
|
|
|
#
|
2011-06-04 22:27:38 +00:00
|
|
|
# Compare ABIs of two Wireshark working copies
|
2013-07-12 21:53:52 +00:00
|
|
|
#
|
|
|
|
# Copyright 2013 Balint Reczey <balint at balintreczey.hu>
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
2018-03-06 14:31:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2011-06-04 22:27:38 +00:00
|
|
|
|
2012-01-19 22:55:52 +00:00
|
|
|
# Tested with abi-compliance-checker 1.96.1
|
|
|
|
|
2011-06-04 22:27:38 +00:00
|
|
|
function acc () {
|
|
|
|
LIBNAME=$1
|
|
|
|
DIR=$2
|
|
|
|
# compare only dumped ABI descriptions first, then fall back to full comparison
|
|
|
|
# if no difference is found
|
2012-01-19 22:55:52 +00:00
|
|
|
if abi-compliance-checker -l $LIBNAME \
|
2013-02-25 21:27:16 +00:00
|
|
|
-d1 $V1_PATH/$DIR/$REL_DUMP_PATH/$LIBNAME.abi.tar.gz \
|
|
|
|
-d2 $V2_PATH/$DIR/$REL_DUMP_PATH/$LIBNAME.abi.tar.gz ; then
|
2012-01-19 22:55:52 +00:00
|
|
|
abi-compliance-checker -l $LIBNAME \
|
2011-06-04 22:27:38 +00:00
|
|
|
-d1 $V1_PATH/$DIR/abi-descriptor.xml -relpath1 $V1_PATH/$DIR \
|
2013-09-10 11:10:00 +00:00
|
|
|
-v1 `ls $V1_PATH/$DIR/$REL_LIB_PATH/$LIBNAME.so.?.*.*|sed 's/.*\.so\.//'` \
|
2011-06-04 22:27:38 +00:00
|
|
|
-d2 $V2_PATH/$DIR/abi-descriptor.xml -relpath2 $V2_PATH/$DIR \
|
2013-09-10 11:10:00 +00:00
|
|
|
-v2 `ls $V2_PATH/$DIR/$REL_LIB_PATH/$LIBNAME.so.?.*.*|sed 's/.*\.so\.//'` \
|
2011-06-04 22:27:38 +00:00
|
|
|
-check-implementation
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
V1_PATH=$1
|
|
|
|
V2_PATH=$2
|
|
|
|
|
2018-04-25 03:58:02 +00:00
|
|
|
# both working copies have to be built first with cmake
|
2013-02-25 21:27:16 +00:00
|
|
|
# make -C $V1_PATH all dumpabi
|
|
|
|
# make -C $V2_PATH all dumpabi
|
|
|
|
|
2018-04-25 03:58:02 +00:00
|
|
|
REL_LIB_PATH=../lib
|
|
|
|
REL_DUMP_PATH=.
|
2011-06-04 22:27:38 +00:00
|
|
|
|
2011-06-05 19:29:30 +00:00
|
|
|
acc libwiretap wiretap $V1_PATH $V2_PATH
|
|
|
|
RET=$?
|
2011-11-15 15:28:20 +00:00
|
|
|
acc libwsutil wsutil $V1_PATH $V2_PATH
|
2011-06-05 19:29:30 +00:00
|
|
|
RET=$(($RET + $?))
|
2011-11-15 15:28:20 +00:00
|
|
|
acc libwireshark epan $V1_PATH $V2_PATH
|
2011-06-05 19:29:30 +00:00
|
|
|
exit $(($RET + $?))
|
2011-06-04 22:27:38 +00:00
|
|
|
|