egl: add glvnd symbols check
[mesa.git] / src / egl / meson.build
index 38ffb512f1ce09f6e31d03282fac08d7c68a3abf..d864c099efa200e4c8c54497e42a8a549b47ee0a 100644 (file)
@@ -44,7 +44,6 @@ files_egl = files(
   'main/egldisplay.h',
   'main/egldriver.c',
   'main/egldriver.h',
-  'main/eglfallbacks.c',
   'main/eglglobals.c',
   'main/eglglobals.h',
   'main/eglimage.c',
@@ -96,6 +95,7 @@ if with_dri2
   link_for_egl += [libloader, libxmlconfig]
   incs_for_egl += inc_loader
 
+  files_egl += files('drivers/dri2/platform_device.c')
   if with_platform_x11
     files_egl += files('drivers/dri2/platform_x11.c')
     if with_dri3
@@ -192,20 +192,24 @@ pkg.generate(
   extra_cflags : gl_pkgconfig_c_flags,
 )
 
-if with_tests
+if with_tests and prog_nm.found()
   if with_glvnd
-    # TODO: add glvnd symbol check
+    egl_symbols = files('egl-glvnd-symbols.txt')
   else
-    test('egl-symbols-check',
-      find_program('egl-symbols-check'),
-      env : env_test,
-      args : libegl,
-      suite : ['egl'],
-    )
+    egl_symbols = files('egl-symbols.txt')
   endif
+  test('egl-symbols-check',
+    symbols_check,
+    args : [
+      '--lib', libegl,
+      '--symbols-file', egl_symbols,
+      '--nm', prog_nm.path(),
+    ],
+    suite : ['egl'],
+  )
   test('egl-entrypoint-check',
-    find_program('egl-entrypoint-check'),
-    env : ['srcdir=' + meson.current_source_dir()],
+    prog_python,
+    args : files('egl-entrypoint-check.py', 'main/eglentrypoint.h'),
     suite : ['egl'],
   )
 endif