Commit Graph

266 Commits

Author SHA1 Message Date
Neil Roberts
596d4628e6 Add a wrapper library to help testing without NPOTs.
* tests/tools/Makefile.am: Optionally build the
	libdisable-npots.la library depending on whether libdl was
	detected in the configure script. A helper script is also
	generated to setup the LD_PRELOAD.

	* tests/conform/Makefile.am: There are now two versions of the
	test-report and full-report rules. test-report-normal is the same
	as before and test-report-disable-npots runs the tests with the
	disable-npots wrapper script. The full-report rule runs both of
	them and displays two separate HTML files. The test-report rule
	just runs the normal version as before.

	* configure.ac: Add a test for libdl

	* tests/tools/disable-npots.sh.in: New file. Template for the
	helper script

	* tests/tools/disable-npots.c: New file
2008-11-24 15:44:16 +00:00
Neil Roberts
fccc087959 * tests/interactive/Makefile.am:
* tests/conform/Makefile.am: Use $(EXEEXT) when specifying a
	dependency on an executable otherwise there won't be a rule to
	build it on Windows.
2008-11-21 16:18:47 +00:00
Neil Roberts
7324db4a0c * tests/conform/test-timeline.c (test_timeline): Remove the delay
idle handler after the test is finished, otherwise it will
	continue running during subsequent tests. This was breaking
	test_timeline_interpolate.
2008-11-18 18:30:55 +00:00
Emmanuele Bassi
ab9464b33d 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-conform-main.c (main): Do not run the
	conformance test suite if we are on X11 but we do not have
	a DISPLAY available. Some of the tests require a DISPLAY,
	and everything passes through a clutter_init() call which will
	fail anyway. If we are running make distcheck on an headless
	box we might as well just skip the conformance test suite
	without a meaningless error.
2008-11-18 13:06:02 +00:00
Emmanuele Bassi
7a6353b971 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-mesh-contiguous.c:
	* tests/conform/test-mesh-interleved.c:
	* tests/conform/test-mesh-mutability.c: Remove the last bare
	g_print() from the conformance test suite.
2008-11-18 12:54:34 +00:00
Neil Roberts
33a67bc299 * tests/conform/test-pick.c (test_pick): The final result message
when --verbose is used was the wrong way around
2008-11-18 12:36:27 +00:00
Neil Roberts
56fa77a5db * tests/conform/test-conform-main.c (main): Fixed a typo in the
name of the path for test_realized.
2008-11-18 12:16:00 +00:00
Robert Bragg
3d2a1e2d81 Gets the mesh API working with GLES2
* clutter/cogl/common/cogl-mesh.c:
	Make sure we use the appropriate cogl_wrap_gl* funcs as appropriate

	* clutter/cogl/gles/cogl-gles2-wrapper.c
	* clutter/cogl/gles/cogl-gles2-wrapper.h:
	In our glColorPointer wrapper we needed to mark our color attribute
	as normalized.

	* tests/conform/Makefile.am:
	When creating unit test symlinks we use the -l gtester option to
	list tests, but when using the PVR SDK the test binary also spews
	out some extra info that caused lots of random symlinks to be
	created. We now grep for lines starting with a '/'

	* tests/conform/test-mesh-contiguous.c
	* tests/conform/test-mesh-mutability.c:
	Use cogl_set_source_color instead of directly calling glColor4ub
2008-11-13 14:28:16 +00:00
Emmanuele Bassi
1456949193 2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
	* tests/conform/test-conform-main.c:
	* tests/conform/test-paint-opacity.c: Add test unit for label,
	rectangle and paint opacity.
2008-11-12 14:41:01 +00:00
Neil Roberts
1fd2156a99 Fix warnings in mesh tests
* tests/conform/test-mesh-mutability.c (on_paint):
	* tests/conform/test-mesh-interleved.c (on_paint):
	* tests/conform/test-mesh-contiguous.c (on_paint): Use g_usleep
	instead of sleep

	* tests/conform/test-mesh-mutability.c (queue_redraw):
	* tests/conform/test-mesh-interleved.c (queue_redraw):
	* tests/conform/test-mesh-contiguous.c (queue_redraw): Added
	missing return statement

	* clutter/cogl/cogl-mesh.h: Add a declaration for
	cogl_mesh_submit

	* clutter/cogl/common/cogl-mesh.c (cogl_mesh_submit): Move the
	documentation to cogl-mesh.h to match the rest of the functions
2008-11-12 10:55:06 +00:00
Robert Bragg
16897e0729 Bug 1164 - Implements the proposed Mesh API
* clutter/cogl/cogl-mesh.h
	* clutter/cogl/cogl-types.h
	* clutter/cogl/cogl.h.in
	* clutter/cogl/common/Makefile.am
	* clutter/cogl/common/cogl-mesh-private.h
	* clutter/cogl/common/cogl-mesh.c
	* clutter/cogl/gl/cogl-context.c
	* clutter/cogl/gl/cogl-context.h
	* clutter/cogl/gl/cogl-defines.h.in
	* clutter/cogl/gl/cogl.c
	* clutter/cogl/gles/cogl-context.c
	* clutter/cogl/gles/cogl-context.h
	* doc/reference/cogl/cogl-docs.sgml
	* doc/reference/cogl/cogl-sections.txt:
	The Mesh API provides a means for submitting an extensible number of
	per vertex attributes to OpenGL in a way that doesn't require format
	conversions and so that the data can be mapped into the GPU (in vertex
	buffer objects) for - hopefully - fast re-use.

	There are a number of things we can potentially use this API for, but
	right now this just provides a foundation to build on. Please read
	the extensive list of TODO items in cogl-mesh.c for examples.

	Please refer to the cogl-mesh section in the reference manual for
	documentation of the API.

	* tests/conform/Makefile.am
	* tests/conform/test-conform-main.c
	* tests/conform/test-mesh-contiguous.c
	* tests/conform/test-mesh-interleved.c
	* tests/conform/test-mesh-mutability.c:
	Privides basic coverage testing for the mesh API.
2008-11-10 18:53:14 +00:00
Robert Bragg
acff6d8196 * tests/conform/ADDING_NEW_TESTS
* tests/conform/test-conform-common.c
	* tests/conform/test-pick.c:
	Instead of using clutter_stage_new /clutter_actor_destroy as a way to
	avoid cascading side effects between unit tests, due to left over
	actors, we now destroy all children of the default stage between
	tests instead.

	* tests/conform/wrapper.sh:
	Adds a convenience note about how to run valgrind for an individual
	unit test
2008-11-10 18:52:50 +00:00
Emmanuele Bassi
ca7bdc12a4 2008-11-10 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-label-cache.c:
	* tests/conform/test-pick.c:
	* tests/conform/test-timeline.c: Show all the output messages only
	if the test was done with the verbose flag turned on.

	* tests/interactive/test-main.c: Do not use the (gpointer*) cast,
	but use a temporary gpointer instead.
2008-11-10 12:28:42 +00:00
Robert Bragg
98f942fd72 * tests/conform/Makefile.am:
* tests/conform/wrapper.sh:
	* tests/conform/test-conform-main.c:
	* tests/conform/test-timeline.c:
	Adds Neil's updates to test-timeline.c so it now works with the new unit
	testing infrastructure.

	Also some fixes to ensure wrappers get setup correctly for the timeline
	tests.

	* tests/interactive/test-main.c:
	cast the symbol return pointer as (gpointer *) to avoid warning

	* tests/conform/test-pick.c:
	g_assert that the test passes, instead of using exit()

	* test/conform/ADDING_NEW_TESTS:
	Fixes a silly typo
2008-11-10 11:48:00 +00:00
Emmanuele Bassi
d4573ba10c 2008-11-08 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
	* tests/conform/test-actor-invariants.c:
	* tests/conform/test-conform-main.c: Move the actor invariants
	unit to the conform section of the test suite.

	* tests/interactive/Makefile.am:
	* tests/interactive/test-entry-auto.c:
	* tests/interactive/test-invariants.c: Remove the entry-auto
	and invariants test, since those two belong to the conform
	section.
2008-11-08 15:56:22 +00:00
Robert Bragg
603f936745 Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing
framework

	* configure.ac:
	* tests/*:
	The tests have been reorganised into different categories: conformance,
	interactive and micro benchmarks.
	- conformance tests can be run as part of automated tests
	- interactive tests are basically all the existing tests
	- micro benchmarks focus on a single performance metric

	I converted the timeline tests to conformance tests and also added some
	tests from Neil Roberts and Ebassi.

	Note: currently only the conformance tests use the glib test APIs,
	though the micro benchmarks should too.

	The other change is to make the unit tests link into monolithic binaries
	which makes the build time for unit tests considerably faster. To deal
	with the extra complexity this adds to debugging individual tests I
	have added some sugar to the makefiles so all the tests can be run
	directly via a symlink and when an individual test is run this way,
	then a note is printed to the terminal explaining exactly how that test
	may be debugged using GDB.

	There is a convenience make rule: 'make test-report', that will run all
	the conformance tests and hopefully even open the results in your web
	browser. It skips some of the slower timeline tests, but you can run
	those using 'make full-report'
2008-11-07 19:32:28 +00:00