summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* build: Rework the build rules for generated files in MesonEmmanuele Bassi2017-01-251-0/+3
| | | | | | | | | | | | | | | | | | | | | Instead of using a generator and having to deal with tweaking the inclusion paths, we can use a custom target rule, which will do the right thing and put the generate files where we expect them to be. Due to how Meson and Ninja work we need to be a bit more careful as to how we deal with dependencies and generated files, especially since Epoxy is built on the assumption that the only inclusion path for the headers lies under the 'include' sub-directory. First of all, we need to split the dispatch table generation into two separate steps, one for the headers and one for the source files. Additionally, we need to munge the paths of the non-generated headers so that we reference them by their correct path. These changes are necessary to ensure that Epoxy can be built on a system without Epoxy installed already; the previous Meson-based build system relied on the headers being installed in a system directory.
* build: Add Meson build filesEmmanuele Bassi2017-01-251-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson is a Python-based build system that generates build rules of Ninja, Visual Studio, and XCode. It's designed to be fast, and have a small, non-Turing complete language to describe the build process, tests, and dependencies. It's simpler than CMake, and faster than autotools. As a direct comparison in terms of speed, three build and check runs for libepoxy from a clean Git repository clone yield these results on my Kabylake Core i7 7500U (nproc=4): - Autotools (make) Run #1 (cold) real: 22.384s, user: 20.011s, sys: 3.689s Run #2 (warm) real: 22.429s, user: 20.220s, sys: 3.708s Run #3 (warm) real: 22.068s, user: 19.743s, sys: 3.594s - Meson (ninja) Run #1 (cold) real: 5.932s, user: 9.371s, sys: 1.625s Run #2 (warm) real: 6.273s, user: 10.066, sys: 1.740s Run #3 (warm) real: 5.796s, user: 9.233s, sys: 1.607s Which means that Meson and ninja are approximately 4x faster than autotools. In terms of simplicity, the autotools build takes six files and a total of 645 lines; Meson requires 3 files, and 361 lines to achieve the same result. Additionally, Meson automatically builds in a separate build directory and does not leave files inside the source directory; and Meson does not use libtool. Since Meson is quite new and still actively developed, we're going to leave the autotools build in place for a while, with the intention of switching to Meson in the future.
* tests/wgl: Use the right array offsetsEmmanuele Bassi2017-01-251-4/+4
| | | | And avoid an out of bounds access warning.
* build: Skip GLESv1 tests if there's no GLESv1Emmanuele Bassi2017-01-251-1/+4
| | | | | | | | It's pretty much pointless to build and run tests for a library that we know is not available. The Meson build already skips the GLES 1.0 test, so let's make the Autotools build do the same.
* test: Fix dlwrap on ppc64 and s390xAdam Jackson2017-01-251-0/+2
| | | | | | These have dlsym versions of GLIBC_2.3 and GLIBC_2.2, respectively. Signed-off-by: Adam Jackson <ajax@redhat.com>
* dlwrap: add GLIBC_2.4 version to be able to run tests from ARMOlivier Blin2016-12-071-0/+1
| | | | | | See sysdeps/unix/sysv/linux/arm/libdl.abilist in glibc Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* Revert all changes since 8bbc0d40Emmanuele Bassi2016-12-0726-366/+131
| | | | | | | | | | | | | | | Most of the changes that happened after commit 8bbc0d40 broke epoxy pretty much irreparably because of the CMake build and the attempt at making libepoxy a static library that can be copy-pasted into another project without generating files. Since all the commits are entangled, and are full of unrelated changes, we cannot simply do a localized set of reverts; instead, we need to hit the reset button. From this point forward, we're going to improve libepoxy's build while attempting to keep the existing build system working. This may mean reinstating the CMake build system at a later date.
* build: Drop autogenerated autotools files from GitEmmanuele Bassi2016-11-071-1743/+0
| | | | | | | | | These files should not be under revision control. This commit partially reverts: * 06fd4a271ad88476d8c6a37d49b6a8af5a11d988 * 62e384129b5b9243634ca4a71108c6f8699a24bd
* Add glibc versions 2.2 and 2.3 to "dlwrap_real_dlsym".Yaron Cohen-Tal2015-11-051-0/+2
|
* Merge branch "blino/master".Yaron Cohen-Tal2015-09-211-0/+1
|\
| * dlwrap: add GLIBC_2.4 version to be able to run tests from ARMOlivier Blin2015-09-211-0/+1
| | | | | | | | See sysdeps/unix/sysv/linux/arm/libdl.abilist in glibc
* | Fix "FindGLESv1.cmake" and "FindGLESv2.cmake".Yaron Cohen-Tal2015-09-041-3/+3
| |
* | Fix support for a static build of Epoxy. Add support building and running ↵Yaron Cohen-Tal2015-09-0321-87/+200
| | | | | | | | tests with CMake. Add support for linking with the static run-time library with MSVC.
* | Add some files to the repo so that it's possible to build without running ↵Yaron Cohen-Tal2015-08-261-0/+1743
| | | | | | | | "autogen.sh".
* | Fix tests to work with some OpenGL ES / EGL implementations.Yaron Cohen-Tal2015-08-246-46/+22
| |
* | Added makefiles to build with MSVC 2013, and fixed errors and warnings.Yaron Cohen-Tal2015-07-183-0/+143
|/
* Make the glx_alias_prefer_same_name test work, and hook it up.Eric Anholt2015-07-162-19/+8
| | | | | Apparently I started writing it, and didn't notice I wasn't building my code when I committed the library support.
* test/wgl_per_context_funcptrs.c: Fix build on Visual StudioChun-wei Fan2015-06-051-7/+7
| | | | | Ensure that we do __stdcall only after the return type, as Visual Studio will not like it otherwise.
* Avoid name conflicts between pkgconfig's EGL_LIBS and a temporary var.tempEric Anholt2014-06-131-6/+6
| | | | | | I felt a little uncomfortable knowing I had two things defining EGL_LIBS, but it worked on my system. It failed on the travis ci build.
* Use the EGL pkgconfig for finding eglplatform.h.Eric Anholt2014-06-131-1/+3
| | | | | | | We don't ever explicity link against libEGL, so no need to make use of EGL_LIBS. Fixes #30.
* tests: Fix the passing of the "-z now" arg to the linker.Eric Anholt2014-06-131-1/+1
| | | | | | These LDFLAGS go to the compiler, and getting the arg to the linker requires -Wl or -Xlinker. gcc apparently was passing this through anyway, while clang was getting angry.
* Fix EGL context detection for non-GLES2-core functions.Eric Anholt2014-04-081-1/+0
| | | | | | | Fixes failure of the X Server with glamor using desktop GL on EGL, and the associated testcase in the tree. This was clearly just copy-and-paste failure on my part in b251e3ae337cecda3cbede6fde8cc8f7cef942c9.
* Add a test for a failure I found with the X Server after my last fixes.Eric Anholt2014-04-083-0/+135
|
* Disable the dlwrap-based tests on apple.Eric Anholt2014-03-281-2/+10
| | | | We'd need a dlvsym() equivalent.
* Prefer non-aliased functions when resolving.Eric Anholt2014-03-283-1/+100
| | | | | | | | This increases the size of the library, but avoids some of the concerns that have been brought up with the library silently switching you from glWhateverEXT() to glWhatever() if there might be slight behavior differences between the two that hadn't been identified. The downside is that it means we can't share the resolver functions among aliases.
* wgl: Add a test for MakeCurrent returning different function pointers.Eric Anholt2014-03-282-0/+169
| | | | Huh, my old rule of "untested code is broken code" didn't hold up, for once.
* Ask glXGetProcAddress for ES symbols when we're on a GLX context.Eric Anholt2014-03-271-1/+0
| | | | Fixes #24
* test: Add a test using GLX_EXT_create_context_es2_profile.Eric Anholt2014-03-273-0/+125
| | | | | This is based on a bug report from Steinar H. Gunderson about using GLES3 with SDL and epoxy.
* test: Avoid segfaulting when nvidia driver does a dlopen(RTLD_DEFAULT)Eric Anholt2014-03-271-0/+3
|
* win32: Fix a C90 compiler warning.Eric Anholt2014-03-271-1/+1
|
* win32: Add a test for wglUseFontBitmaps().Eric Anholt2014-03-273-0/+84
|
* Try to use glXGPA() for core funcs if the current context is GLX.Eric Anholt2014-03-191-1/+0
| | | | | | | Fixes the GLX-only subtest of egl_and_glx_different_pointers. Now what remains is dispatch tables for when you're actively using both. Fixes #23
* Try to avoid looking up bootstrap functions in the wrong library.Eric Anholt2014-03-191-1/+0
| | | | Fixes the EGL-only subtest of egl_and_glx_different_pointers.
* Add a test for EGL and GLX returning different function pointers.Eric Anholt2014-03-195-75/+424
| | | | | This is the case on the nvidia binary driver's GL, or when you've got a system mixing nvidia binary GL and Mesa EGL.
* Import a copy of dlwrap from libfips.Eric Anholt2014-03-192-0/+310
| | | | This is just cworth's code, reindented for this project.
* Fix test build.Eric Anholt2014-03-171-2/+2
| | | | | I was initially planning on having a separate file of the overrides when I'd forgotten I couldn't rely on ELF symbol lookup.
* Catch eglBindAPI() failures in looking up bootstrap functions.Eric Anholt2014-03-171-2/+0
| | | | | | | | | | | | | This fixes crashes on ARM's Mali drivers, where desktop GL isn't supported, and epoxy didn't notice the error and tried to dlsym() on libGL.so.1. An alternative would have been to look at the response from eglQueryAPI() first, but that would have meant that we still need to BindAPI in the case that eglQueryAPI returns something like VG or CL, and so we needed to handle these errors regardless. Fixes #22
* Extend the egl_without_glx test for another quirk of the platform.Eric Anholt2014-03-172-6/+58
| | | | | | | | Epoxy dlsym()s directly into libEGL instead of using dlsym() on a NULL handle, so we can't relying on ELF resolution like we do for dlopen(). Instead, just override epoxy's function pointers for the functions epoxy will call in the process of getting one of these bootstrap functions.
* Fix a bad error message in an EGL test.Eric Anholt2014-02-061-1/+1
|
* Add missing '\n's to wgl test errors.Eric Anholt2014-02-061-2/+2
| | | | | Like some of the other missing '\n's, I'd originally used errx(), then just done a sed job to fprintf when I found that win32 lacked errx().
* Add a test that khrplatform.h (if present) agrees with us.Eric Anholt2014-02-065-0/+189
|
* List X11_LIBS after lib{egl,glx}_common.Matt Turner2014-02-011-10/+10
| | | | Fixes linking with --as-needed.
* Use LDADD instead of LDFLAGS/DEPENDENCIES.Matt Turner2014-02-011-22/+13
| | | | | | This is a lot shorter to type, and still gets the dependencies to work (tested with touch src/dispatch_common.c; make check, and touch src/egl_common.c; make check).
* Enable compiler warnings in the tests.Eric Anholt2014-01-311-0/+2
|
* Fix compiler warnings in the tests.Eric Anholt2014-01-315-16/+23
| | | | | I didn't have CWARNFLAGS in the Makefile.am, so lots of things that would generate warnings had crept in.
* Fix using epoxy on systems with only EGL and GLES1 or GLES2.Eric Anholt2014-01-311-2/+0
| | | | Fixes #19
* Test for using GLES1/2 without GLX installed.Eric Anholt2014-01-313-0/+132
|
* Make headerguards check for double-inclusion of our own headers.Eric Anholt2014-01-221-0/+4
| | | | | Since I was touching these bits, it was easy enough to make sure that our header guards work on our own headers.
* Fix copyrights on the Makefile.ams.Eric Anholt2013-12-161-16/+17
| | | | | | | When initially writing the Makefiles, I started from a Makefile.am that had ajax's copyright instead of an Intel one. The only line I can see that's left from the original Makefile.am is "pkgconfigdir" in the root Makefile.am.
* Fix testsuite build on OS X.Eric Anholt2013-12-161-1/+5
| | | | | There's no linker flag of this name in the normal clang, presumably beause the linker feature doesn't exist.