Commit Graph

140 Commits

Author SHA1 Message Date
Emmanuele Bassi
fa72540246 build: Ensure tests are built only on make check
Tests should only be enabled when we want to run them, or when we are
generating a tarball.
2013-08-19 23:22:38 +01:00
Emmanuele Bassi
edb6e66d90 build: Fix distcheck for conformance tests
We need to export G_TEST_SRCDIR and G_TEST_BUILDDIR if we want to be
able to build the path to the tests data.
2013-07-10 12:31:32 +01:00
Emmanuele Bassi
52e0ec92b7 build: Remove the wrappers directory on clean 2013-07-04 15:48:39 +01:00
Emmanuele Bassi
575b77210b build: Add *.test pattern to the ignored files list 2013-07-03 13:08:26 +01:00
Emmanuele Bassi
3dad01ac22 conform: Drop the Cogl tests
Cogl has its own (way, way better) test suite these days, so we can drop
our own units here.
2013-07-02 22:36:11 +01:00
Emmanuele Bassi
4a05ac34fc build: Disable Cogl deprecation warnings for tests
We are exercising all sorts of deprecated API anyway.
2013-07-02 22:26:49 +01:00
Matthias Clasen
e98f32b7c8 Install conformance tests
Install the conformance tests, and metadata to run them
with gnome-desktop-testing-runner.

https://bugzilla.gnome.org/show_bug.cgi?id=702941
2013-06-23 23:28:19 -04:00
Emmanuele Bassi
caf6959195 conform: Add suite for actor's meta objects 2013-06-12 10:04:32 +01:00
Emmanuele Bassi
323ec19dcc build: Remove INCLUDES directives
They have been deprecated for a while, replaced by AM_CPPFLAGS.
2013-05-15 15:18:13 +01:00
Emmanuele Bassi
c9583792cb build: Fix up the silent rules prefixes
Automake increased the whitespace, so we need to do that for our "I
Can't Believe It's Not Autotool™" rules.
2013-05-15 15:07:15 +01:00
Lionel Landwerlin
d1041e1f4f conform: add offscreen effects fbo size check
https://bugzilla.gnome.org/show_bug.cgi?id=699675
2013-05-15 14:58:46 +01:00
Emmanuele Bassi
41ed9023eb build: Fix out of tree builds 2012-07-30 12:33:24 +01:00
Emmanuele Bassi
4546f84408 timeline: Add support for step() progress
The CSS3 Transitions specification from the W3C defines the possibility
of using a parametrized step() timing function, with the following
prototype:

        steps(n_steps, [ start | end ])

where @n_steps represents the number of steps used to divide an interval
between 0 and 1; the 'start' and 'end' tokens describe whether the value
change should happen at the start of the transition, or at the end.

For instance, the "steps(3, start)" timing function has the following
profile:

  1 |           x
    |           |
    |       x---|
    |       '   |
    |   x---'   |
    |   '       |
  0 |---'       |

Whereas the "steps(3, end)" timing function has the following profile:

  1 |       x---|
    |       '   |
    |   x---'   |
    |   '       |
    x---'       |
    |           |
  0 |           |

Since ClutterTimeline uses an enumeration for controlling the progress
mode, we need additional API to define the parameters of the steps()
progress; for this reason, we need a CLUTTER_STEPS enumeration value,
and a method for setting the number of steps and the value transition
policy.

The CSS3 Transitions spec helpfully also defines a step-start and a
step-end shorthands, which expand to step(1, start) and step(1, end)
respectively; we can provide a CLUTTER_STEP_START and CLUTTER_STEP_END
enumeration values for those.
2012-07-19 20:47:00 -04:00
Emmanuele Bassi
aacd28cc21 conform: Initial suite for ClutterInterval
ClutterInterval is undertested, so we should start adding a unit test
for it.
2012-06-18 18:04:54 +01:00
Frédéric Péters
a88f73091b tests: link test-conformance against libm
https://bugzilla.gnome.org/show_bug.cgi?id=677921
2012-06-15 15:30:24 +01:00
Tomeu Vizoso
b339b845cb tests: Add unit test for touch event handling
For now, it just generates a simple horizontal slide (by writing
to /dev/uinput) and checks that the stage gets the events at the
expected coordinates.

The test won't run if it doesn't have read/write permissions to
/dev/uinput.

It also adds OS_LINUX to config.h.
2012-06-07 12:12:56 +02:00
Emmanuele Bassi
de90be9586 build: Remove maintainer flags from test build
Part of the test infrastructure relies on relaxed build conditions, so
there's no point to enforce the anal retentive maintainer flags.
2012-03-07 12:36:43 +00:00
Neil Roberts
762e0de2c6 tests: Remove test-cogl-pixel-buffer
This has been converted to a Cogl-based test in the cogl source tree
so there is no need to maintain it here anymore.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-05 19:45:10 +00:00
Emmanuele Bassi
4e6ff76a77 conformance: Clean up
Remove the last inconsistent bits.
2012-02-27 13:08:31 +00:00
Emmanuele Bassi
60e2f8ed5b conformance: Rename the source files
It's the conformance test suite: there's no need to namespace the files,
just like there's no need to namespace the units.

This commit does not change the Cogl tests: they will be moved to Cogl
over time, and it's easier to do if we leave them as they are.
2012-02-27 13:02:01 +00:00
Emmanuele Bassi
d16f2ac3b5 conform: Clean up test names
Drop the 'test-' prefix: it's the conformance test suite, we know it's
full of tests.
2012-02-27 12:54:23 +00:00
Neil Roberts
0f04a1cd11 tests: Remove conformance tests that have been ported to Cogl
A lot of the conformance tests that were just testing Cogl
functionality have been ported to be standalone Cogl tests in the Cogl
source tree. This patch removes those from Clutter so we don't have to
maintain them in two places.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:18 +00:00
Emmanuele Bassi
58ffcfb10e actor: Add ClutterActorIter
Iterating over children and ancestors of an actor is a relatively common
operation. Currently, you only have one option: start a for() loop, get
the first child of the actor, and advance to the next sibling for the
list of children; or start a for() loop and advance to the parent of the
actor.

These operations can be easily done through the ClutterActor API, but
they all require going through the public API, and performing multiple
type checks on the arguments.

Along with the DOM API, it would be nice to have an ancillary, utility
API that uses an iterator structure to hold the state, and can be
advanced in a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
419a6a38f2 conform: Add a suite for the Actor scene graph API
Verify that insertion and removal maintain a stable graph, with pointers
to the various children. This should help out tracking regressions in
the scene graph API.
2012-01-16 23:37:10 +00:00
Emmanuele Bassi
8c2118542c conform: Begin a test suite for layout options
A simple sampling check to validate that we're painting the right thing
at the right place.
2012-01-16 23:35:14 +00:00
Chun-wei Fan
075ab0cbe6 conform/Makefile.am: Update Win32 test .bat name
Rename to test-conformance-clutter.bat to make the file name clearer to
users
2011-12-07 18:14:17 +08:00
Emmanuele Bassi
a13b095dc2 build: Fix distcheck 2011-11-22 13:53:08 +00:00
Emmanuele Bassi
73e7404652 build: Clean up the VS build rules
Some minor cleanups of the Visual Studio rules in the interactive and
conformance test suites.
2011-11-18 15:12:45 +00:00
Chun-wei Fan
2a86ecc4b9 Update interactive/conformance .bat names
Add a -clutter suffix to avoid confustion with others, such as COGL.
2011-11-15 16:19:06 +08:00
Chun-wei Fan
bb9e452a36 Merge branch 'master' into msvc-support-master 2011-11-07 11:42:16 +08:00
Emmanuele Bassi
a09bbffd92 Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.

This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.
2011-11-03 13:45:19 +00:00
Chun-wei Fan
098a83af9e test-[interactive/conformance].bat: Update .exe name 2011-10-20 17:26:55 +08:00
Chun-wei Fan
a36ab5787b Rename conform/interactive tests VS projects
Add a -clutter suffix for their project names to avoid clashes with the
COGL test executables
2011-10-20 16:35:38 +08:00
Chun-wei Fan
b1780711f7 Merge branch 'master' into msvc-support-master 2011-10-17 15:52:57 +08:00
Emmanuele Bassi
96cb1d7128 Disable deprecation warnings for the test suite
We test deprecated functionality as well as current one, so we need to
enable all symbols and disable the deprecation warnings.
2011-10-13 17:50:25 +01:00
Chun-wei Fan
b55656b698 Merge branch 'master' into msvc-support-master 2011-10-06 12:04:30 +08:00
Neil Roberts
3372a0233e Add a conformance test for ClutterShaderEffect
This adds a simple conformance test which sets up a few shader effects
using both the old style with clutter_shader_effect_set_source and the
new style by overriding get_static_shader_source. The effects are then
verified to confirm that they drew the right pixel colour.

https://bugzilla.gnome.org/show_bug.cgi?id=660512

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-09-30 11:51:38 +01:00
Chun-wei Fan
9f12ec534e msvc-support: Recover wrecked branch
Recover the branch! :|
2011-09-16 17:25:47 +08:00
Philippe Normand
301551aacf tests: initial support for cally-text conform tests 2011-07-26 15:30:09 +02:00
Neil Roberts
2a09a04c2a Add a conformance test for the offscreen-redirect property
This adds a conformance test for redirecting offscreen. It verifies
that the redirected actor has the right paint opacity, that it gets
redrawn only when the image cache needs to be invalidated and that it
ends up with the right appearance.
2011-05-13 01:46:32 +01:00
Samuel Degrande
4594d1bafe Removes the addition of the .exe extension to unit-test scripts, on win32.
On win32, test scripts are created with a .exe extension.
Under mingw, a .exe script is launched in 16 bit compatibility mode (through
ntvdm), and so it just does not run.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2619
2011-04-01 17:08:25 +01:00
Neil Roberts
daa6d67cc0 Add a conformance test for atlas migration
This adds a conformance test which creates a lot of textures with
increasing size and destroys them again a number of times in order to
cause a few atlas migrations. The last time the textures are created
they are all read back and the data is verified to confirm that the
atlas migration successfully preserved the data.
2011-02-24 20:45:30 +00:00
Neil Roberts
98a33e03d3 Add a conformance test for cogl_pipeline_set_layer_matrix
This adds a conformance test which paints using a pipeline that has
two layers containing textures. Each layer has a different user
matrix. When the two layers are combined with the right matrices then
all of the colors end up white. The test then verifies this by reading
back the pixels.
2011-02-09 16:14:12 +00:00
Neil Roberts
9c32d07453 Add a conformance test that uses a vertex shader with no frag shader
This creates a material which users a layer to override the color of
the rectangle. A simple vertex shader is then created which just
emulates the fixed function pipeline. No fragment shader is
added. This demonstrates a bug where the layer state is getting
ignored when a vertex shader is in use.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2221
2010-11-24 18:06:44 +00:00
Neil Roberts
8112bfc49f Replace the disable-npots tool with a COGL_DEBUG option
Previously in the tests/tools directory we build a disable-npots
library which was used as an LD_PRELOAD to trick Cogl in to thinking
there is no NPOT texture extension. This is a little awkward to use so
it seems much simpler to just define a COGL_DEBUG option to disable
npot textures.
2010-11-05 18:45:31 +00:00
Neil Roberts
a53c9dafb5 Add a conformance test for the CoglPrimitive convenience constructors
This adds a simple conformance test which calls all of the convenience
constructors for CoglPrimitive.
2010-11-04 17:59:33 +00:00
Emmanuele Bassi
b5bbdd6cec build: Add test wrappers to the main ignore file
They are generated at configure time, so it's a good idea to have them
in the main ignore file instead of adding them to the built ignore files
under tests.
2010-10-19 11:03:13 +01:00
Emmanuele Bassi
b5d5b9628e conform: Implement TEST_CONFORM_TODO() correctly
The TODO() macro for adding new tests to the test suite has always meant
to be implemented like the TODO block in Test::More, i.e. a test that is
assumed to fail, and which warns if it unexpectedly succeeds.

Since GTest lacks the expressivity of Test::More, the implementation
just verifies that the tests marked as TODO actually fail, and will fail
if they happen to succeed - at which point the developer will have to
change the macro to SIMPLE or SKIP.
2010-10-12 17:11:52 +01:00
Emmanuele Bassi
2a23bab819 conform: Save the revision and date inside the test report
Even if gtester-report doesn't use that information (yet), we should
store the revision of Clutter that generated the report, and the date in
which the test suite was ran.
2010-10-12 15:44:57 +01:00
Neil Roberts
7fd6273c25 tests: Generate the stub scripts using sed
Instead of trying to run ./test-conformance with the -l option to
generate a list of available tests it now runs sed on the
test-conform-main.c file instead. Running the generated executable is
a pain for cross-compiling so it would be nice to avoid it unless it's
absolutely necessary. Although you could tell people who are cross
compiling to just disable the conformance tests, this seems a shame
because they could still be useful along with the wrappers for example
if the cross compile is built to a shared network folder where the
tests can be run on the actual device.

The sed script is a little more ugly than it could be because it tries
to avoid using the GNU extensions '\+' and '\|'.

The script ends up placing restrictions on the format of the C file
because the tests must all be listed on one line each. There is now a
comment to explain this. Hopefully the trade off is worth it.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2363
2010-10-12 15:24:32 +01:00