1
0
Fork 0

* 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
This commit is contained in:
Robert Bragg 2008-11-10 18:52:50 +00:00
parent 803182d5c9
commit acff6d8196
5 changed files with 69 additions and 5 deletions

View file

@ -1,3 +1,52 @@
2008-11-10 Robert Bragg <robert@linux.intel.com>
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:
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 Robert Bragg <robert@linux.intel.com>
* 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 Neil Roberts <neil@linux.intel.com>
* tests/interactive/test-main.c (main): Allow more than two

View file

@ -27,5 +27,5 @@ Don't call clutter_init since that is handled in test-conform-common.c
Make sure you clean up *everything* you create. Noteable things you might miss
include timelines, behaviours, and all actors you add to the stage. This is important because otherwise you can cause cascading failures in other tests.
Use stage = clutter_stage_new () with a corresponding clutter_actor_destroy instead of clutter_stage_get_default ().
Be aware that to help avoid tests causing cascading side effects for other tests all children of the default stage are destroyed between tests.

View file

@ -11,7 +11,20 @@ void
test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture,
gconstpointer data)
{
/* const TestConformSharedState *shared_state = data; */
/* const TestConformSharedState *shared_state = data; */
ClutterActor *stage = clutter_stage_get_default ();
GList *actors = clutter_container_get_children (CLUTTER_CONTAINER (stage));
GList *tmp;
/* To help reduce leakage between unit tests, we destroy all children of the stage */
for (tmp = actors; tmp != NULL; tmp = tmp->next)
{
ClutterActor *leaked_actor = tmp->data;
if (g_test_verbose ())
g_print ("Freeing leaked actor %p\n", leaked_actor);
clutter_actor_destroy (leaked_actor);
}
}

View file

@ -71,7 +71,7 @@ test_pick (TestConformSimpleFixture *fixture,
state.pass = TRUE;
state.stage = clutter_stage_new ();
state.stage = clutter_stage_get_default ();
clutter_actor_set_size (state.stage, STAGE_WIDTH, STAGE_HEIGHT);
state.actor_width = STAGE_WIDTH / ACTORS_X;
@ -100,7 +100,6 @@ test_pick (TestConformSimpleFixture *fixture,
clutter_main ();
clutter_actor_destroy (state.stage);
if (g_test_verbose ())
g_print ("end result: %s\n", state.pass ? "FAIL" : "pass");

View file

@ -12,4 +12,7 @@ echo "NOTE: For debugging purposes, you can run this single test as follows:"
echo "$ libtool --mode=execute \\"
echo " gdb --eval-command=\"b $UNIT_TEST\" \\"
echo " --args ./test-conformance -p $UNIT_TEST_PATH"
echo "or:"
echo "$ env G_SLICE=always-malloc \\"
echo " libtool --mode=execute \\"
echo " valgrind ./test-conformance -p $UNIT_TEST_PATH"