Merge pull request #158 from rossburton/master

Improvements to the test suite
macos/v1.5.9
Emmanuele Bassi 7 years ago committed by GitHub
commit 6769ba25bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      configure.ac
  2. 6
      meson.build
  3. 4
      meson_options.txt
  4. 0
      src/gen_dispatch.py
  5. 8
      test/Makefile.am
  6. 9
      test/meson.build

@ -137,7 +137,6 @@ AS_CASE([$host_os],
[darwin*], [ [darwin*], [
build_wgl=no build_wgl=no
build_apple=yes
has_znow=no has_znow=no
EPOXY_LINK_LIBS="" EPOXY_LINK_LIBS=""
], ],
@ -177,11 +176,6 @@ if test x$build_wgl = xyes; then
AC_DEFINE([BUILD_WGL], [1], [build WGL tests]) AC_DEFINE([BUILD_WGL], [1], [build WGL tests])
fi fi
AM_CONDITIONAL(BUILD_APPLE, test x$build_apple = xyes)
if test x$build_apple = xyes; then
AC_DEFINE([BUILD_APPLE], [1], [build APPLE is apple (for testing)])
fi
AM_CONDITIONAL(HAS_ZNOW, test x$has_znow = xyes) AM_CONDITIONAL(HAS_ZNOW, test x$has_znow = xyes)
AC_CHECK_LIB([GLESv1_CM], [glFlush], [has_gles1=yes], [has_gles1=no]) AC_CHECK_LIB([GLESv1_CM], [glFlush], [has_gles1=yes], [has_gles1=no])
@ -190,6 +184,12 @@ AM_CONDITIONAL(HAS_GLES1, test x$has_gles1 = xyes)
AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"]) AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])
AC_SUBST([DLOPEN_LIBS]) AC_SUBST([DLOPEN_LIBS])
savelibs=$LIBS
LIBS=$DLOPEN_LIBS
AC_CHECK_FUNCS([dlvsym], [have_dlvsym=1], [have_dlvsym=0])
AM_CONDITIONAL(HAVE_DLVSYM, test $have_dlvsym = 1)
LIBS=$savelibs
VISIBILITY_CFLAGS="" VISIBILITY_CFLAGS=""
AS_CASE(["$host"], AS_CASE(["$host"],

@ -81,15 +81,12 @@ endif
# The remaining platform specific API for GL/GLES are enabled # The remaining platform specific API for GL/GLES are enabled
# depending on the platform we're building for # depending on the platform we're building for
if host_system == 'windows' if host_system == 'windows'
build_apple = false
build_wgl = true build_wgl = true
has_znow = true has_znow = true
elif host_system == 'darwin' elif host_system == 'darwin'
build_apple = true
build_wgl = false build_wgl = false
has_znow = false has_znow = false
else else
build_apple = false
build_wgl = false build_wgl = false
has_znow = true has_znow = true
endif endif
@ -242,7 +239,10 @@ libepoxy_inc = [
subdir('include/epoxy') subdir('include/epoxy')
subdir('src') subdir('src')
if get_option('tests')
subdir('test') subdir('test')
endif
if get_option('docs') if get_option('docs')
doxygen = find_program('doxygen', required: false) doxygen = find_program('doxygen', required: false)

@ -15,3 +15,7 @@ option('x11',
type: 'boolean', type: 'boolean',
value: true, value: true,
description: 'Enable X11 support (GLX or EGL-X11)') description: 'Enable X11 support (GLX or EGL-X11)')
option('tests',
type: 'boolean',
value: true,
description: 'Build the test suite')

@ -96,7 +96,7 @@ endif
if BUILD_EGL if BUILD_EGL
if BUILD_GLX if BUILD_GLX
if !BUILD_APPLE if HAVE_DLVSYM
EGL_AND_GLX_TESTS = \ EGL_AND_GLX_TESTS = \
egl_gl \ egl_gl \
egl_and_glx_different_pointers_egl_glx \ egl_and_glx_different_pointers_egl_glx \
@ -107,8 +107,8 @@ endif
endif endif
endif endif
if !BUILD_APPLE if HAVE_DLVSYM
GLX_NON_APPLE_TESTS = \ GLX_DLVSYM_TESTS = \
glx_alias_prefer_same_name \ glx_alias_prefer_same_name \
glx_gles2 \ glx_gles2 \
$() $()
@ -122,7 +122,7 @@ GLX_TESTS = \
glx_has_extension_nocontext \ glx_has_extension_nocontext \
glx_static \ glx_static \
$(GLX_SHARED_ZNOW) \ $(GLX_SHARED_ZNOW) \
$(GLX_NON_APPLE_TESTS) \ $(GLX_DLVSYM_TESTS) \
$() $()
GLX_UTIL_LIB = libglx_common.la GLX_UTIL_LIB = libglx_common.la

@ -1,3 +1,6 @@
dl_dep = cc.find_library('dl', required: false)
has_dlvsym = cc.has_function('dlvsym', dependencies: dl_dep)
has_gles1 = gles1_dep.found() has_gles1 = gles1_dep.found()
has_gles2 = gles2_dep.found() has_gles2 = gles2_dep.found()
build_x11_tests = enable_x11 and x11_dep.found() build_x11_tests = enable_x11 and x11_dep.found()
@ -92,8 +95,8 @@ if build_glx
[ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ], [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ],
[ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ], [ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ],
[ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ], [ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ],
[ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ], [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], has_dlvsym ],
[ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ], [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], has_dlvsym ],
] ]
foreach test: glx_tests foreach test: glx_tests
@ -114,7 +117,7 @@ if build_glx
endif endif
endforeach endforeach
if not build_apple if has_dlvsym
# GLX/EGL tests # GLX/EGL tests
if build_egl if build_egl
glx_egl_sources = [ glx_egl_sources = [

Loading…
Cancel
Save