diff options
author | Florian Schmaus <flow@gentoo.org> | 2021-06-23 14:00:54 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2021-06-23 14:09:28 +0200 |
commit | fbb9f94fca4a20f0e9ab92d9a4ac06a93a05c05f (patch) | |
tree | 4f1f5beb149c118cd8bf3fcce89d7a7b308c1c91 /x11-wm | |
parent | dev-python/ewmh: initial import (diff) | |
download | gentoo-fbb9f94fca4a20f0e9ab92d9a4ac06a93a05c05f.tar.gz gentoo-fbb9f94fca4a20f0e9ab92d9a4ac06a93a05c05f.tar.bz2 gentoo-fbb9f94fca4a20f0e9ab92d9a4ac06a93a05c05f.zip |
x11-wm/herbstluftwm: enable tests
Closes: https://bugs.gentoo.org/797496
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/herbstluftwm/herbstluftwm-0.9.3.ebuild | 25 | ||||
-rw-r--r-- | x11-wm/herbstluftwm/herbstluftwm-9999.ebuild | 25 |
2 files changed, 44 insertions, 6 deletions
diff --git a/x11-wm/herbstluftwm/herbstluftwm-0.9.3.ebuild b/x11-wm/herbstluftwm/herbstluftwm-0.9.3.ebuild index f374bfa2fc7a..652478161a90 100644 --- a/x11-wm/herbstluftwm/herbstluftwm-0.9.3.ebuild +++ b/x11-wm/herbstluftwm/herbstluftwm-0.9.3.ebuild @@ -21,10 +21,11 @@ fi LICENSE="BSD-2" SLOT="0" -IUSE="+doc python" +IUSE="+doc python test" +RESTRICT="!test? ( test )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -DEPEND=" +COMMON_DEPEND=" media-libs/freetype x11-libs/libX11 x11-libs/libXext @@ -32,8 +33,18 @@ DEPEND=" x11-libs/libXinerama x11-libs/libXrandr " +DEPEND=" + ${COMMON_DEPEND} + test? ( + dev-python/ewmh + dev-python/python-xlib + x11-apps/xsetroot + x11-base/xorg-server[xephyr,xvfb] + x11-misc/xdotool + ) +" RDEPEND=" - ${DEPEND} + ${COMMON_DEPEND} app-shells/bash python? ( ${PYTHON_DEPS} ) " @@ -111,3 +122,11 @@ src_install() { done fi } + +distutils_enable_tests pytest + +src_test() { + ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient" + ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm" + python_test +} diff --git a/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild b/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild index f374bfa2fc7a..652478161a90 100644 --- a/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild +++ b/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild @@ -21,10 +21,11 @@ fi LICENSE="BSD-2" SLOT="0" -IUSE="+doc python" +IUSE="+doc python test" +RESTRICT="!test? ( test )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -DEPEND=" +COMMON_DEPEND=" media-libs/freetype x11-libs/libX11 x11-libs/libXext @@ -32,8 +33,18 @@ DEPEND=" x11-libs/libXinerama x11-libs/libXrandr " +DEPEND=" + ${COMMON_DEPEND} + test? ( + dev-python/ewmh + dev-python/python-xlib + x11-apps/xsetroot + x11-base/xorg-server[xephyr,xvfb] + x11-misc/xdotool + ) +" RDEPEND=" - ${DEPEND} + ${COMMON_DEPEND} app-shells/bash python? ( ${PYTHON_DEPS} ) " @@ -111,3 +122,11 @@ src_install() { done fi } + +distutils_enable_tests pytest + +src_test() { + ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient" + ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm" + python_test +} |