From: Thibault Saunier Date: Fri, 5 Nov 2021 14:36:11 +0000 (-0300) Subject: tests:ges: Take TIMEOUT_FACTOR into account X-Git-Tag: 1.20.0~344 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9413fb7ea2fe8f72758928c6b1f8a384d24b20ee;p=platform%2Fupstream%2Fgstreamer.git tests:ges: Take TIMEOUT_FACTOR into account This env var is set in the CI so we grow the timeout as required (when running in valgrind for example). See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/jobs/15449209 Part-of: --- diff --git a/subprojects/gst-editing-services/tests/check/ges/mixers.c b/subprojects/gst-editing-services/tests/check/ges/mixers.c index 15f7a4c..2bf57ee 100644 --- a/subprojects/gst-editing-services/tests/check/ges/mixers.c +++ b/subprojects/gst-editing-services/tests/check/ges/mixers.c @@ -96,6 +96,8 @@ GST_START_TEST (simple_audio_mixed_with_pipeline) GESTrack *track; GESTimeline *timeline; GESPipeline *pipeline; + GstClockTime timeout = 5 * GST_SECOND; + const gchar *timeout_factor_str = g_getenv ("TIMEOUT_FACTOR"); ges_init (); @@ -132,11 +134,16 @@ GST_START_TEST (simple_audio_mixed_with_pipeline) g_signal_connect (bus, "message", (GCallback) message_received_cb, pipeline); fail_if (gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE); - message = gst_bus_timed_pop_filtered (bus, 5 * GST_SECOND, + if (timeout_factor_str) { + gint factor = g_ascii_strtoll (timeout_factor_str, NULL, 10); + if (factor) + timeout *= factor; + } + message = gst_bus_timed_pop_filtered (bus, timeout, GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR); if (message == NULL) { - fail_unless ("No message after 5 seconds" == NULL); + fail_unless ("Timed out" == NULL); goto done; } else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) fail_error_message (message);