summaryrefslogtreecommitdiff
path: root/test/symbols-leak-test
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-07-12 08:42:53 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-07-12 11:09:00 +1000
commit6b73d93ca44e263716d0644e3d947a4793c8c82c (patch)
treedb7f86aec6b654fe89af7dffb6cce76297dedad6 /test/symbols-leak-test
parentfa66edcd7394591f2cf8d2c3505f686366861832 (diff)
downloadlibinput-6b73d93ca44e263716d0644e3d947a4793c8c82c.tar.gz
test: tidy up the symbols leak test
This hasn't been a real .in file since the autotools removal, so rename it to reflect that. And since we can call it with arguments from meson, let's do so in the most sensible manner - passing the full paths in as required rather than relying on a directory layout within the script. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/symbols-leak-test')
-rwxr-xr-xtest/symbols-leak-test18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/symbols-leak-test b/test/symbols-leak-test
new file mode 100755
index 00000000..7b612f41
--- /dev/null
+++ b/test/symbols-leak-test
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+#
+# simple check for exported symbols
+#
+# Usage: symbols-leak-test /path/to/mapfile /path/to/libinput/src
+
+mapfile="$1"
+shift
+srcdir="$1"
+shift
+
+diff -a -u \
+ <(cat "$mapfile" | \
+ grep '^\s\+libinput_.*' | \
+ sed -e 's/^\s\+\(.*\);/\1/' | sort) \
+ <(cat "$srcdir"/*.c | \
+ grep LIBINPUT_EXPORT -A 1 | grep '^libinput_.*' | \
+ sed -e 's/(.*//' | sort)