egl: make sure entrypoints list is always sorted
authorEric Engestrom <eric@engestrom.ch>
Tue, 21 Feb 2017 23:56:51 +0000 (23:56 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Fri, 24 Feb 2017 17:00:50 +0000 (17:00 +0000)
Starting with the next commit, badly sorting this list will break the
eglGetProcAddress().

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/Makefile.am
src/egl/egl-entrypoint-check [new file with mode: 0755]

index d36a786ab4470043d96c1e047feb977b9fe44538..3477f797d77c41bdff4732823ff516c5d97ac944 100644 (file)
@@ -126,7 +126,8 @@ egl_HEADERS = \
        $(top_srcdir)/include/EGL/eglmesaext.h \
        $(top_srcdir)/include/EGL/eglplatform.h
 
-TESTS = egl-symbols-check
+TESTS = egl-symbols-check \
+       egl-entrypoint-check
 
 EXTRA_DIST = \
        $(TESTS) \
diff --git a/src/egl/egl-entrypoint-check b/src/egl/egl-entrypoint-check
new file mode 100755 (executable)
index 0000000..ec33d8e
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+entrypoints=$(grep EGL_ENTRYPOINT "$srcdir"/main/eglentrypoint.h)
+sorted=$(sort <<< "$entrypoints")
+test "$entrypoints" = "$sorted"