diff options
author | Florian Schmaus <flow@gentoo.org> | 2021-07-28 10:36:09 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2021-07-28 10:37:30 +0200 |
commit | a70ed336e8cce6efe9baf0ba764b5bc927b1d526 (patch) | |
tree | fc7614b49c3c8e1a28313c9e9b124ac787953e8f /x11-wm | |
parent | sys-libs/libblockdev: Synced live ebuild (diff) | |
download | gentoo-a70ed336e8cce6efe9baf0ba764b5bc927b1d526.tar.gz gentoo-a70ed336e8cce6efe9baf0ba764b5bc927b1d526.tar.bz2 gentoo-a70ed336e8cce6efe9baf0ba764b5bc927b1d526.zip |
x11-wm/herbstluftwm: improve src_test, use distutils-r1_src_test
Using distutils' src_test facilities also means that we can get rid of
the "export PYTHONPATH" workaround.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/herbstluftwm/herbstluftwm-9999.ebuild | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild b/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild index 37035a6a5ff8..ed397f906c24 100644 --- a/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild +++ b/x11-wm/herbstluftwm/herbstluftwm-9999.ebuild @@ -55,6 +55,10 @@ BDEPEND=" " if [[ -n "${EGIT_REPO_URI}" ]]; then + # If hlwm is build from VCS, then hlwm-doc.json, which is used in + # the tests, needs to generated by the WITH_DOCUMENTATION option. + REQUIRED_USE+=" test? ( doc )" + # Herbstluftwm tarballs ship with pre-compiled documentation, only # if we build from git asciidoc is needed. BDEPEND+=" doc? ( app-text/asciidoc )" @@ -126,15 +130,21 @@ src_install() { 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() { pushd python > /dev/null || die distutils_install_for_testing popd > /dev/null || die - # Ensure PYTHONPATH is exported, see https://bugs.gentoo.org/801658. - export PYTHONPATH - python_test + distutils-r1_python_test +} + +src_test() { + if [[ -n "${EGIT_REPO_URI}" ]]; then + ln -s "${BUILD_DIR}/doc/hlwm-doc.json" "doc/hlwm-doc.json" || die "Could not symlink hlwm-doc.json" + fi + + ln -s "${BUILD_DIR}/herbstclient" || die "Could not symlink herbstclient" + ln -s "${BUILD_DIR}/herbstluftwm" || die "Could not symlink herbstluftwm" + + distutils-r1_src_test } |