libkms: add symbols test

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
main
Emil Velikov 2015-03-31 19:51:45 +01:00
parent 983892d275
commit b0d4ee6907
2 changed files with 27 additions and 1 deletions

View File

@ -43,4 +43,5 @@ libkmsinclude_HEADERS = $(LIBKMS_H_FILES)
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libkms.pc
EXTRA_DIST = Android.mk
TESTS = kms-symbol-check
EXTRA_DIST = Android.mk $(TESTS)

25
libkms/kms-symbol-check Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
_end
_fini
_init
kms_bo_create
kms_bo_destroy
kms_bo_get_prop
kms_bo_map
kms_bo_unmap
kms_create
kms_destroy
kms_get_prop
EOF
done)
test ! -n "$FUNCS" || echo $FUNCS
test ! -n "$FUNCS"