@@ -22,5 +22,6 @@ libdrm_etnavivinclude_HEADERS = $(LIBDRM_ETNAVIV_H_FILES)
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_etnaviv.pc
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
TESTS = etnaviv-symbol-check
EXTRA_DIST = $(TESTS)
@@ -1,15 +1,10 @@
#!/bin/bash
+set -eu
-# The following symbols (past the first five) are taken from the public headers.
-# A list of the latter should be available Makefile.sources/LIBDRM_ETNAVIV_H_FILES
+LIB=.libs/libdrm_etnaviv.so
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_etnaviv.so} | awk '{print $3}'| while read func; do
-( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
-_fini
-_init
+# Official ABI, taken from the header.
+REQ_FUNCS="
etna_device_new
etna_device_new_dup
etna_device_ref
@@ -46,8 +41,6 @@ etna_perfmon_create
etna_perfmon_del
etna_perfmon_get_dom_by_name
etna_perfmon_get_sig_by_name
-EOF
-done)
+"
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check
@@ -55,5 +55,6 @@ ext_libdrm_etnaviv = declare_dependency(
test(
'etnaviv-symbol-check',
prog_bash,
+ env : env_test,
args : [files('etnaviv-symbol-check'), libdrm_etnaviv]
)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> --- etnaviv/Makefile.am | 1 + etnaviv/etnaviv-symbol-check | 19 ++++++------------- etnaviv/meson.build | 1 + 3 files changed, 8 insertions(+), 13 deletions(-)