summaryrefslogtreecommitdiffstats
path: root/src/gbm
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-02-07 16:08:04 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2014-02-11 19:00:09 +0000
commit5c7f75f70a833d861c835aac2c008e03599f7b50 (patch)
treeb0fb2d80450072b379d1eb7e0dc9143022d897ac /src/gbm
parent33b9c0d46527563d5a5e0f1f4f4017cf799f5782 (diff)
downloadexternal_mesa3d-5c7f75f70a833d861c835aac2c008e03599f7b50.zip
external_mesa3d-5c7f75f70a833d861c835aac2c008e03599f7b50.tar.gz
external_mesa3d-5c7f75f70a833d861c835aac2c008e03599f7b50.tar.bz2
gbm: automake: add symbol tests
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gbm')
-rw-r--r--src/gbm/Makefile.am2
-rwxr-xr-xsrc/gbm/gbm-symbols-check33
2 files changed, 35 insertions, 0 deletions
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index 2614298..fc4b534 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -46,4 +46,6 @@ libgbm_la_LIBADD += \
libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la $(LIBDRM_LIBS)
endif
+TESTS = gbm-symbols-check
+
include $(top_srcdir)/install-lib-links.mk
diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check
new file mode 100755
index 0000000..184cb22
--- /dev/null
+++ b/src/gbm/gbm-symbols-check
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+FUNCS=$(nm -D --defined-only ${1-.libs/libgbm.so} | grep -o "T .*" | cut -c 3- | while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+gbm_device_get_fd
+gbm_device_get_backend_name
+gbm_device_is_format_supported
+gbm_device_destroy
+gbm_create_device
+gbm_bo_create
+gbm_bo_import
+gbm_bo_get_width
+gbm_bo_get_height
+gbm_bo_get_stride
+gbm_bo_get_format
+gbm_bo_get_device
+gbm_bo_get_handle
+gbm_bo_write
+gbm_bo_set_user_data
+gbm_bo_get_user_data
+gbm_bo_destroy
+gbm_surface_create
+gbm_surface_lock_front_buffer
+gbm_surface_release_buffer
+gbm_surface_has_free_buffers
+gbm_surface_destroy
+_fini
+_init
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"