tegra: add symbols test

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
main
Emil Velikov 2015-03-31 20:14:58 +01:00
parent 62b35fb275
commit a814f933bf
2 changed files with 33 additions and 0 deletions

View File

@ -21,3 +21,6 @@ libdrm_tegrainclude_HEADERS = tegra.h
pkgconfigdir = @pkgconfigdir@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_tegra.pc pkgconfig_DATA = libdrm_tegra.pc
TESTS = tegra-symbol-check
EXTRA_DIST = $(TESTS)

30
tegra/tegra-symbol-check Executable file
View File

@ -0,0 +1,30 @@
#!/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/LIBDRM_FREEDRENO_H_FILES
FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
_end
_fini
_init
drm_tegra_bo_get_flags
drm_tegra_bo_get_handle
drm_tegra_bo_get_tiling
drm_tegra_bo_map
drm_tegra_bo_new
drm_tegra_bo_ref
drm_tegra_bo_set_flags
drm_tegra_bo_set_tiling
drm_tegra_bo_unmap
drm_tegra_bo_unref
drm_tegra_bo_wrap
drm_tegra_close
drm_tegra_new
EOF
done)
test ! -n "$FUNCS" || echo $FUNCS
test ! -n "$FUNCS"