summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix return value of shading language for GLES2.glslesEric Anholt2020-04-201-0/+2
| | | | | | | Throughout the mesa project we've been using 100 for GLES2's shading language. It was pretty clearly the intent here, but the clever inline detection of "am I parsing a GLSL version or a GL version string" forgot about GLSL 1.0.x, and thus returned 10.
* Add call convention to mock functioncrziter2020-02-251-1/+1
|
* Remove the autotools build system.Eric Anholt2019-11-262-216/+0
| | | | Meson has been out for a long time, is faster, and is simpler.
* Merge pull request #194 from centricular/meson-trivial-fixEmmanuele Bassi2019-09-091-1/+1
|\ | | | | meson: Don't build glx tests if x11 is disabled
| * meson: Don't build glx tests if x11 is disabledNirbheek Chauhan2018-10-281-1/+1
| | | | | | | | Fixes build failure when x11 is not found or disabled.
* | test: #define __EXTENSIONS__ on Solaris for strdup()Alan Coopersmith2019-09-082-0/+8
| | | | | | | | | | | | | | | | Needed to allow functions outside the original XPG3 standard to be visible in the Solaris headers when _XOPEN_SOURCE is defined and not set to a particular value. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* | test: Add unit tests for epoxy_gl_version() and epoxy_glsl_version().version-unit-testEric Anholt2018-11-013-0/+96
|/ | | | | | Based on a bug report I got on IRC. v2: Drop glx includes, add to automake.
* Merge pull request #182 from anholt/issue-181Emmanuele Bassi2018-06-182-0/+2
|\ | | | | Define _GNU_SOURCE for strdup()
| * Define _GNU_SOURCE for strdup()issue-181Emmanuele Bassi2018-06-182-0/+2
| | | | | | | | | | | | | | | | | | The strdup() function is available on uClibc if _XOPEN_SOURCE_EXTENDED is defined; since we're using _GNU_SOURCE elsewhere to enable extended libc features, and uClibc will set _XOPEN_SOURCE_EXTENDED if _GNU_SOURCE is set, let's use that. Closes #181
* | Add a CGL test for the Epoxy APIEmmanuele Bassi2018-06-042-0/+84
| | | | | | | | Just like the one we use for EGL.
* | Add a CoreGraphics OpenGL test for macOSEmmanuele Bassi2018-06-042-0/+77
|/ | | | | A basic test, to check that we're actually capable of working on macOS without GLX enabled.
* dlwrap: Add FBSD_1.0 version for FreeBSDTing-Wei Lan2018-05-051-1/+2
| | | | | This fixes dlwrap_real_dlsym on FreeBSD, but tests still fail because we currently don't have libglvnd.
* meson: Don't define _POSIX_C_SOURCE when dlvsym is foundTing-Wei Lan2018-05-041-1/+4
| | | | | | | | FreeBSD hides declarations of non-POSIX functions when POSIX macros, such as _POSIX_C_SOURCE or _XOPEN_SOURCE, is defined. This causes test/dlwrap.c to fail to compile because it uses dlvsym and asprintf. Fixes: #169
* test/glx_public_api_core: Fail softer if core contexts aren't availableAdam Jackson2018-04-301-0/+10
| | | | | | | | | | | | If you've built Mesa with --disable-texture-float, and try to run the tests against Xvfb, glx_public_api_core will fail: creating a direct context with llvmpipe will fail because you don't have ARB_texture_float, and the internal fallback to an indirect context will fail because indirect only supports through 1.4. So the server will throw GLXBadFBConfig at you to say "I don't support core contexts", which we should interpret as a skip not a failure. Signed-off-by: Adam Jackson <ajax@redhat.com>
* Remove the "EGL/GLX have different pointers" testsEmmanuele Bassi2018-04-123-300/+0
| | | | | | | The correct answer for systems with different EGL and GLX driver implementations is to use GLVND.` Closes #165
* autotools: check for dlvsymRoss Burton2018-03-121-4/+4
| | | | | | As per the previous commit, instead of assuming that Apple doesn't have dlvsym but everywhere else does, actually check for dlvsym() existing as that function is glibc-specific.
* meson: generalise build_apple to has_dlvsymRoss Burton2018-03-121-3/+6
| | | | | | | | | build_apple was introduced in 756dca as a proxy for the fact that Apple's libc doesn't have dlvsym(), which is glibc-specific so also isn't present in other libc implementations such as musl. Instead of detecting whether we are building for Apple or not, just probe the to see if we have dlvsym.
* test: Avoid egl_without_glx crash on NVIDIAJan Alexander Steffens (heftig)2018-03-081-6/+8
| | | | | The NVIDIA driver calls dlopen with NULL as filename; strcmp is not NULL-safe.
* tests: Add EGL test for Epoxy API1.5.0Emmanuele Bassi2018-02-243-0/+147
| | | | | | | We have a few public entry points that we ought to test properly. Using the EGL API is easier to set up a test case, so let's just do that.
* Allow building Epoxy without X11Emmanuele Bassi2018-02-231-2/+7
| | | | | | | | | Epoxy can be compiled with GLX and X11 native resources on EGL. We can disable the former, but the latter is always built in when enabling EGL support. Some platforms do not support X11 at all, so we need a way to disable X11 when configuring Epoxy.
* Include Xlib.h when using Xlib APIEmmanuele Bassi2018-02-231-0/+1
| | | | | | The common EGL testing code uses XOpenDisplay(), which means we need to explicitly include the Xlib.h header file, instead of relying on something else stringing it along.
* Merge pull request #143 from ikeydoherty/comp-warningsEmmanuele Bassi2018-02-2312-46/+50
|\ | | | | Fix printf family usage
| * Only use printf family when passing argumentsIkey Doherty2017-10-1912-45/+45
| | | | | | | | | | | | | | This avoids any unnecessary allocations when simply passing static strings to be printed onto stderr, and uses the simpler fputs mechanism. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
| * test: Fix trivial compiler warning in dlwrapIkey Doherty2017-10-191-1/+5
| | | | | | | | | | | | | | | | This mutes compiler warnings for `dlwrap.c` by ensuring we actually check the return status of the `asprintf` call. At this point in the test suite our possible failure here is only memory, so we'll abort. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
* | test: Fix respecting $(DLOPEN_LIBS)Michał Górny2018-02-221-2/+2
| | | | | | | | | | Fix two tests that are linking to -ldl directly to use DLOPEN_LIBS. This fixes failing test build on Gentoo/FreeBSD.
* | test: Fix dlwrap for glvndAdam Jackson2018-02-071-0/+1
|/ | | | | | | | | Add libOpenGL to the list of libraries we'll intercept. This is harmless if glvnd is not available as the dlopen(libOpenGL.so) will fail, but without this we can't intercept glGetString, which the egl_and_glx_different_pointers_glx test needs to be able to do. Signed-off-by: Adam Jackson <ajax@redhat.com>
* test: Fix dlwrap on aarch64Efraim Flashner2017-03-191-0/+1
| | | | dlsym on aarch64 has version GLIBC_2.17.
* Drop unnecessary inclusion of "config.h"Emmanuele Bassi2017-02-084-4/+1
| | | | | The WGL tests should not include "config.h", since we're trying to test the use of Epoxy, not its internals.
* Allow enabling and disabling GLX support, part IIEmmanuele Bassi2017-02-061-1/+6
| | | | | After doing this for Meson in commit fc014fa1, let's do the same dance for the Autotools build.
* Allow enabling and disabling GLX supportEmmanuele Bassi2017-02-061-1/+1
| | | | | | | | | | | | | | | | | Currently, GLX support in libepoxy at build time is hard coded, but various platforms have expressed their preference for having a configure-time option for it. For instance: - various embedded distributors do not ship with X11, but wish to use libraries that depend on libepoxy now that Wayland is available - distributors for macOS still wish to retain the ability to ship their software with X11 enabled By default, we want epoxy to build with GLX enabled pretty much everywhere it makes sense, since it's only a build-time option and it's not a run-time dependency.
* 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.