tests: info: fix post init cat reg test on windows and with CK_FORK=no

The test checks that categories not covered by the pattern in the
GST_DEBUG string have debug level GST_LEVEL_DEFAULT set, but previous
tests mess with the default threshold, which made this test fail on
Windows or when run with CK_FORK=no. Fix this by resetting everything
at the beginning, and then also do a sanity check afterwards.
This commit is contained in:
Tim-Philipp Müller 2018-01-11 11:38:53 +00:00
parent 3aa5ff37cd
commit 361fbc3fdd

View file

@ -440,7 +440,10 @@ GST_START_TEST (info_post_gst_init_category_registration)
/* Note: before the fixes this wouldn't work to trigger the problem because
* only a pattern set via GST_DEBUG before gst_init would be picked up
* (another bug) */
gst_debug_set_threshold_from_string ("*a*b:6,*c:3,d*:2,xyz*:9,ax:1", FALSE);
gst_debug_set_threshold_from_string ("*a*b:6,*c:3,d*:2,xyz*:9,ax:1", TRUE);
fail_unless_equals_int (GST_LEVEL_DEFAULT,
gst_debug_get_default_threshold ());
for (i = 0; i < G_N_ELEMENTS (cats); ++i) {
gchar *name = g_strdup_printf ("%s-%x", (i % 2 == 0) ? "cat" : "dog", i);