wayland-egl: automake: add symbol test
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 7 Feb 2014 19:06:02 +0000 (19:06 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 11 Feb 2014 20:19:46 +0000 (20:19 +0000)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/egl/wayland/wayland-egl/Makefile.am
src/egl/wayland/wayland-egl/wayland-egl-symbols-check [new file with mode: 0755]

index 138c170df4ed0f847a8529f7dbc81c5d98e41385..6e92b2960d84abb19eca5eceac5778ef84e5dff2 100644 (file)
@@ -9,3 +9,5 @@ lib_LTLIBRARIES = libwayland-egl.la
 noinst_HEADERS = wayland-egl-priv.h
 libwayland_egl_la_SOURCES = wayland-egl.c
 libwayland_egl_la_LDFLAGS = -version-info 1
+
+TESTS = wayland-egl-symbols-check
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-symbols-check b/src/egl/wayland/wayland-egl/wayland-egl-symbols-check
new file mode 100755 (executable)
index 0000000..0c5fd09
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+FUNCS=$(nm -D --defined-only ${1-.libs/libwayland-egl.so} | grep -o "T .*" | cut -c 3- | while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+wl_egl_window_resize
+wl_egl_window_create
+wl_egl_window_destroy
+wl_egl_window_get_attached_size
+_fini
+_init
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
+