commit:     1d8e1fb35763b7d27deb11b86dc4339907bda8bd
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 17:49:01 2018 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 17:49:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=1d8e1fb3

app-emulation/winetricks: Add support for tests.

Add support for syntax checks using 'dev-python/bashate',
'dev-util/checkbashisms', and 'dev-util/shellcheck' via
FEATURES="test".

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/winetricks/winetricks-99999999.ebuild | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/app-emulation/winetricks/winetricks-99999999.ebuild 
b/app-emulation/winetricks/winetricks-99999999.ebuild
index a1bb7b2..77031dd 100644
--- a/app-emulation/winetricks/winetricks-99999999.ebuild
+++ b/app-emulation/winetricks/winetricks-99999999.ebuild
@@ -25,7 +25,7 @@ HOMEPAGE="https://github.com/Winetricks/winetricks 
https://wiki.winehq.org/Winet
 
 LICENSE="LGPL-2.1+"
 SLOT="0"
-IUSE="gtk kde rar"
+IUSE="gtk kde rar test"
 
 DEPEND=""
 RDEPEND="app-arch/cabextract
@@ -36,14 +36,17 @@ RDEPEND="app-arch/cabextract
        x11-misc/xdg-utils
        gtk? ( gnome-extra/zenity )
        kde? ( kde-apps/kdialog )
-       rar? ( app-arch/unrar )"
+       rar? ( app-arch/unrar )
+       test? ( dev-python/bashate
+               dev-util/checkbashisms
+               dev-util/shellcheck )"
+
+# Test targets include syntax checks only, not the "heavy duty" tests
+# that would require a lot of disk space, as well as network access.
 
 # Uses non-standard "Wine" category, which is provided by app-emulation/wine; 
#451552
 QA_DESKTOP_FILE="usr/share/applications/winetricks.desktop"
 
-# Tests require network access and run Wine, which is unreliable from a 
portage environment.
-RESTRICT="test"
-
 src_unpack() {
        if [[ ${PV} == "99999999" ]] ; then
                git-r3_src_unpack
@@ -55,6 +58,10 @@ src_unpack() {
        fi
 }
 
+src_test() {
+       ./tests/shell-checks || die "Test(s) failed."
+}
+
 src_install() {
        default
        if use gtk || use kde; then

Reply via email to