Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
.gitignore | 3 ++
build-aux/abi-check-templ.xml | 12 +++++++++++
check | 44 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 0 deletions(-)
create mode 100644 build-aux/abi-check-templ.xml
diff --git a/.gitignore b/.gitignore
index 6d212db..8bed236 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,3 +34,6 @@ lib/run_splint.sh
.tarball-version
libqb.spec
include/qb/stamp-h2
+cov
+compat_reports
+abi_dumps
\ No newline at end of file
diff --git a/build-aux/abi-check-templ.xml b/build-aux/abi-check-templ.xml
new file mode 100644
index 0000000..4cac826
--- /dev/null
+++ b/build-aux/abi-check-templ.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<descriptor>
+<version>
+ @VERSION@
+</version>
+<headers>
+ @PREFIX@/usr/include/qb
+</headers>
+<libs>
+ @PREFIX(a)/usr/lib64/libqb.so
+</libs>
+</descriptor>
diff --git a/check b/check
index ddeba67..eff22cb 100755
--- a/check
+++ b/check
@@ -157,6 +157,47 @@ check_coverity() {
cov-format-errors --dir cov
}
+check_abi() {
+ ver1=$1
+ ver2=$2
+
+ TMPL=build-aux/abi-check-templ.xml
+ checker=abi-compliance-checker
+
+ mkdir -p abi_dumps/libqb
+ for v in $ver1 $ver2
+ do
+ p=$(pwd)_inst_$v
+ sed -e "s|@PREFIX@|$p|" -e "s|@VERSION@|$v|" $TMPL >
abi_dumps/libqb/$v.xml
+ done
+ for v in $ver1 $ver2
+ do
+ p=$(pwd)_inst_$v
+ t=v$v
+ b=api-check-$v
+ echo "== Version $v =="
+ if [ ! -f abi_dumps/libqb/libqb_$v.abi.tar.gz ]
+ then
+ git checkout -B $b $t
+ ./autogen.sh
+ ./configure
+ make
+ make install DESTDIR=$p
+ $checker -l libqb -dump_abi abi_dumps/libqb/$v.xml
+ fi
+ done
+
+ $checker -l libqb \
+ -d1 abi_dumps/libqb/libqb_$ver1.abi.tar.gz \
+ -d2 abi_dumps/libqb/libqb_$ver2.abi.tar.gz
+
+ google-chrome compat_reports/libqb/$ver1\_to_$ver2/abi_compat_report.html
+
+ echo mv compat_reports/libqb/$ver1\_to_$ver2/abi_compat_report.html
abi_compat_report_$ver1\_to_$ver2.html
+ echo scp abi_compat_report_$ver1\_to_$ver2.html fedorahosted.org:quarterback
+ git checkout master
+}
+
check_all() {
check_ansi
check_nosection
@@ -207,6 +248,9 @@ case $command in
coverity)
check_coverity
;;
+ abi)
+ check_abi $args
+ ;;
all)
check_all
;;
--
1.7.7.3
Show replies by date