From 791bf41f652e797c629ef5ff8e5aaecbbe422c25 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Sun, 6 Mar 2022 00:07:32 +0100 Subject: [PATCH] media-video/mpv-mpris: Add unit tests in live ebuild. Upstream now has a functional smoke test suite which we can leverage to implement tests. Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Oliver Freyermuth --- media-video/mpv-mpris/mpv-mpris-9999.ebuild | 24 ++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/media-video/mpv-mpris/mpv-mpris-9999.ebuild b/media-video/mpv-mpris/mpv-mpris-9999.ebuild index afb890923b..d56b887912 100644 --- a/media-video/mpv-mpris/mpv-mpris-9999.ebuild +++ b/media-video/mpv-mpris/mpv-mpris-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -18,20 +18,38 @@ fi SLOT="0" LICENSE="MIT" -IUSE="+autoload" +IUSE="+autoload test" RDEPEND=" dev-libs/glib:2 media-video/mpv:=[cplugins,libmpv] " DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" +BDEPEND="virtual/pkgconfig + test? ( + app-misc/jq + app-shells/bash + app-text/jo + media-sound/playerctl + net-misc/socat + sys-apps/dbus + virtual/awk + x11-apps/xauth + x11-misc/xvfb-run + x11-themes/sound-theme-freedesktop + ) +" +RESTRICT="!test? ( test )" src_compile() { tc-export CC emake PKG_CONFIG="$(tc-getPKG_CONFIG)" } +src_test() { + emake test +} + src_install() { dolib.so mpris.so use autoload && dosym -r /usr/$(get_libdir)/mpv/mpris.so /etc/mpv/scripts/mpris.so