]> code.ossystems Code Review - meta-freescale.git/commitdiff
gstreamer: Add common .inc files for meson based recipes
authorCarlos Rafael Giani <crg7475@mailbox.org>
Sun, 12 Jan 2020 13:59:43 +0000 (14:59 +0100)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 4 May 2021 23:08:21 +0000 (20:08 -0300)
* gstreamer1.0-plugins-common.inc
  The old gstreamer1.0-plugins.inc file, adapted for meson
* gstreamer1.0-plugins-packaging.inc
  The old gst-plugins-package.inc file, adapted for meson
* gstreamer1.0-ptest.inc
  Common code for meson based PTest support; autogenerates the run-ptest
  file and is designed to use the gnome-desktop-testing suite runner
  (which is why the .inc files inherits from ptest-gnome)

(From OE-Core rev: 075aa7a617d38d6a698cee97dcb7550e72741eb5)

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc [new file with mode: 0644]

diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc b/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc
new file mode 100644 (file)
index 0000000..74368c4
--- /dev/null
@@ -0,0 +1,21 @@
+inherit ptest-gnome
+
+TEST_FILES_PATH = "${datadir}/installed-tests/gstreamer-1.0/test-files"
+RUN_PTEST_FILE = "${D}${PTEST_PATH}/run-ptest"
+
+EXTRA_OEMESON += "-Dtest-files-path=${TEST_FILES_PATH}"
+
+# Using do_install_ptest_base instead of do_install_ptest, since
+# the default do_install_ptest_base is hardcoded to expect Makefiles.
+do_install_ptest_base() {
+    # Generate run-ptest file
+    echo "#!/usr/bin/env sh" > "${RUN_PTEST_FILE}"
+    echo "gnome-desktop-testing-runner ${GST_TEST_SUITE_NAME}" >> "${RUN_PTEST_FILE}"
+    chmod 0755 "${RUN_PTEST_FILE}"
+
+    # Install additional files required by tests
+    if [ -d "${S}/tests/files" ] ; then
+        install -d "${D}/${TEST_FILES_PATH}"
+        install -m 0644 "${S}/tests/files"/* "${D}/${TEST_FILES_PATH}"
+    fi
+}