[PATCH wayland v2 2/4] wayland-egl: fail the symbol check if lib is missing

Emil Velikov emil.l.velikov at gmail.com
Wed Feb 28 16:38:19 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

Based on a similar patch (in Mesa) by Eric Engestrom.

v2: Rebase on top of $NM patch.

Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 egl/wayland-egl-symbols-check | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/egl/wayland-egl-symbols-check b/egl/wayland-egl-symbols-check
index e247cf3..4b8b5e4 100755
--- a/egl/wayland-egl-symbols-check
+++ b/egl/wayland-egl-symbols-check
@@ -1,6 +1,14 @@
 #!/bin/sh
+set -eu
 
-FUNCS=$($NM -D --defined-only ${1-.libs/libwayland-egl.so} | grep -o "T .*" | cut -c 3- | while read func; do
+LIB=${1-.libs/libwayland-egl.so}
+
+if [ ! -f "$LIB" ]; then
+	echo "The test binary \"$LIB\" does no exist"
+	exit 1
+fi
+
+FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 wl_egl_window_resize
 wl_egl_window_create
-- 
2.16.0



More information about the wayland-devel mailing list