Commit Graph

124 Commits

Author SHA1 Message Date
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
Emmanuele Bassi
8ca47e3b20 build: Use the power of abs_builddir
When calling test-conformance to get the list of conformance tests.
2010-09-17 12:17:50 +01:00
Emmanuele Bassi
40af71fad7 build: List the units inside a file
This avoids trying to run test-conformance -l multiple times.
2010-09-13 02:10:35 +01:00
Emmanuele Bassi
32ea9702e6 build: Add XML files to the ignore blacklist 2010-09-08 17:50:38 +01:00
Emmanuele Bassi
fd6d6a93f1 build: Fix distcheck errors 2010-08-16 13:23:10 +01:00
Emmanuele Bassi
3142b15a9f build: Use maintainer-clean for the ignore files removal
Instead of distclean.
2010-08-15 18:42:54 +01:00
Emmanuele Bassi
c4913bfce9 Revert "build: Distclean generated ignore files"
Git ignore files are not dist'ed, so it's pointless to remove them on
distclean.

This reverts commit f14587aadc.
2010-08-15 18:33:10 +01:00
Emmanuele Bassi
f14587aadc build: Distclean generated ignore files 2010-08-13 18:35:35 +01:00
Emmanuele Bassi
a3bc2ebfa7 build: Make test-conform depend on Makefile changes 2010-08-13 18:32:10 +01:00
Emmanuele Bassi
7c412464c2 build: Generate the conformance/.gitignore file
Since we are generating a lot of files that we should ignore, we should
generate the Git ignore file as well.
2010-08-13 18:25:22 +01:00
Emmanuele Bassi
e888da2180 build: Split up the test-conformance SOURCES
Having different sections should make it easier to add new test units to
the build.
2010-08-13 18:15:01 +01:00
Emmanuele Bassi
a25cf14e97 Revert "clutter.modules: Remove deps on gir-repository"
This reverts commit 0ce9cf730b.

The commit contained unrelated changes
2010-08-13 18:12:43 +01:00
Emmanuele Bassi
0ce9cf730b clutter.modules: Remove deps on gir-repository
Keep it in the moduleset, but don't let Clutter depend on it.
2010-08-13 18:09:28 +01:00
Emmanuele Bassi
00eb71b89a conform: Move the Score test to the conformance suite
The interactive test for ClutterScore is really meant to be run as part
of the conformance test suite, so we should move it there.
2010-07-30 19:39:35 +01:00
Neil Roberts
cefc0e381b Add a conformance test for 3D textures
This creates a 3D texture with different colors on all of the images
and renders it using a VBO to verify that the texture coordinates can
select all of the images.
2010-07-13 14:29:02 +01:00
Neil Roberts
972c0c24f0 Add a conformance test for cogl_texture_{get_data,set_region}
This verifies that calling cogl_texture_get_data returns the same data
uploaded to the texture. The bottom quarter of the texture is replaced
using cogl_texture_set_region. It tries creating the texture with
different sizes and flags in the hope that it will hit different
texture backends.
2010-07-09 11:14:10 +01:00
Emmanuele Bassi
7d1445afca Restore the report on the conformance test suite
The report generation was broken by the split of the various test units;
also, we were using GTest in a way that's not really sanctioned by
upstream.

This commit tries to re-use the targets from GLib's Makefile rules while
compensating for our own set up.
2010-07-07 14:52:19 +01:00