0a74c5f61ee0d6909480616c76a77c261c80f050
[platform/upstream/libxkbcommon.git] / test / symbols-leak-test.bash
1 #!/usr/bin/env bash
2 set -e
3
4 # Check that all exported symbols are specified in the symbol version
5 # scripts.  If this fails, please update the appropriate .map file
6 # (adding new version nodes as needed).
7
8 # xkbcommon symbols
9 diff -a -u \
10     <(grep -h '^\s\+xkb_' "$top_srcdir"/xkbcommon.map | sed -e 's/^\s\+\(.*\);/\1/' | sort) \
11     <(grep -h 'XKB_EXPORT' -A1 "$top_srcdir"/src/{,xkbcomp,compose}/*.c | grep '^xkb_' | sed -e 's/(.*//' | sort)
12
13 # xkbcommon-x11 symbols
14 diff -a -u \
15     <(grep -h '^\s\+xkb_.*' "$top_srcdir"/xkbcommon-x11.map | sed -e 's/^\s\+\(.*\);/\1/' | sort) \
16     <(grep -h 'XKB_EXPORT' -A1 "$top_srcdir"/src/x11/*.c | grep '^xkb_' | sed -e 's/(.*//' | sort)