From ad39d3d1aedf842b1c7d98a677e36d4e0f7a0df6 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 12 Dec 2013 18:50:24 +0000 Subject: [PATCH] Make abicheck.sh output TAP So that we can run it under the TAP harness like the rest of the conformance test suite. --- .gitignore | 7 +++++-- clutter/Makefile.am | 1 + clutter/abicheck.sh | 18 +++++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 64079e419..00c80dbe0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,13 +23,16 @@ stamp-marshal /clutter/gcov-report.txt /clutter/clutter-json.h /clutter/cex100/clutter-cex100.h +/clutter/*.log +/clutter/*.trs /clutter-lcov.info /clutter-lcov -/build/autotools/*.m4 -/build/test-driver !/build/autotools/introspection.m4 !/build/autotools/as-linguas.m4 !/build/autotools/as-compiler-flag.m4 +!/build/autotools/glibtests.m4 +/build/autotools/*.m4 +/build/test-driver *.gir *.typelib *.gcda diff --git a/clutter/Makefile.am b/clutter/Makefile.am index 09f5fc6e5..a045be3be 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -1054,6 +1054,7 @@ clutter_all_c_sources = \ $(built_source_c) TESTS_ENVIRONMENT = srcdir="$(srcdir)" CLUTTER_BACKENDS="$(CLUTTER_BACKENDS)" +LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build/autotools/tap-driver.sh if OS_LINUX TESTS = abicheck.sh endif diff --git a/clutter/abicheck.sh b/clutter/abicheck.sh index 7106dd61a..845dfe9b6 100755 --- a/clutter/abicheck.sh +++ b/clutter/abicheck.sh @@ -24,7 +24,23 @@ if [ $has_wayland_backend = "yes" ]; then cppargs="$cppargs -DCLUTTER_WINDOWING_WAYLAND" fi +echo "1..1" +echo "# Start of abicheck" + cpp -P ${cppargs} ${srcdir:-.}/clutter.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' -e 's/ DATA//' | sort > expected-abi nm -D -g --defined-only .libs/libclutter-1.0.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi -diff -u expected-abi actual-abi && rm -f expected-abi actual-abi + +diff -u expected-abi actual-abi > diff-abi + +if [ $? = 0 ]; then + echo "ok 1 expected abi" + rm -f diff-abi +else + echo "not ok 1 expected abi" + echo "# difference in diff-abi" +fi + +rm -f actual-abi expected-abi + +echo "# End of abicheck"