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:
@ -140,7 +140,8 @@ test_script_main (int argc, char *argv[])
|
||||
gchar *file;
|
||||
gint res;
|
||||
|
||||
clutter_init (&argc, &argv);
|
||||
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||
return 1;
|
||||
|
||||
script = clutter_script_new ();
|
||||
g_assert (CLUTTER_IS_SCRIPT (script));
|
||||
|
Reference in New Issue
Block a user