1 |
commit: 73b2695d16c80a3bdb84e3edaf3289089ad7f60a |
2 |
Author: Nicolas Bock <nicolasbock <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 28 18:07:51 2020 +0000 |
4 |
Commit: Nicolas Bock <nicolasbock <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 26 11:44:29 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73b2695d |
7 |
|
8 |
mail-client/neomutt: Add unit tests |
9 |
|
10 |
This change addds unit tests to neomutt. Those tests come from a |
11 |
separate repository. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/734122 |
14 |
Closes: https://bugs.gentoo.org/728886 |
15 |
Signed-off-by: Nicolas Bock <nicolasbock <AT> gentoo.org> |
16 |
|
17 |
mail-client/neomutt/Manifest | 1 + |
18 |
mail-client/neomutt/neomutt-20200626-r1.ebuild | 51 +++++++++++++++++--------- |
19 |
2 files changed, 35 insertions(+), 17 deletions(-) |
20 |
|
21 |
diff --git a/mail-client/neomutt/Manifest b/mail-client/neomutt/Manifest |
22 |
index 10ccd55623e..c00474b5dc0 100644 |
23 |
--- a/mail-client/neomutt/Manifest |
24 |
+++ b/mail-client/neomutt/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST neomutt-20200626.tar.gz 3349377 BLAKE2B 4fd75c2e8e8b3d55a63f954cb261c3930f871141c73d3fb8d2f42422735f3f862bae6966249187632aa2d55acb0372cd150381e11ce936cfef9976c71e43eb67 SHA512 f4ffc958bdd02107b2dd11bf321483a6e1e73a67e0540d034ab26f9eb13930ad80299b11f79acaedb4262f8f8643f9ce4baa388bc7f901b9ae35e9650acdcc9e |
27 |
+DIST neomutt-test-files-8629adab700a75c54e8e28bf05ad092503a98f75.tar.gz 3673 BLAKE2B 50354f19aedc5fc07d59ecb5b38fa65de16119bc0929f47014bd35dab4d3a4e5953c8b35670f3440003cf0cbccc2d0d2b3a869dc929cdc3cd60b02790270fb54 SHA512 3d4962210bc558234d818801dcaa7851a0aef011c96d91c054af535186ffda42059fc61fb148c48e1b076999fe3159b31589a69a29ed1897f8928f52fcc157d3 |
28 |
|
29 |
diff --git a/mail-client/neomutt/neomutt-20200626-r1.ebuild b/mail-client/neomutt/neomutt-20200626-r1.ebuild |
30 |
index d07e9f9f684..d45bb541971 100644 |
31 |
--- a/mail-client/neomutt/neomutt-20200626-r1.ebuild |
32 |
+++ b/mail-client/neomutt/neomutt-20200626-r1.ebuild |
33 |
@@ -3,7 +3,7 @@ |
34 |
|
35 |
EAPI=7 |
36 |
|
37 |
-inherit eutils flag-o-matic |
38 |
+inherit eutils |
39 |
|
40 |
if [[ ${PV} =~ 99999999$ ]]; then |
41 |
inherit git-r3 |
42 |
@@ -14,6 +14,9 @@ else |
43 |
KEYWORDS="~amd64 ~x86" |
44 |
fi |
45 |
|
46 |
+TEST_FILES_COMMIT=8629adab700a75c54e8e28bf05ad092503a98f75 |
47 |
+SRC_URI+=" test? ( https://github.com/${PN}/neomutt-test-files/archive/${TEST_FILES_COMMIT}.tar.gz -> neomutt-test-files-${TEST_FILES_COMMIT}.tar.gz )" |
48 |
+ |
49 |
DESCRIPTION="A small but very powerful text-based mail client" |
50 |
HOMEPAGE="https://neomutt.org/" |
51 |
|
52 |
@@ -21,11 +24,7 @@ LICENSE="GPL-2" |
53 |
SLOT="0" |
54 |
IUSE="berkdb doc gdbm gnutls gpgme idn kerberos kyotocabinet libressl |
55 |
lmdb nls notmuch pgp-classic qdbm sasl selinux slang smime-classic |
56 |
- ssl tokyocabinet" |
57 |
- |
58 |
-# Disable tests until neomutt-test-files are avablae |
59 |
-# (https://bugs.gentoo.org/734122) |
60 |
-RESTRICT=test |
61 |
+ ssl tokyocabinet test" |
62 |
|
63 |
CDEPEND=" |
64 |
app-misc/mime-types |
65 |
@@ -37,38 +36,45 @@ CDEPEND=" |
66 |
) |
67 |
<sys-libs/db-6.3:= |
68 |
) |
69 |
- gdbm? ( sys-libs/gdbm ) |
70 |
+ gdbm? ( sys-libs/gdbm:= ) |
71 |
kyotocabinet? ( dev-db/kyotocabinet ) |
72 |
- lmdb? ( dev-db/lmdb ) |
73 |
+ lmdb? ( dev-db/lmdb:= ) |
74 |
nls? ( virtual/libintl ) |
75 |
qdbm? ( dev-db/qdbm ) |
76 |
tokyocabinet? ( dev-db/tokyocabinet ) |
77 |
- gnutls? ( >=net-libs/gnutls-1.0.17 ) |
78 |
- gpgme? ( >=app-crypt/gpgme-0.9.0 ) |
79 |
+ gnutls? ( >=net-libs/gnutls-1.0.17:= ) |
80 |
+ gpgme? ( >=app-crypt/gpgme-0.9.0:= ) |
81 |
idn? ( net-dns/libidn:= ) |
82 |
kerberos? ( virtual/krb5 ) |
83 |
- notmuch? ( net-mail/notmuch ) |
84 |
+ notmuch? ( net-mail/notmuch:= ) |
85 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
86 |
- !slang? ( sys-libs/ncurses:0 ) |
87 |
+ !slang? ( sys-libs/ncurses:0= ) |
88 |
slang? ( sys-libs/slang ) |
89 |
ssl? ( |
90 |
- !libressl? ( >=dev-libs/openssl-0.9.6:0 ) |
91 |
- libressl? ( dev-libs/libressl ) |
92 |
+ !libressl? ( >=dev-libs/openssl-1.0.2u:0= ) |
93 |
+ libressl? ( dev-libs/libressl:= ) |
94 |
) |
95 |
" |
96 |
DEPEND="${CDEPEND} |
97 |
- dev-lang/tcl |
98 |
+ dev-lang/tcl:= |
99 |
net-mail/mailbase |
100 |
doc? ( |
101 |
dev-libs/libxml2 |
102 |
dev-libs/libxslt |
103 |
app-text/docbook-xsl-stylesheets |
104 |
- || ( www-client/lynx www-client/w3m www-client/elinks ) |
105 |
- )" |
106 |
+ || ( |
107 |
+ www-client/lynx |
108 |
+ www-client/w3m |
109 |
+ www-client/elinks |
110 |
+ ) |
111 |
+ ) |
112 |
+" |
113 |
RDEPEND="${CDEPEND} |
114 |
selinux? ( sec-policy/selinux-mutt ) |
115 |
" |
116 |
|
117 |
+RESTRICT="!test? ( test )" |
118 |
+ |
119 |
src_configure() { |
120 |
local myconf=( |
121 |
"$(usex doc --full-doc --disable-doc)" |
122 |
@@ -94,11 +100,22 @@ src_configure() { |
123 |
"--sysconfdir=${EPREFIX}/etc/${PN}" |
124 |
"$(use_enable ssl)" |
125 |
"$(use_enable gnutls)" |
126 |
+ |
127 |
+ "$(usex test --testing --disable-testing)" |
128 |
) |
129 |
|
130 |
econf CCACHE=none "${myconf[@]}" |
131 |
} |
132 |
|
133 |
+src_test() { |
134 |
+ local test_dir="$(readlink --canonicalize ${S}/../neomutt-test-files-${TEST_FILES_COMMIT})" |
135 |
+ pushd ${test_dir} || die "Could not cd into test_dir" |
136 |
+ NEOMUTT_TEST_DIR="${test_dir}" ./setup.sh \ |
137 |
+ || die "Failed to run the setup.sh script" |
138 |
+ popd || die "Could not cd back" |
139 |
+ NEOMUTT_TEST_DIR="${test_dir}" emake test |
140 |
+} |
141 |
+ |
142 |
src_install() { |
143 |
emake DESTDIR="${D}" install |