check: Disable some tests if pipe() is unavailable for UWP build

pipe() and _pipe() are not allowed on UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1006>
This commit is contained in:
Seungha Yang 2022-02-07 02:49:15 +09:00 committed by GStreamer Marge Bot
parent e1f0687b09
commit ec8b293999
3 changed files with 15 additions and 0 deletions

View file

@ -381,6 +381,11 @@ if not cc.has_members('struct itimerspec', 'it_interval', 'it_value',
prefix : '#include <time.h>')
cdata.set('STRUCT_ITIMERSPEC_DEFINITION_MISSING', 1)
endif
if host_system != 'windows'
cdata.set('HAVE_PIPE', 1)
elif cc.has_function('_pipe', prefix : '#include <io.h>')
cdata.set('HAVE_PIPE', 1)
endif
# Platform deps; only ws2_32 and execinfo for now
platform_deps = []

View file

@ -74,6 +74,7 @@ cleanup_fdsrc (GstElement * fdsrc)
gst_check_teardown_element (fdsrc);
}
#ifdef HAVE_PIPE
GST_START_TEST (test_num_buffers)
{
GstElement *src;
@ -165,6 +166,7 @@ GST_START_TEST (test_nonseeking)
}
GST_END_TEST;
#endif /* HAVE_PIPE */
GST_START_TEST (test_seeking)
{
@ -209,8 +211,10 @@ fdsrc_suite (void)
TCase *tc_chain = tcase_create ("general");
suite_add_tcase (s, tc_chain);
#ifdef HAVE_PIPE
tcase_add_test (tc_chain, test_num_buffers);
tcase_add_test (tc_chain, test_nonseeking);
#endif
tcase_add_test (tc_chain, test_seeking);
return s;

View file

@ -34,6 +34,7 @@
#include <sys/socket.h>
#endif
#ifdef HAVE_PIPE
GST_START_TEST (test_poll_wait)
{
GstPoll *set;
@ -102,6 +103,8 @@ GST_START_TEST (test_poll_wait)
GST_END_TEST;
#endif /* HAVE_PIPE */
GST_START_TEST (test_poll_basic)
{
GstPoll *set;
@ -342,7 +345,10 @@ gst_poll_suite (void)
tcase_add_test (tc_chain, test_poll_controllable);
#else
tcase_skip_broken_test (tc_chain, test_poll_basic);
#ifdef HAVE_PIPE
/* pipe() or _pipe() is not available on UWP */
tcase_skip_broken_test (tc_chain, test_poll_wait);
#endif
tcase_skip_broken_test (tc_chain, test_poll_wait_stop);
tcase_skip_broken_test (tc_chain, test_poll_wait_restart);
tcase_skip_broken_test (tc_chain, test_poll_wait_flush);