commit:     02f5a42867aba21641749b289962029b1b66a5d7
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 12 18:06:27 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Oct 15 15:43:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02f5a428

www-client/qutebrowser: enable tests

Difficult to enable every tests (notably annoyances with IPC
tests) but still provides >7500 passing tests that should be
mostly enough to check for blatant regressions.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 profiles/arch/arm64/package.use.mask               |  4 ++
 www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild | 48 ++++++++++++++++++++--
 2 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/profiles/arch/arm64/package.use.mask 
b/profiles/arch/arm64/package.use.mask
index b240d240249..4b28cdb018a 100644
--- a/profiles/arch/arm64/package.use.mask
+++ b/profiles/arch/arm64/package.use.mask
@@ -1,6 +1,10 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Ionen Wolkens <io...@gentoo.org> (2021-10-15)
+# dev-python/pytest-bdd is not keyworded here yet
+www-client/qutebrowser test
+
 # Jakov Smolić <jsmo...@gentoo.org> (2021-10-07)
 # dev-libs/mongo-c-driver is not keyworded here
 net-analyzer/zmap mongo

diff --git a/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild 
b/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild
index 510e711ce98..4fd97899626 100644
--- a/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild
+++ b/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild
@@ -21,9 +21,6 @@ HOMEPAGE="https://www.qutebrowser.org/";
 LICENSE="GPL-3+"
 SLOT="0"
 IUSE="+adblock widevine"
-# Tests depend (misc/requirements/requirements-tests.txt) on plugins
-# we don't have packages for.
-RESTRICT="test"
 
 RDEPEND="
        dev-qt/qtcore:5[icu]
@@ -42,7 +39,22 @@ RDEPEND="
                adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )
        ')
        widevine? ( www-plugins/chrome-binary-plugins )"
-BDEPEND="app-text/asciidoc"
+BDEPEND="
+       app-text/asciidoc
+       $(python_gen_cond_dep '
+               test? (
+                       dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+                       dev-python/cheroot[${PYTHON_USEDEP}]
+                       dev-python/flask[${PYTHON_USEDEP}]
+                       dev-python/hypothesis[${PYTHON_USEDEP}]
+                       dev-python/pytest-bdd[${PYTHON_USEDEP}]
+                       dev-python/pytest-mock[${PYTHON_USEDEP}]
+                       dev-python/pytest-qt[${PYTHON_USEDEP}]
+                       dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
+                       dev-python/pytest-xvfb[${PYTHON_USEDEP}]
+                       dev-python/tldextract[${PYTHON_USEDEP}]
+               )
+       ')"
 
 distutils_enable_tests pytest
 
@@ -57,6 +69,34 @@ python_prepare_all() {
        sed -i '/setup.py/d' misc/Makefile || die
 
        [[ ${PV} != 9999 ]] || ${EPYTHON} scripts/asciidoc2html.py || die
+
+       # these plugins/tests are unnecessary here and have extra dependencies
+       sed -e '/pytest-benchmark/d;s/--benchmark[^ ]*//' \
+               -e '/pytest-instafail/d;s/--instafail//' \
+               -i pytest.ini || die
+       [[ ${PV} == 9999 ]] || rm tests/unit/scripts/test_problemmatchers.py || 
die
+       [[ ${PV} != 9999 ]] || rm tests/unit/scripts/test_run_vulture.py || die
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # end2end and other IPC tests are broken with "Name error" if
+               # socket path is over 104 characters (=124 in /var/tmp/portage)
+               # https://github.com/qutebrowser/qutebrowser/issues/888 (not 
just OSX)
+               tests/end2end
+               tests/unit/misc/test_ipc.py
+               # tests that don't know about our newer qtwebengine
+               
tests/unit/browser/webengine/test_webenginedownloads.py::TestDataUrlWorkaround
+               tests/unit/utils/test_version.py::TestChromiumVersion
+               # needs qtwebkit and isn't skipped by default
+               tests/unit/config/test_websettings.py::test_config_init
+               # may misbehave depending on installed old python versions
+               tests/unit/misc/test_checkpyver.py::test_old_python
+       )
+       use widevine && EPYTEST_DESELECT+=( tests/unit/config/test_qtargs.py )
+
+       # skip benchmarks (incl. _tree), and warning tests broken by -Wdefault
+       epytest -k 'not _bench and not _matches_tree and not _warning'
 }
 
 python_install_all() {

Reply via email to