Make abicheck.sh output TAP

So that we can run it under the TAP harness like the rest of the
conformance test suite.
This commit is contained in:
Emmanuele Bassi 2013-12-12 18:50:24 +00:00
parent b4044292d3
commit ad39d3d1ae
3 changed files with 23 additions and 3 deletions

7
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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"