diff options
36 files changed, 95 insertions, 40 deletions
diff --git a/tests/check/elements/adder.c b/tests/check/elements/adder.c index 64ed5b915..3a229d0c8 100644 --- a/tests/check/elements/adder.c +++ b/tests/check/elements/adder.c @@ -28,8 +28,6 @@ # include <valgrind/valgrind.h> #endif -#include <unistd.h> - #include <gst/check/gstcheck.h> #include <gst/check/gstconsistencychecker.h> #include <gst/base/gstbasesrc.h> diff --git a/tests/check/elements/appsink.c b/tests/check/elements/appsink.c index 4d5ec345c..03adf063a 100644 --- a/tests/check/elements/appsink.c +++ b/tests/check/elements/appsink.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/app/gstappsink.h> diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index 05c9d12d8..23c534128 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -20,8 +20,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/audio/audio.h> diff --git a/tests/check/elements/audioresample.c b/tests/check/elements/audioresample.c index 701995d20..12236b164 100644 --- a/tests/check/elements/audioresample.c +++ b/tests/check/elements/audioresample.c @@ -20,8 +20,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> diff --git a/tests/check/elements/audiotestsrc.c b/tests/check/elements/audiotestsrc.c index 5023772ad..bb70c676d 100644 --- a/tests/check/elements/audiotestsrc.c +++ b/tests/check/elements/audiotestsrc.c @@ -20,7 +20,9 @@ * Boston, MA 02110-1301, USA. */ -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/audio/audio.h> diff --git a/tests/check/elements/decodebin.c b/tests/check/elements/decodebin.c index 457cb3662..252ad033a 100644 --- a/tests/check/elements/decodebin.c +++ b/tests/check/elements/decodebin.c @@ -25,7 +25,6 @@ #include <gst/check/gstcheck.h> #include <gst/base/gstbaseparse.h> -#include <unistd.h> static const gchar dummytext[] = "Quick Brown Fox Jumps over a Lazy Frog Quick Brown " diff --git a/tests/check/elements/libvisual.c b/tests/check/elements/libvisual.c index 5dbee68bc..40ee37c86 100644 --- a/tests/check/elements/libvisual.c +++ b/tests/check/elements/libvisual.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> diff --git a/tests/check/elements/multisocketsink.c b/tests/check/elements/multisocketsink.c index de036c2a9..9ec0cc9a4 100644 --- a/tests/check/elements/multisocketsink.c +++ b/tests/check/elements/multisocketsink.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <unistd.h> #include <sys/ioctl.h> diff --git a/tests/check/elements/opus.c b/tests/check/elements/opus.c index 88f87aaf2..abdda6419 100644 --- a/tests/check/elements/opus.c +++ b/tests/check/elements/opus.c @@ -20,7 +20,9 @@ * Boston, MA 02110-1301, USA. */ -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/check/gstharness.h> diff --git a/tests/check/elements/playbin.c b/tests/check/elements/playbin.c index 170ddcef4..26e07a29e 100644 --- a/tests/check/elements/playbin.c +++ b/tests/check/elements/playbin.c @@ -28,7 +28,6 @@ #include <gst/check/gstcheck.h> #include <gst/base/gstpushsrc.h> -#include <unistd.h> #ifndef GST_DISABLE_REGISTRY diff --git a/tests/check/elements/rawaudioparse.c b/tests/check/elements/rawaudioparse.c index 029aab556..c9c2c3660 100644 --- a/tests/check/elements/rawaudioparse.c +++ b/tests/check/elements/rawaudioparse.c @@ -19,8 +19,11 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -/* FIXME: GValueArray is deprecated, but there is currently no viabla alternative +/* FIXME: GValueArray is deprecated, but there is currently no viable alternatives * See https://bugzilla.gnome.org/show_bug.cgi?id=667228 */ #define GLIB_DISABLE_DEPRECATION_WARNINGS diff --git a/tests/check/elements/rawvideoparse.c b/tests/check/elements/rawvideoparse.c index 159cc2da1..9888757c4 100644 --- a/tests/check/elements/rawvideoparse.c +++ b/tests/check/elements/rawvideoparse.c @@ -19,6 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/video/video.h> diff --git a/tests/check/elements/textoverlay.c b/tests/check/elements/textoverlay.c index a39bd6cc4..c97df51e8 100644 --- a/tests/check/elements/textoverlay.c +++ b/tests/check/elements/textoverlay.c @@ -18,7 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/video/video-overlay-composition.h> diff --git a/tests/check/elements/videorate.c b/tests/check/elements/videorate.c index 7db55199a..4aecdc9a9 100644 --- a/tests/check/elements/videorate.c +++ b/tests/check/elements/videorate.c @@ -19,8 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> diff --git a/tests/check/elements/videotestsrc.c b/tests/check/elements/videotestsrc.c index bf338d1c7..4468f88a6 100644 --- a/tests/check/elements/videotestsrc.c +++ b/tests/check/elements/videotestsrc.c @@ -29,8 +29,6 @@ # include <valgrind/valgrind.h> #endif -#include <unistd.h> - #include <gst/check/gstcheck.h> #include <gst/check/gstharness.h> diff --git a/tests/check/elements/volume.c b/tests/check/elements/volume.c index 9d8f21503..7eab992da 100644 --- a/tests/check/elements/volume.c +++ b/tests/check/elements/volume.c @@ -20,7 +20,9 @@ * Boston, MA 02110-1301, USA. */ -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/base/gstbasetransform.h> #include <gst/check/gstcheck.h> diff --git a/tests/check/elements/vorbisdec.c b/tests/check/elements/vorbisdec.c index 456495283..b18f97b19 100644 --- a/tests/check/elements/vorbisdec.c +++ b/tests/check/elements/vorbisdec.c @@ -19,8 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> diff --git a/tests/check/elements/vorbistag.c b/tests/check/elements/vorbistag.c index 0ffa102ab..4d273230e 100644 --- a/tests/check/elements/vorbistag.c +++ b/tests/check/elements/vorbistag.c @@ -19,8 +19,10 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include <unistd.h> #include <glib.h> #include <vorbis/codec.h> diff --git a/tests/check/generic/clock-selection.c b/tests/check/generic/clock-selection.c index cfea856d9..ddfd069c4 100644 --- a/tests/check/generic/clock-selection.c +++ b/tests/check/generic/clock-selection.c @@ -20,7 +20,9 @@ * Boston, MA 02110-1301, USA. */ -#include <unistd.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c index 64b2b40e5..11679164c 100644 --- a/tests/check/generic/states.c +++ b/tests/check/generic/states.c @@ -24,7 +24,6 @@ # include "config.h" #endif -#include <unistd.h> #include <gmodule.h> #include <gst/check/gstcheck.h> diff --git a/tests/check/libs/audiocdsrc.c b/tests/check/libs/audiocdsrc.c index b98a3ebc9..9dee80a96 100644 --- a/tests/check/libs/audiocdsrc.c +++ b/tests/check/libs/audiocdsrc.c @@ -30,8 +30,6 @@ #include "config.h" #endif -#include <unistd.h> - #include <gst/check/gstcheck.h> #include <gst/check/gstbufferstraw.h> diff --git a/tests/check/libs/libsabi.c b/tests/check/libs/libsabi.c index 316826e45..40595a9cc 100644 --- a/tests/check/libs/libsabi.c +++ b/tests/check/libs/libsabi.c @@ -20,7 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif + #include <gst/check/gstcheck.h> #include <gst/app/gstappsrc.h> diff --git a/tests/check/libs/pbutils.c b/tests/check/libs/pbutils.c index dda8d7839..856b71e04 100644 --- a/tests/check/libs/pbutils.c +++ b/tests/check/libs/pbutils.c @@ -37,8 +37,8 @@ #include <sys/stat.h> /* for chmod() */ #endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> /* for unlink() */ +#ifdef G_OS_UNIX +#include <unistd.h> /* for getpid() */ #endif static void @@ -613,7 +613,7 @@ test_pb_utils_install_plugins_do_callout (const gchar * const *details, done: - unlink (path); + g_unlink (path); g_free (path); #endif /* G_OS_UNIX */ } diff --git a/tests/check/libs/profile.c b/tests/check/libs/profile.c index 44e9f3929..3faba3c1b 100644 --- a/tests/check/libs/profile.c +++ b/tests/check/libs/profile.c @@ -22,8 +22,6 @@ #include "config.h" #endif -/* #include <fcntl.h> */ -#include <unistd.h> #include <glib.h> #include <glib/gstdio.h> #include <gst/check/gstcheck.h> @@ -31,6 +29,10 @@ #include <gst/pbutils/encoding-profile.h> #include <gst/pbutils/encoding-target.h> +#ifdef G_OS_UNIX +#include <unistd.h> /* For R_OK etc. */ +#endif + static inline gboolean gst_caps_is_equal_unref (GstCaps * caps1, GstCaps * caps2) { @@ -679,9 +681,13 @@ profile_suite (void) gchar *gst_dir; /* cehck if we can create profiles */ +#ifdef G_OS_UNIX gst_dir = g_build_filename (g_get_user_data_dir (), "gstreamer-1.0", NULL); can_write = (g_access (gst_dir, R_OK | W_OK | X_OK) == 0); g_free (gst_dir); +#else + can_write = FALSE; /* FIXME: fix can_write test on Windows */ +#endif suite_add_tcase (s, tc_chain); diff --git a/tests/check/libs/rtpbasedepayload.c b/tests/check/libs/rtpbasedepayload.c index 63cbc8745..ed23ca174 100644 --- a/tests/check/libs/rtpbasedepayload.c +++ b/tests/check/libs/rtpbasedepayload.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include <gst/check/gstcheck.h> diff --git a/tests/check/libs/rtpbasepayload.c b/tests/check/libs/rtpbasepayload.c index 3cc6e4149..15cfa16e0 100644 --- a/tests/check/libs/rtpbasepayload.c +++ b/tests/check/libs/rtpbasepayload.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/gst.h> #include <gst/check/gstcheck.h> diff --git a/tests/check/libs/rtspconnection.c b/tests/check/libs/rtspconnection.c index d24fd54c4..56f83e5b9 100644 --- a/tests/check/libs/rtspconnection.c +++ b/tests/check/libs/rtspconnection.c @@ -26,8 +26,6 @@ #include <gst/check/gstcheck.h> #include <gst/rtsp/gstrtspconnection.h> -#include <sys/socket.h> -#include <netinet/in.h> #include <string.h> diff --git a/tests/check/libs/video.c b/tests/check/libs/video.c index ce4c4f9d7..7fffcddbf 100644 --- a/tests/check/libs/video.c +++ b/tests/check/libs/video.c @@ -29,8 +29,6 @@ # include <valgrind/valgrind.h> #endif -#include <unistd.h> - #include <gst/check/gstcheck.h> #include <gst/video/video.h> diff --git a/tests/check/meson.build b/tests/check/meson.build index 94d6e7bc1..1c0c39e9d 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build @@ -34,11 +34,12 @@ base_tests = [ [ 'elements/audiorate.c' ], [ 'elements/audiotestsrc.c' ], [ 'elements/audioresample.c' ], - [ 'elements/libvisual.c', not libvisual_dep.found() ], + [ 'elements/libvisual.c', not is_variable('libvisual_dep') or not libvisual_dep.found() ], [ 'elements/decodebin.c' ], [ 'elements/encodebin.c', not theoraenc_dep.found() or not vorbisenc_dep.found() ], - [ 'elements/multifdsink.c' ], - [ 'elements/multisocketsink.c' ], + [ 'elements/multifdsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ], + # FIXME: multisocketsink test on windows/msvc + [ 'elements/multisocketsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ], [ 'elements/playbin.c' ], [ 'elements/playbin-complex.c', not ogg_dep.found() ], [ 'elements/playsink.c' ], @@ -60,7 +61,8 @@ base_tests = [ [ 'pipelines/gio.c' ], [ 'pipelines/oggmux.c', not ogg_dep.found(), [ ogg_dep, ] ], [ 'pipelines/streamsynchronizer.c' ], - [ 'pipelines/tcp.c' ], # FIXME: -DHAVE_GIO_UNIX_2_0=1 + # FIXME: tcp test on windows/msvc + [ 'pipelines/tcp.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ], [ 'pipelines/theoraenc.c', not theoraenc_dep.found(), [ theoraenc_dep ] ], [ 'pipelines/vorbisenc.c', not vorbisenc_dep.found() ], [ 'pipelines/vorbisdec.c', not vorbisenc_dep.found(),], diff --git a/tests/check/pipelines/capsfilter-renegotiation.c b/tests/check/pipelines/capsfilter-renegotiation.c index 4a3fc98ab..7ba6b893d 100644 --- a/tests/check/pipelines/capsfilter-renegotiation.c +++ b/tests/check/pipelines/capsfilter-renegotiation.c @@ -21,6 +21,10 @@ /* Ideally this would be in core, but using videotestsrc makes it easier */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <gst/check/gstcheck.h> #define FIRST_CAPS "video/x-raw,width=(int)480,height=(int)320" diff --git a/tests/check/pipelines/gio.c b/tests/check/pipelines/gio.c index 60b45c2a9..46ae0cd5e 100644 --- a/tests/check/pipelines/gio.c +++ b/tests/check/pipelines/gio.c @@ -19,6 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/check/gstbufferstraw.h> diff --git a/tests/check/pipelines/streamsynchronizer.c b/tests/check/pipelines/streamsynchronizer.c index 59cfb7b8c..07aa44566 100644 --- a/tests/check/pipelines/streamsynchronizer.c +++ b/tests/check/pipelines/streamsynchronizer.c @@ -18,6 +18,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> diff --git a/tests/check/pipelines/tcp.c b/tests/check/pipelines/tcp.c index 00bdaa373..8701484d5 100644 --- a/tests/check/pipelines/tcp.c +++ b/tests/check/pipelines/tcp.c @@ -17,9 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ - -#include <unistd.h> -#include <sys/socket.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gio/gio.h> #include <gst/check/gstcheck.h> @@ -33,6 +33,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <sys/socket.h> #include <unistd.h> static gboolean diff --git a/tests/check/pipelines/theoraenc.c b/tests/check/pipelines/theoraenc.c index ff8b6e1fb..c72956716 100644 --- a/tests/check/pipelines/theoraenc.c +++ b/tests/check/pipelines/theoraenc.c @@ -19,6 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/check/gstbufferstraw.h> diff --git a/tests/check/pipelines/vorbisdec.c b/tests/check/pipelines/vorbisdec.c index 51b7f38bb..4514e926b 100644 --- a/tests/check/pipelines/vorbisdec.c +++ b/tests/check/pipelines/vorbisdec.c @@ -19,6 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/check/gstbufferstraw.h> diff --git a/tests/check/pipelines/vorbisenc.c b/tests/check/pipelines/vorbisenc.c index 6eeefcc66..2a47907d0 100644 --- a/tests/check/pipelines/vorbisenc.c +++ b/tests/check/pipelines/vorbisenc.c @@ -19,6 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <gst/check/gstcheck.h> #include <gst/check/gstbufferstraw.h> |