File: compare-abis.sh

package info (click to toggle)
wireshark 1.8.2-5wheezy18
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 196,124 kB
  • sloc: ansic: 2,186,574; xml: 55,064; python: 30,233; perl: 22,353; sh: 13,118; pascal: 5,964; lex: 4,963; cpp: 3,604; makefile: 3,471; yacc: 266; asm: 156; tcl: 35
file content (39 lines) | stat: -rwxr-xr-x 1,099 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash


# Compare ABIs of two Wireshark working copies
# $Id: compare-abis.sh 40597 2012-01-19 22:55:52Z rbalint $

# Tested with abi-compliance-checker 1.96.1

function acc () {
	LIBNAME=$1
	DIR=$2
	# compare only dumped ABI descriptions first, then fall back to full comparison
	# if no difference is found
	if abi-compliance-checker -l $LIBNAME \
		-d1 $V1_PATH/$DIR/.libs/$LIBNAME.abi.tar.gz \
		-d2 $V2_PATH/$DIR/.libs/$LIBNAME.abi.tar.gz ; then
		abi-compliance-checker -l $LIBNAME \
			-d1 $V1_PATH/$DIR/abi-descriptor.xml -relpath1 $V1_PATH/$DIR \
			-v1 `ls  $V1_PATH/$DIR/.libs/$LIBNAME.so.?.?.?|sed 's/.*\.so\.//'` \
			-d2 $V2_PATH/$DIR/abi-descriptor.xml -relpath2 $V2_PATH/$DIR \
			-v2 `ls  $V2_PATH/$DIR/.libs/$LIBNAME.so.?.?.?|sed 's/.*\.so\.//'` \
			-check-implementation
	fi
}

V1_PATH=$1
V2_PATH=$2

# both working copies has to be build first
#make -C $V1_PATH all dumpabi
#make -C $V2_PATH all dumpabi

acc libwiretap wiretap $V1_PATH $V2_PATH
RET=$?
acc libwsutil wsutil $V1_PATH $V2_PATH
RET=$(($RET + $?))
acc libwireshark epan $V1_PATH $V2_PATH
exit $(($RET + $?))