Install the conformance tests, and metadata to run them
with gnome-desktop-testing-runner.
https://bugzilla.gnome.org/show_bug.cgi?id=702942
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 53f3eb421239982b69569ad03ccbfa4b4f601cf3)
This adds a white-box unit test that verifies that GL_BLEND is disabled
when drawing an opaque rectangle, enabled when drawing a transparent
rectangle and then disabled again when drawing a transparent rectangle
but with a blend string that effectively disables blending.
This shares the test utilities and launcher infrastructure we are using
for conformance tests so we get consistent reporting and so unit tests
will be run against a range of different drivers.
This adds a --enable-unit-tests configure option which is enabled by
default but if disabled will make all UNIT_TESTS() into static inline
functions that we should expect the compiler to discard since they won't
be referenced by anything.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9047cce06bbf9051ec77e622be2fdbb96ed767a8)
cogl-handle.h was being listed in the sources but it has been removed
so the dist would not work.
Also the micro-perf directory under tests was not listed in
DIST_SUBDIRS so it would be skipped.
This patch was written by Rico Tzschichholz.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit fb96716aaffd72a00461ce4dd8496904de0bb1ff)
This makes the test-cogl-perf test from clutter into a standalone Cogl
benchmark.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 1684a040b238ebae140e827f4003f2d2867c04f3)
This patch reworks our conformance testing framework because it seems
that glib's gtesting framework isn't really well suited to our use case.
For example we weren't able to test windows builds given the way we
were using it and also for each test we'd like to repeat the test
with several different environments so we can test important driver and
feature combinations.
This patch instead switches away to a simplified but custom approach for
running our unit tests. We hope that having a more bespoke setup will
enable us to easily extend it to focus on the details important to us.
Notable changes with this new approach are:
We can now run 'make test' for our mingw windows builds.
We've got rid of all the test-*report* make rules and we're just left
with 'make test'
'make test' now runs each test several times with different driver and
feature combinations checking the result for each run. 'make test' will
then output a concise table of all of the results.
The combinations tested are:
- OpenGL Fixed Function
- OpenGL ARBfp
- OpenGL GLSL
- OpenGL No NPOT texture support
- OpenGLES 2.0
- OpenGLES 2.0 No NPOT texture support
Reviewed-by: Neil Roberts <neil@linux.intel.com>
This makes a start on porting the Cogl conformance tests that currently
still live in the Clutter repository to be standalone Cogl tests that no
longer require a ClutterStage.
The main thing is that this commit brings in is the basic testing
infrastructure we need, so now we can port more and more tests
incrementally.
Since the test suite wants a way to synchronize X requests/replies and
we can't simply call XSynchronize in the test-utils code before we know
if we are really running on X this adds a check for an environment
variable named "COGL_X11_SYNC" in cogl-xlib-renderer.c and if it's set
it forces XSynchronize (dpy, TRUE) to be called.
By default the conformance tests are run off screen. This makes the
tests run much faster and they also don't interfere with other work you
may want to do by constantly stealing focus. CoglOnscreen framebuffers
obviously don't get tested this way so it's important that the tests
also get run on screen every once in a while, especially if changes are
being made to CoglFramebuffer related code. On screen testing can be
enabled by setting COGL_TEST_ONSCREEN=1 in your environment.