From 29d17faf09aef4a3d4958fa2b2c4f7413ef7b13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 11 Nov 2018 08:59:36 +0200 Subject: [PATCH] Fix tests and enable them on CI gstreamer-rtsp-server and gstreamer-editing-services are disabled for now until there's a new release of them, or once we start building against git master of them. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/issues/16 --- .gitlab-ci.yml | 25 + Gir_Gst.toml | 6 + Gir_GstGL.toml | 23 +- gir-files/Gst-1.0.gir | 2 +- gir-files/GstGL-1.0.gir | 2 +- gstreamer-app-sys/src/lib.rs | 2 +- gstreamer-app-sys/tests/abi.rs | 17 +- gstreamer-app-sys/tests/constant.c | 32 +- gstreamer-app-sys/tests/layout.c | 2 +- gstreamer-audio-sys/src/lib.rs | 2 +- gstreamer-audio-sys/tests/abi.rs | 331 ++--- gstreamer-audio-sys/tests/constant.c | 32 +- gstreamer-audio-sys/tests/layout.c | 2 +- gstreamer-base-sys/src/lib.rs | 2 +- gstreamer-base-sys/tests/abi.rs | 39 +- gstreamer-base-sys/tests/constant.c | 32 +- gstreamer-base-sys/tests/layout.c | 2 +- gstreamer-check-sys/src/lib.rs | 2 +- gstreamer-check-sys/tests/abi.rs | 11 +- gstreamer-check-sys/tests/constant.c | 32 +- gstreamer-check-sys/tests/layout.c | 2 +- gstreamer-editing-services-sys/src/lib.rs | 2 +- gstreamer-editing-services-sys/tests/abi.rs | 277 ++--- .../tests/constant.c | 32 +- gstreamer-editing-services-sys/tests/layout.c | 2 +- gstreamer-gl-sys/src/lib.rs | 9 +- gstreamer-gl-sys/src/manual.rs | 8 + gstreamer-gl-sys/tests/abi.rs | 193 +-- gstreamer-gl-sys/tests/constant.c | 32 +- gstreamer-gl-sys/tests/layout.c | 2 +- gstreamer-mpegts-sys/src/lib.rs | 2 +- gstreamer-mpegts-sys/tests/abi.rs | 993 +++++++-------- gstreamer-mpegts-sys/tests/constant.c | 32 +- gstreamer-mpegts-sys/tests/layout.c | 2 +- gstreamer-net-sys/src/lib.rs | 2 +- gstreamer-net-sys/tests/abi.rs | 11 +- gstreamer-net-sys/tests/constant.c | 32 +- gstreamer-net-sys/tests/layout.c | 2 +- gstreamer-pbutils-sys/src/lib.rs | 2 +- gstreamer-pbutils-sys/tests/abi.rs | 75 +- gstreamer-pbutils-sys/tests/constant.c | 32 +- gstreamer-pbutils-sys/tests/layout.c | 2 +- gstreamer-player-sys/src/lib.rs | 2 +- gstreamer-player-sys/tests/abi.rs | 39 +- gstreamer-player-sys/tests/constant.c | 32 +- gstreamer-player-sys/tests/layout.c | 2 +- gstreamer-rtsp-server-sys/src/lib.rs | 2 +- gstreamer-rtsp-server-sys/tests/abi.rs | 71 +- gstreamer-rtsp-server-sys/tests/constant.c | 32 +- gstreamer-rtsp-server-sys/tests/layout.c | 2 +- gstreamer-rtsp-sys/src/lib.rs | 2 +- gstreamer-rtsp-sys/tests/abi.rs | 439 +++---- gstreamer-rtsp-sys/tests/constant.c | 32 +- gstreamer-rtsp-sys/tests/layout.c | 2 +- gstreamer-sdp-sys/src/lib.rs | 2 +- gstreamer-sdp-sys/tests/abi.rs | 125 +- gstreamer-sdp-sys/tests/constant.c | 32 +- gstreamer-sdp-sys/tests/layout.c | 2 +- gstreamer-sys/src/lib.rs | 8 +- gstreamer-sys/tests/abi.rs | 1079 +++++++++-------- gstreamer-sys/tests/constant.c | 32 +- gstreamer-sys/tests/layout.c | 2 +- gstreamer-tag-sys/src/lib.rs | 2 +- gstreamer-tag-sys/tests/abi.rs | 85 +- gstreamer-tag-sys/tests/constant.c | 32 +- gstreamer-tag-sys/tests/layout.c | 2 +- gstreamer-video-sys/src/lib.rs | 2 +- gstreamer-video-sys/tests/abi.rs | 599 ++++----- gstreamer-video-sys/tests/constant.c | 32 +- gstreamer-video-sys/tests/layout.c | 2 +- gstreamer-webrtc-sys/src/lib.rs | 2 +- gstreamer-webrtc-sys/tests/abi.rs | 131 +- gstreamer-webrtc-sys/tests/constant.c | 32 +- gstreamer-webrtc-sys/tests/layout.c | 2 +- 74 files changed, 2680 insertions(+), 2526 deletions(-) create mode 100644 gstreamer-gl-sys/src/manual.rs diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6e9bd2c4..4cbcac85c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,6 +40,9 @@ stages: - export GST_PLUGIN_SYSTEM_PATH=$PWD/gstreamer/lib/x86_64-linux-gnu/gstreamer-1.0 - export PATH=$PATH:$PWD/gstreamer/bin + # go back to the root build directory + - cd .. + - rustc --version - cargo --version script: @@ -52,6 +55,28 @@ stages: # https://github.com/sdroege/gstreamer-sys/issues/16 # - cargo test --all --all-features --color=always + # Run tests for crates we can currently run. The others + # need a new release of the C library first + - | + for crate in gstreamer-app-sys \ + gstreamer-audio-sys \ + gstreamer-base-sys \ + gstreamer-check-sys \ + gstreamer-gl-sys \ + gstreamer-mpegts-sys \ + gstreamer-net-sys \ + gstreamer-pbutils-sys \ + gstreamer-player-sys \ + gstreamer-rtsp-sys \ + gstreamer-sdp-sys \ + gstreamer-sys \ + gstreamer-tag-sys \ + gstreamer-video-sys \ + gstreamer-webrtc-sys; \ + do \ + cargo test -p $crate; \ + done + test 1.28: # 1.28 img # https://hub.docker.com/_/rust/ diff --git a/Gir_Gst.toml b/Gir_Gst.toml index 21468e4a6..15888029c 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -11,6 +11,12 @@ ignore = [ "Gst.VERSION_MINOR", "Gst.VERSION_MICRO", "Gst.VERSION_NANO", + "Gst.ERROR_SYSTEM", + "Gst.TIME_FORMAT", + "Gst.STIME_FORMAT", + "Gst.PTR_FORMAT", + "Gst.SEGMENT_FORMAT", + "Gst.FOURCC_FORMAT", ] external_libraries = [ diff --git a/Gir_GstGL.toml b/Gir_GstGL.toml index c2eb5445d..f7b622cf3 100644 --- a/Gir_GstGL.toml +++ b/Gir_GstGL.toml @@ -6,6 +6,11 @@ min_cfg_version = "1.14" target_path = "gstreamer-gl-sys" work_mode = "sys" +ignore = [ + "GstGL.GL_DISPLAY_EGL_NAME", + "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS", +] + external_libraries = [ "GLib", "GObject", @@ -29,10 +34,14 @@ name = "GstGL.GLDisplayEGLClass" status = "generate" cfg_condition = "feature = \"egl\"" -[[object]] -name = "GstGL.GL_DISPLAY_EGL_NAME" -status = "generate" -cfg_condition = "feature = \"egl\"" - [[object.constant]] - pattern = ".*" - cfg_condition = "feature = \"egl\"" +#[[object]] +#name = "GstGL.GL_DISPLAY_EGL_NAME" +#status = "manual" +#cfg_condition = "feature = \"egl\"" +# [[object.constant]] +# pattern = ".*" +# cfg_condition = "feature = \"egl\"" + +#[[object]] +#name = "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS" +#status = "manual" diff --git a/gir-files/Gst-1.0.gir b/gir-files/Gst-1.0.gir index 0a19b4c0a..82b983de1 100644 --- a/gir-files/Gst-1.0.gir +++ b/gir-files/Gst-1.0.gir @@ -10582,7 +10582,7 @@ and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(). show all the typical details that one might want show all details regardless of how large or diff --git a/gir-files/GstGL-1.0.gir b/gir-files/GstGL-1.0.gir index ae1ebda32..a306bd44c 100644 --- a/gir-files/GstGL-1.0.gir +++ b/gir-files/GstGL-1.0.gir @@ -4268,7 +4268,7 @@ multiple times. This must be called before any other GstGLRenderbuffer operatio OpenGL compatibility profile - + any OpenGL/OpenGL|ES profile diff --git a/gstreamer-app-sys/src/lib.rs b/gstreamer-app-sys/src/lib.rs index 5d7f1ff77..7673200a4 100644 --- a/gstreamer-app-sys/src/lib.rs +++ b/gstreamer-app-sys/src/lib.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +// This file was generated by gir (https://github.com/gtk-rs/gir @ dd33bdf) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-app-sys/tests/abi.rs b/gstreamer-app-sys/tests/abi.rs index 52401ccd8..96542063d 100644 --- a/gstreamer-app-sys/tests/abi.rs +++ b/gstreamer-app-sys/tests/abi.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ b5ea065) +// This file was generated by gir (https://github.com/gtk-rs/gir @ dd33bdf) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -227,7 +227,14 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result