summaryrefslogtreecommitdiff
path: root/omap
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-03-31 20:12:06 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-04-28 11:19:15 +0100
commit62b35fb2756ef37ff4bf3ac2eb5761d1fc95c089 (patch)
tree50f043b1ed85ab11929a9d0359c8778f53dbe3db /omap
parent9f8fb4686282cee0d54fb48f50772595fd4eedd3 (diff)
downloadlibdrm-62b35fb2756ef37ff4bf3ac2eb5761d1fc95c089.tar.gz
libdrm-62b35fb2756ef37ff4bf3ac2eb5761d1fc95c089.tar.bz2
libdrm-62b35fb2756ef37ff4bf3ac2eb5761d1fc95c089.zip
omap: add symbols test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'omap')
-rw-r--r--omap/Makefile.am3
-rwxr-xr-xomap/omap-symbol-check35
2 files changed, 38 insertions, 0 deletions
diff --git a/omap/Makefile.am b/omap/Makefile.am
index d6f52981..b34fba6e 100644
--- a/omap/Makefile.am
+++ b/omap/Makefile.am
@@ -20,3 +20,6 @@ libdrm_omapinclude_HEADERS = omap_drmif.h
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_omap.pc
+
+TESTS = omap-symbol-check
+EXTRA_DIST = $(TESTS)
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
new file mode 100755
index 00000000..759c84bd
--- /dev/null
+++ b/omap/omap-symbol-check
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.am/libdrm_omap*HEADERS
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+omap_bo_cpu_fini
+omap_bo_cpu_prep
+omap_bo_del
+omap_bo_dmabuf
+omap_bo_from_dmabuf
+omap_bo_from_name
+omap_bo_get_name
+omap_bo_handle
+omap_bo_map
+omap_bo_new
+omap_bo_new_tiled
+omap_bo_ref
+omap_bo_size
+omap_device_del
+omap_device_new
+omap_device_ref
+omap_get_param
+omap_set_param
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"