mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tests: include config.h and don't include unix headers
In many cases the unistd.h includes weren't actually needed. Don't build tests that need it on windows with MSVC (multifdsink, multisocketsink, pipelines/tcp). Preparation for making tests work on Windows with MSVC.
This commit is contained in:
parent
0ffc2015aa
commit
3f184c3abc
36 changed files with 95 additions and 40 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <gst/check/gstcheck.h>
|
||||
#include <gst/base/gstpushsrc.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef GST_DISABLE_REGISTRY
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
# include <valgrind/valgrind.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gst/check/gstcheck.h>
|
||||
#include <gst/check/gstharness.h>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gst/check/gstcheck.h>
|
||||
#include <gst/check/gstbufferstraw.h>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
# include <valgrind/valgrind.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
#include <gst/video/video.h>
|
||||
|
|
|
@ -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(),],
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue