netclientclock: test: add delay under valgrind to free clock from cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9115>
This commit is contained in:
parent
c5b9e5dcd5
commit
50208d6064
@ -22,6 +22,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
# include <valgrind/valgrind.h>
|
||||
#endif
|
||||
|
||||
#include <gst/check/gstcheck.h>
|
||||
#include <gst/net/gstnet.h>
|
||||
|
||||
@ -43,6 +47,13 @@ GST_START_TEST (test_instantiation)
|
||||
ASSERT_OBJECT_REFCOUNT (local, "system clock", 2);
|
||||
|
||||
gst_object_unref (local);
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
if (RUNNING_ON_VALGRIND) {
|
||||
// Delay 60+ to allow cache to free clocks
|
||||
g_usleep (65 * G_USEC_PER_SEC);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
@ -114,6 +125,13 @@ GST_START_TEST (test_functioning)
|
||||
|
||||
gst_object_unref (client);
|
||||
gst_object_unref (server);
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
if (RUNNING_ON_VALGRIND) {
|
||||
// Delay 60+ to allow cache to free clocks
|
||||
g_usleep (65 * G_USEC_PER_SEC);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
@ -1,5 +1,10 @@
|
||||
have_debug = true # FIXME
|
||||
|
||||
valgrind_dep = dependency('valgrind', required: false).partial_dependency(compile_args : true)
|
||||
if valgrind_dep.found()
|
||||
cdata.set('HAVE_VALGRIND', 1)
|
||||
endif
|
||||
|
||||
# tests and condition when to skip the test
|
||||
core_tests = [
|
||||
[ 'gst/gst.c', not gst_registry ],
|
||||
|
Loading…
x
Reference in New Issue
Block a user