mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-25 03:36:32 +01:00
Merge branch 'macos-testfilemonitor-fix' into 'main'
testfilemonitor: treat `CHANGES_DONE_HINT` as optional when events don’t match Closes #1181 See merge request GNOME/glib!4905
This commit is contained in:
@@ -139,8 +139,6 @@ gio_tests = {
|
||||
'glistmodel' : {},
|
||||
'testfilemonitor' : {
|
||||
'suite' : ['slow'],
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
|
||||
'can_fail' : host_system in ['darwin'],
|
||||
},
|
||||
'thumbnail-verification' : {},
|
||||
'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||
|
||||
@@ -237,6 +237,17 @@ check_expected_events (RecordedEvent *expected,
|
||||
li++, l = l->next;
|
||||
continue;
|
||||
}
|
||||
/* The ordering of 'CHANGES_DONE_HINT' can not be guaranteed
|
||||
* so treat it as optional. */
|
||||
else if (e1->event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT &&
|
||||
e2->event_type != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
|
||||
{
|
||||
g_test_message ("Skipping expected 'CHANGES_DONE_HINT' "
|
||||
"at index %" G_GSIZE_FORMAT,
|
||||
i);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
/* If an event is marked as optional in the current environment and
|
||||
* the event doesn't match, it means the expected event has lost. */
|
||||
else if (env & e1->optional)
|
||||
|
||||
Reference in New Issue
Block a user