diff --git a/src/tests/clutter/conform/meson.build b/src/tests/clutter/conform/meson.build index 82ce922f7..fbaa46bd3 100644 --- a/src/tests/clutter/conform/meson.build +++ b/src/tests/clutter/conform/meson.build @@ -34,6 +34,7 @@ clutter_conform_tests_general_tests = [ 'interval', 'script-parser', 'timeline', + 'timeline-interpolate', 'units', ] diff --git a/src/tests/clutter/conform/timeline-interpolate.c b/src/tests/clutter/conform/timeline-interpolate.c index 3988c038d..e60f72b2e 100644 --- a/src/tests/clutter/conform/timeline-interpolate.c +++ b/src/tests/clutter/conform/timeline-interpolate.c @@ -1,8 +1,9 @@ +#define CLUTTER_DISABLE_DEPRECATION_WARNINGS #include #include #include -#include "test-conform-common.h" +#include "tests/clutter-test-utils.h" /* We ask for 1 frame per millisecond. * Whenever this rate can't be achieved then the timeline @@ -12,8 +13,12 @@ #define TEST_TIMELINE_DURATION 5000 /* We are at the mercy of the system scheduler so this - * may not be a very reliable tolerance. */ -#define TEST_ERROR_TOLERANCE 20 + * may not be a very reliable tolerance. + * + * It's set as very tolerable as otherwise CI, which are + * very prone to not get CPU time scheduled, tend to often fail. + */ +#define TEST_ERROR_TOLERANCE 150 typedef struct _TestState { @@ -118,19 +123,13 @@ completed_cb (ClutterTimeline *timeline, if (state->completion_count == 2) { if (state->passed) - { - g_test_message ("Passed\n"); - clutter_main_quit (); - } + clutter_main_quit (); else - { - g_test_message ("Failed\n"); - exit (EXIT_FAILURE); - } + g_assert_not_reached (); } } -void +static void timeline_interpolation (void) { TestState state; @@ -159,3 +158,7 @@ timeline_interpolation (void) g_object_unref (state.timeline); } + +CLUTTER_TEST_SUITE ( + CLUTTER_TEST_UNIT ("/timeline/interpolate", timeline_interpolation) +)