mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 13:08:04 +02:00
add simple symbols leak checker
This patch adds simple script that compares libinput.sym file to the functions that are marked by LIBINPUT_EXPORT. This script is added to make check target. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d6da0e18c2
commit
a9f216ab47
4 changed files with 23 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -27,4 +27,5 @@ doc/libinput.doxygen
|
||||||
doc/html
|
doc/html
|
||||||
tags
|
tags
|
||||||
test/test-*
|
test/test-*
|
||||||
|
test/symbols-leak-test*
|
||||||
test-driver
|
test-driver
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,9 @@ AC_CONFIG_FILES([Makefile
|
||||||
src/libinput-version.h
|
src/libinput-version.h
|
||||||
test/Makefile
|
test/Makefile
|
||||||
tools/Makefile])
|
tools/Makefile])
|
||||||
|
AC_CONFIG_FILES([test/symbols-leak-test],
|
||||||
|
[chmod +x test/symbols-leak-test])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
AC_MSG_RESULT([
|
AC_MSG_RESULT([
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,8 @@ build_tests = \
|
||||||
test-build-std-gnuc90
|
test-build-std-gnuc90
|
||||||
|
|
||||||
noinst_PROGRAMS = $(build_tests) $(run_tests)
|
noinst_PROGRAMS = $(build_tests) $(run_tests)
|
||||||
TESTS = $(run_tests)
|
noinst_SCRIPTS = symbols-leak-test
|
||||||
|
TESTS = $(run_tests) symbols-leak-test
|
||||||
|
|
||||||
.NOTPARALLEL:
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
|
|
||||||
17
test/symbols-leak-test.in
Executable file
17
test/symbols-leak-test.in
Executable file
|
|
@ -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)
|
||||||
Loading…
Add table
Reference in a new issue