aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
diff options
context:
space:
mode:
authorEmil Velikov2015-03-31 13:51:45 -0500
committerEmil Velikov2015-04-28 05:19:15 -0500
commitb0d4ee6907811337a40780e9c7ae8f0fc65914c6 (patch)
treeb72a282e29081b8d4e113309af9523673072cd6c /libkms
parent983892d2756b4bcfcd455ec644afe666b9e0e447 (diff)
downloadexternal-libdrm-b0d4ee6907811337a40780e9c7ae8f0fc65914c6.tar.gz
external-libdrm-b0d4ee6907811337a40780e9c7ae8f0fc65914c6.tar.xz
external-libdrm-b0d4ee6907811337a40780e9c7ae8f0fc65914c6.zip
libkms: add symbols test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'libkms')
-rw-r--r--libkms/Makefile.am3
-rwxr-xr-xlibkms/kms-symbol-check25
2 files changed, 27 insertions, 1 deletions
diff --git a/libkms/Makefile.am b/libkms/Makefile.am
index 4baf4fc9..6c0ab7a2 100644
--- a/libkms/Makefile.am
+++ b/libkms/Makefile.am
@@ -43,4 +43,5 @@ libkmsinclude_HEADERS = $(LIBKMS_H_FILES)
43pkgconfigdir = @pkgconfigdir@ 43pkgconfigdir = @pkgconfigdir@
44pkgconfig_DATA = libkms.pc 44pkgconfig_DATA = libkms.pc
45 45
46EXTRA_DIST = Android.mk 46TESTS = kms-symbol-check
47EXTRA_DIST = Android.mk $(TESTS)
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
new file mode 100755
index 00000000..658b2692
--- /dev/null
+++ b/libkms/kms-symbol-check
@@ -0,0 +1,25 @@
1#!/bin/bash
2
3# The following symbols (past the first five) are taken from the public headers.
4# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
5
6FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
7( grep -q "^$func$" || echo $func ) <<EOF
8__bss_start
9_edata
10_end
11_fini
12_init
13kms_bo_create
14kms_bo_destroy
15kms_bo_get_prop
16kms_bo_map
17kms_bo_unmap
18kms_create
19kms_destroy
20kms_get_prop
21EOF
22done)
23
24test ! -n "$FUNCS" || echo $FUNCS
25test ! -n "$FUNCS"