summaryrefslogtreecommitdiff
path: root/test/symbols-leak-test
blob: 7b612f414b9d9b424c6abccce16d2d42be4fc697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)