tests: abort if clutter_init fails

This fixes segfaults when something goes wrong during
init, but the test keeps going anyway.

Except for test-easing and test-picking, these were fixed by
sed magic:

sed -i -s -e "s/clutter_init \?(&argc, &argv)/\
if (clutter_init (\&argc, \&argv) != CLUTTER_INIT_SUCCESS)\n\
    return 1/" tests/*/*.c

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
This commit is contained in:
nobled
2011-02-22 00:19:35 +00:00
committed by Neil Roberts
parent 0d14be1aec
commit eb906d85ca
61 changed files with 132 additions and 69 deletions

View File

@ -14,7 +14,8 @@ test_shader_effects_main (int argc, char *argv[])
ClutterActor *stage, *hand, *label, *rect;
gchar *file;
clutter_init (&argc, &argv);
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
/* Make a timeline */
timeline = clutter_timeline_new (7692);