libinput/test/symbols-leak-test
Peter Hutterer 6b73d93ca4 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>
2018-07-12 11:09:00 +10:00

18 lines
372 B
Bash
Executable file

#!/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)