testfilemonitor: Skip if we are avoiding flaky tests

See https://gitlab.gnome.org/GNOME/glib/issues/1634

Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: no

Gbp-Pq: Topic debian
Gbp-Pq: Name testfilemonitor-Skip-if-we-are-avoiding-flaky-tests.patch
This commit is contained in:
Simon McVittie 2020-02-25 10:45:07 +00:00 committed by luzp
parent e57651b3cc
commit dd109849a6
1 changed files with 33 additions and 1 deletions

View File

@ -21,6 +21,12 @@ setup (Fixture *fixture,
gchar *path = NULL;
GError *local_error = NULL;
if (g_getenv ("DEB_ALLOW_FLAKY_TESTS") == NULL)
{
g_test_skip ("https://gitlab.gnome.org/GNOME/glib/issues/1634");
return;
}
path = g_dir_make_tmp ("gio-test-testfilemonitor_XXXXXX", &local_error);
g_assert_no_error (local_error);
@ -37,7 +43,9 @@ teardown (Fixture *fixture,
{
GError *local_error = NULL;
g_file_delete (fixture->tmp_dir, NULL, &local_error);
if (fixture->tmp_dir != NULL)
g_file_delete (fixture->tmp_dir, NULL, &local_error);
g_assert_no_error (local_error);
g_clear_object (&fixture->tmp_dir);
}
@ -360,6 +368,10 @@ test_atomic_replace (Fixture *fixture,
GError *error = NULL;
TestData data;
/* respect g_test_skip() during setup() */
if (g_test_failed ())
return;
data.step = 0;
data.events = NULL;
@ -465,6 +477,10 @@ test_file_changes (Fixture *fixture,
GError *error = NULL;
TestData data;
/* respect g_test_skip() during setup() */
if (g_test_failed ())
return;
data.step = 0;
data.events = NULL;
@ -582,6 +598,10 @@ test_dir_monitor (Fixture *fixture,
GError *error = NULL;
TestData data;
/* respect g_test_skip() during setup() */
if (g_test_failed ())
return;
data.step = 0;
data.events = NULL;
@ -679,6 +699,10 @@ test_dir_non_existent (Fixture *fixture,
TestData data;
GError *error = NULL;
/* respect g_test_skip() during setup() */
if (g_test_failed ())
return;
data.step = 0;
data.events = NULL;
@ -788,6 +812,10 @@ test_cross_dir_moves (Fixture *fixture,
GError *error = NULL;
TestData data[2];
/* respect g_test_skip() during setup() */
if (g_test_failed ())
return;
data[0].step = 0;
data[0].events = NULL;
@ -957,6 +985,10 @@ test_file_hard_links (Fixture *fixture,
GError *error = NULL;
TestData data;
/* respect g_test_skip() during setup() */
if (g_test_failed ())
return;
g_test_bug ("755721");
#ifdef HAVE_LINK