diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rwxr-xr-x | test/symbols-leak-test.in | 17 |
4 files changed, 23 insertions, 1 deletions
@@ -27,4 +27,5 @@ doc/libinput.doxygen doc/html tags test/test-* +test/symbols-leak-test* test-driver diff --git a/configure.ac b/configure.ac index f47c5a49..1e60e585 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,9 @@ AC_CONFIG_FILES([Makefile src/libinput-version.h test/Makefile tools/Makefile]) +AC_CONFIG_FILES([test/symbols-leak-test], + [chmod +x test/symbols-leak-test]) + AC_OUTPUT AC_MSG_RESULT([ diff --git a/test/Makefile.am b/test/Makefile.am index 5b9c7ab6..5743ca4f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -50,7 +50,8 @@ build_tests = \ test-build-std-gnuc90 noinst_PROGRAMS = $(build_tests) $(run_tests) -TESTS = $(run_tests) +noinst_SCRIPTS = symbols-leak-test +TESTS = $(run_tests) symbols-leak-test .NOTPARALLEL: diff --git a/test/symbols-leak-test.in b/test/symbols-leak-test.in new file mode 100755 index 00000000..448ef2f8 --- /dev/null +++ b/test/symbols-leak-test.in @@ -0,0 +1,17 @@ +#!/bin/bash + +### simple check for exported symbols + +# make bash exit if any command will exit with non-0 return value +set -e + +# make sure the paths are alright +cd `dirname $0` + +diff -a -u \ + <(cat @top_srcdir@/src/libinput.sym | \ + grep '^\s\+libinput_.*' | \ + sed -e 's/^\s\+\(.*\);/\1/' | sort) \ + <(cat @top_srcdir@/src/*.c | \ + grep LIBINPUT_EXPORT -A 1 | grep '^libinput_.*' | \ + sed -e 's/(.*//' | sort) |