1 |
commit: 02f5a42867aba21641749b289962029b1b66a5d7 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 12 18:06:27 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 15 15:43:53 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02f5a428 |
7 |
|
8 |
www-client/qutebrowser: enable tests |
9 |
|
10 |
Difficult to enable every tests (notably annoyances with IPC |
11 |
tests) but still provides >7500 passing tests that should be |
12 |
mostly enough to check for blatant regressions. |
13 |
|
14 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
15 |
|
16 |
profiles/arch/arm64/package.use.mask | 4 ++ |
17 |
www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild | 48 ++++++++++++++++++++-- |
18 |
2 files changed, 48 insertions(+), 4 deletions(-) |
19 |
|
20 |
diff --git a/profiles/arch/arm64/package.use.mask b/profiles/arch/arm64/package.use.mask |
21 |
index b240d240249..4b28cdb018a 100644 |
22 |
--- a/profiles/arch/arm64/package.use.mask |
23 |
+++ b/profiles/arch/arm64/package.use.mask |
24 |
@@ -1,6 +1,10 @@ |
25 |
# Copyright 1999-2021 Gentoo Authors |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
|
28 |
+# Ionen Wolkens <ionen@g.o> (2021-10-15) |
29 |
+# dev-python/pytest-bdd is not keyworded here yet |
30 |
+www-client/qutebrowser test |
31 |
+ |
32 |
# Jakov Smolić <jsmolic@g.o> (2021-10-07) |
33 |
# dev-libs/mongo-c-driver is not keyworded here |
34 |
net-analyzer/zmap mongo |
35 |
|
36 |
diff --git a/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild b/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild |
37 |
index 510e711ce98..4fd97899626 100644 |
38 |
--- a/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild |
39 |
+++ b/www-client/qutebrowser/qutebrowser-2.3.1-r2.ebuild |
40 |
@@ -21,9 +21,6 @@ HOMEPAGE="https://www.qutebrowser.org/" |
41 |
LICENSE="GPL-3+" |
42 |
SLOT="0" |
43 |
IUSE="+adblock widevine" |
44 |
-# Tests depend (misc/requirements/requirements-tests.txt) on plugins |
45 |
-# we don't have packages for. |
46 |
-RESTRICT="test" |
47 |
|
48 |
RDEPEND=" |
49 |
dev-qt/qtcore:5[icu] |
50 |
@@ -42,7 +39,22 @@ RDEPEND=" |
51 |
adblock? ( dev-python/adblock[${PYTHON_USEDEP}] ) |
52 |
') |
53 |
widevine? ( www-plugins/chrome-binary-plugins )" |
54 |
-BDEPEND="app-text/asciidoc" |
55 |
+BDEPEND=" |
56 |
+ app-text/asciidoc |
57 |
+ $(python_gen_cond_dep ' |
58 |
+ test? ( |
59 |
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}] |
60 |
+ dev-python/cheroot[${PYTHON_USEDEP}] |
61 |
+ dev-python/flask[${PYTHON_USEDEP}] |
62 |
+ dev-python/hypothesis[${PYTHON_USEDEP}] |
63 |
+ dev-python/pytest-bdd[${PYTHON_USEDEP}] |
64 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
65 |
+ dev-python/pytest-qt[${PYTHON_USEDEP}] |
66 |
+ dev-python/pytest-rerunfailures[${PYTHON_USEDEP}] |
67 |
+ dev-python/pytest-xvfb[${PYTHON_USEDEP}] |
68 |
+ dev-python/tldextract[${PYTHON_USEDEP}] |
69 |
+ ) |
70 |
+ ')" |
71 |
|
72 |
distutils_enable_tests pytest |
73 |
|
74 |
@@ -57,6 +69,34 @@ python_prepare_all() { |
75 |
sed -i '/setup.py/d' misc/Makefile || die |
76 |
|
77 |
[[ ${PV} != 9999 ]] || ${EPYTHON} scripts/asciidoc2html.py || die |
78 |
+ |
79 |
+ # these plugins/tests are unnecessary here and have extra dependencies |
80 |
+ sed -e '/pytest-benchmark/d;s/--benchmark[^ ]*//' \ |
81 |
+ -e '/pytest-instafail/d;s/--instafail//' \ |
82 |
+ -i pytest.ini || die |
83 |
+ [[ ${PV} == 9999 ]] || rm tests/unit/scripts/test_problemmatchers.py || die |
84 |
+ [[ ${PV} != 9999 ]] || rm tests/unit/scripts/test_run_vulture.py || die |
85 |
+} |
86 |
+ |
87 |
+python_test() { |
88 |
+ local EPYTEST_DESELECT=( |
89 |
+ # end2end and other IPC tests are broken with "Name error" if |
90 |
+ # socket path is over 104 characters (=124 in /var/tmp/portage) |
91 |
+ # https://github.com/qutebrowser/qutebrowser/issues/888 (not just OSX) |
92 |
+ tests/end2end |
93 |
+ tests/unit/misc/test_ipc.py |
94 |
+ # tests that don't know about our newer qtwebengine |
95 |
+ tests/unit/browser/webengine/test_webenginedownloads.py::TestDataUrlWorkaround |
96 |
+ tests/unit/utils/test_version.py::TestChromiumVersion |
97 |
+ # needs qtwebkit and isn't skipped by default |
98 |
+ tests/unit/config/test_websettings.py::test_config_init |
99 |
+ # may misbehave depending on installed old python versions |
100 |
+ tests/unit/misc/test_checkpyver.py::test_old_python |
101 |
+ ) |
102 |
+ use widevine && EPYTEST_DESELECT+=( tests/unit/config/test_qtargs.py ) |
103 |
+ |
104 |
+ # skip benchmarks (incl. _tree), and warning tests broken by -Wdefault |
105 |
+ epytest -k 'not _bench and not _matches_tree and not _warning' |
106 |
} |
107 |
|
108 |
python_install_all() { |