Age | Commit message (Collapse) | Author | Files | Lines |
|
All unittests have now been moved into separate executables, one
executable per unit.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Pull the unittests for wcore_error out of the waffle-unittest
executable and place them into a new separate executable,
'tests/wcore_error_unittests'.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Pull the unittests for wcore_config_attrs out of the waffle-unittest
executable and place them into a new separate executable,
'tests/wcore_config_attrs_unittests'.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Pull the unittests for wcore_attrib_list out of the waffle-unittest
executable and place them into a new separate executable,
'tests/wcore_attrib_list_unittests'.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This moves the waffle_test sources into a more canonical location.
Instead of keeping it jailed as a subdir of 'tests' as
'tests/waffle_test', its source is now in 'src/waffle_test' and its
public headers in 'include/waffle_test'.
Keeping things in canonical locations makes it easier to find things if
you don't yet know where they reside.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
By moving 'check' to the top dir, each subdirectory can now add
dependencies to 'check'. Ditto for 'check-func'.
This change will allow us to build each unittest file as a separate
executable, as well as maintain the CMake rules for the unittest in in
the same directory as its sources.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This is required before actually marking any API as experimental to
prevent the build from breaking.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
|
|
A recent commit added to CGL better support for handling requested
context flavors. So, we should now do the same degree of testing of
context flavors on CGL that we do for all the other platforms.
Test all OpenGL context versions 1.0 through 3.1; and core and
compatibility profile 3.2 through 4.3.
chadv: Tested on Mac OS 10.7 Lion.
CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The order which test functions are defined should match the order listed
in ${platform}_testsuite.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This macro controls the API exposed by Waffle's headers. Use it to guard
the new API added in waffle 1.3.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The order which test functions are defined should match the order listed
in ${platform}_testsuite.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add the following tests. Tests marked with '*' were validated on
Mesa 9.3.0-devel (git-24765c5) with Intel Ivybridge.
gl_basicl.cgl_gl_debug_is_unsupported
gl_basicl.glx_gl_debug *
gl_basicl.wayland_gl_debug *
gl_basicl.x11_egl_gl_debug *
Dont' add any tests for OpenGL ES debug contexts, because Mesa's GLX and
EGL do not correctly handle requests OpenGL ES debug contexts.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add the following tests. Tests marked with '*' were verified with
Mesa 9.3.0-devel (git-24765c5).
cgl_gl_fwdcompat_bad_attribute
for platform in [glx, wayland, x11_egl]:
${platform}_gl21_fwdcompat_bad_attribute *
${platform}_gl30_fwdcompat *
${platform}_gl31_fwdcompat *
${platform}_gl32_core_fwdcompat
${platform}_gles1_fwdcompat_bad_attribute *
${platform}_gles2_fwdcompat_bad_attribute *
${platform}_gles3_fwdcompat_bad_attribute *
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
If gl_basic_draw was called with .expect_unsupported=true, then the test
passed only if waffle_config_choose() emitted
WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM. Future tests will need to also
check for WAFFLE_ERROR_BAD_ATTRIBUTE, so let's generalize by replacing
the .expect_unsupported with .expect_error.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
By using default function arguments, we avoid updating every call to
gl_basic_draw() when adding new tests. This will make it easier to add
tests for forward-compatible contexts.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add new module WaffleDefineOS that defines booleans `waffle_on_linux`
and `waffle_on_mac`. Replace each check on CMAKE_SYSTEM_NAME with
a check on one of these new bools.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
They were defined in the toplevel CMakeLists.txt. Move them to
`tests/CMakeLists.txt.`
This change belongs to a series that cleans up the toplevel CMakeLists
by decomposing it.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Update waffle_attrib_list unittests to become wcore_attrib_list unittests.
If possible, we should avoid unittesting public API.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
That is, declare all loop iterators like this:
for (int i = 0; ...)
rather than:
int i;
...
for (i = 0; ...)
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
for platform in [glx, x11_egl, wayland]:
Add test gl_basic.$platform_gles3_rgb
Add test gl_basic.$platform_gles3_rgba
Add test gl_basic.$platform_gles30
Tested against Mesa 9.1-devel. All tests skip.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
for platform in [glx, x11_egl, wayland]:
// Add pre-profile OpenGL tests
for version in 10..31:
gl_basic.$platform_gl$version
// Add post-profile OpenGL tests
for version in 32..43:
for profile in [core, compat]:
gl_basic.$platform_gl$version_$profile
// Add OpenGL ES1 tests
gl_basic.$platform_gles10
gl_basic.$platform_gles11
// Add OpenGL ES2 test
gl_basic.$platform_gles20
Tested against:
- Mesa 9.1-devel with Intel Sandybridge, which supports GL <= 3.1, GLES1,
and GLES2.
- Xorg 1.12, which lacks GLX_ARB_create_context and
GLX_EXT_create_context_es*_profile.
All GLX, XEGL, and Wayland tests pass or skip as expected.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
If context creation fails due to WAFFLE_ERROR_UNKNOWN,
then assume that the native platform rejected the requested context flavor
and skip the test.
Waffle should really be emitting WAFFLE_ERROR_NATIVE in those situations,
but that error code doesn't exist yet.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add to new parameters to gl_basic_draw(), context_version and
context_profile. If the value of each param is WAFFLE_DONT_CARE, then it
is ignored.
This patch changes no behavior.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Replace the array literal with a sequence of array assignments like
`attrib_list[i++] = x`. This will provide more flexibility in a future
commit.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add tests:
gl_basic.cgl_gles1_unsupported
gl_basic.cgl_gles2_unsupported
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Replace tests
gl_basic.glx_gles1_rgb
gl_basic.glx_gles1_rgba
with
gl_basic.glx_gles1_unsupported
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add a new param to gl_basic_draw, `bool expect_config_unsupported`. This
refactor should change no behavior, because all calls to gl_basic_draw set
expect_config_unsupported=false.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The gl_basic testsuite can never pass if the gbm tests are run.
When a display manager, such as X or Weston, owns the drm device, it's
impossible to run the gbm tests as non-root. This makes `check-func`
always fail. It's possible to run the gbm tests as a normal user if no
display manager currently owns drm, but then the other tests fail.
Until we find a better solution for gbm initialization, it's best to leave
the gbm tests out and just manually tests it with `examples/gl_basic`.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
All routines in this skeleton will fail.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The unittest executable needs access to waffle's internal symbols. Yet, the
sources in libwaffle.so will soon be compiled with -fvisibility=hidden.
One solution is to additionally build a static libwaffle and let the
unittest executable link to that. Visibility options do not apply to static
libraries; that is, all symbols are public and hence available to the unit
tests.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Now all internal includes consistently use `#include "..."`.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Replace all includes of form
#include <waffle/waffle_${x}.h>
wth
#include "waffle_${x}.h"
Note: This prepares for the 1.0 release.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Define variable waffle_libname. Replace all references to the hardcoded
libname "waffle" with ${waffle_libname}.
In the 1.0 release, the libname will be "waffle-1". This will allow
multiple major versions of Waffle to be installed in parallel.
Note: This prepares for the 1.0 release.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The new name is more clearly conveys the error meaning than the old name,
WAFFLE_ERROR_UNSUPPORTED.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
For consistency, rename each token in `enum waffle_error` with the prefix
WAFFLE_ERROR. The exception is WAFFLE_NO_ERROR, which is not renamed.
This changes follows the precedent of Wayland, and makes it much easier to
grep for error cases.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Move each unit test sourcefile into the same directory as the
implementation sourcefile. For example, the wcore_error_unittest.c is now
located at $WAFFLE_TOP/src/waffle/core/wcore_error_unitttest.c.
The likelihood that a developer will write new tests is proportional to
the proximity of the test sources to the implementation sources.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
This reverts commit 08b16e9fe244cab2d8a8161616c85c2a72afa1c1.
The reverted commit was a silly mistake. The header was in fact used,
and its removal broke the Apple build.
|
|
I accidentally commited this when adding Apple support to gl_basic_test.c.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Jordan Justen brought to my attention that, according to the Apache and
GNU websites, Apache 2.0 is incompatible with GPLv2 because GPLv2 lacks
a patent indemnification clause. (It is compatible with GPLv3, however).
See [1] [2] [3].
By the same logic, a lawyer could argue that Apache 2.0 is also
incompatible, in one direction only, with minimal gift licenses such as
BSD and MIT.
I do not want license incompatibility to prevent any project from using
Waffle's code, so I'm converting the project to use the most liberal
license possible, BSD 2-clause [4].
[1] http://www.apache.org/licenses/GPL-compatibility.html
[2] http://www.gnu.org/licenses/license-list.html#apache2
[3] http://en.wikipedia.org/wiki/Apache_License#GPL_compatibility
[4] http://www.opensource.org/licenses/bsd-license.php
CC: Jordan Justen <jljusten@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Add tests:
gl_basic.cgl_init
gl_basic.cgl_gl
The tests were verified to pass on MacOS 10.7.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
With X11 backend waffle fails to create window for egl config with
alpha. The problem is 32 bit X visual (id 0x66) that is special
composite translucent visual. As mesa only support alpha bit with
translucent window waffle choose config with the problematic visual.
Does waffle provide application control to select between opaque and
translucent window even if selecting config with alpha bit?
Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
GLX and EGL need rgba_size. CGL needs rgb_size.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
The name color_buffer_size was ambiguous. Is alpha included?
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
If XOPEN_SOURCE is defined on MacOS, then string.h does not define
strdup(). This is the opposite behavior that occurs on Linux.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
MacOS doesn't support pthread_barrier_t. The replacement is in test
wcore_error.thread_local.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|
|
Number 3 was hard-coded in multiple places. Replace it with NUM_THREADS.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
|