Skip to content

Commit

Permalink
test: tidy up the symbols leak test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
whot committed Jul 12, 2018
1 parent fa66edc commit 6b73d93
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 31 deletions.
5 changes: 2 additions & 3 deletions meson.build
Expand Up @@ -726,10 +726,9 @@ test('tools-builddir-lookup-installed',

############ tests ############

test_symbols_leak = find_program('test/symbols-leak-test.in')
test('symbols-leak-test',
test_symbols_leak,
args : [ meson.current_source_dir() ])
find_program('test/symbols-leak-test'),
args : [ join_paths(dir_src, 'libinput.sym'), dir_src])

# build-test only
executable('test-build-pedantic',
Expand Down
18 changes: 18 additions & 0 deletions 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)
28 changes: 0 additions & 28 deletions test/symbols-leak-test.in

This file was deleted.

0 comments on commit 6b73d93

Please sign in to comment.