summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gentoo.org>2020-07-28 12:07:51 -0600
committerNicolas Bock <nicolasbock@gentoo.org>2020-08-26 05:44:29 -0600
commit73b2695d16c80a3bdb84e3edaf3289089ad7f60a (patch)
tree4cf04d23e6718f0e2bb76aed0f9ae3588b3df31d
parentsys-kernel/vanilla-sources: Automated version bump to {4.4.234,4.9.234,4.14.1... (diff)
downloadgentoo-73b2695d16c80a3bdb84e3edaf3289089ad7f60a.tar.gz
gentoo-73b2695d16c80a3bdb84e3edaf3289089ad7f60a.tar.bz2
gentoo-73b2695d16c80a3bdb84e3edaf3289089ad7f60a.zip
mail-client/neomutt: Add unit tests
This change addds unit tests to neomutt. Those tests come from a separate repository. Closes: https://bugs.gentoo.org/734122 Closes: https://bugs.gentoo.org/728886 Signed-off-by: Nicolas Bock <nicolasbock@gentoo.org>
-rw-r--r--mail-client/neomutt/Manifest1
-rw-r--r--mail-client/neomutt/neomutt-20200626-r1.ebuild51
2 files changed, 35 insertions, 17 deletions
diff --git a/mail-client/neomutt/Manifest b/mail-client/neomutt/Manifest
index 10ccd55623e4..c00474b5dc08 100644
--- a/mail-client/neomutt/Manifest
+++ b/mail-client/neomutt/Manifest
@@ -1 +1,2 @@
DIST neomutt-20200626.tar.gz 3349377 BLAKE2B 4fd75c2e8e8b3d55a63f954cb261c3930f871141c73d3fb8d2f42422735f3f862bae6966249187632aa2d55acb0372cd150381e11ce936cfef9976c71e43eb67 SHA512 f4ffc958bdd02107b2dd11bf321483a6e1e73a67e0540d034ab26f9eb13930ad80299b11f79acaedb4262f8f8643f9ce4baa388bc7f901b9ae35e9650acdcc9e
+DIST neomutt-test-files-8629adab700a75c54e8e28bf05ad092503a98f75.tar.gz 3673 BLAKE2B 50354f19aedc5fc07d59ecb5b38fa65de16119bc0929f47014bd35dab4d3a4e5953c8b35670f3440003cf0cbccc2d0d2b3a869dc929cdc3cd60b02790270fb54 SHA512 3d4962210bc558234d818801dcaa7851a0aef011c96d91c054af535186ffda42059fc61fb148c48e1b076999fe3159b31589a69a29ed1897f8928f52fcc157d3
diff --git a/mail-client/neomutt/neomutt-20200626-r1.ebuild b/mail-client/neomutt/neomutt-20200626-r1.ebuild
index d07e9f9f6842..d45bb5419716 100644
--- a/mail-client/neomutt/neomutt-20200626-r1.ebuild
+++ b/mail-client/neomutt/neomutt-20200626-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit eutils flag-o-matic
+inherit eutils
if [[ ${PV} =~ 99999999$ ]]; then
inherit git-r3
@@ -14,6 +14,9 @@ else
KEYWORDS="~amd64 ~x86"
fi
+TEST_FILES_COMMIT=8629adab700a75c54e8e28bf05ad092503a98f75
+SRC_URI+=" test? ( https://github.com/${PN}/neomutt-test-files/archive/${TEST_FILES_COMMIT}.tar.gz -> neomutt-test-files-${TEST_FILES_COMMIT}.tar.gz )"
+
DESCRIPTION="A small but very powerful text-based mail client"
HOMEPAGE="https://neomutt.org/"
@@ -21,11 +24,7 @@ LICENSE="GPL-2"
SLOT="0"
IUSE="berkdb doc gdbm gnutls gpgme idn kerberos kyotocabinet libressl
lmdb nls notmuch pgp-classic qdbm sasl selinux slang smime-classic
- ssl tokyocabinet"
-
-# Disable tests until neomutt-test-files are avablae
-# (https://bugs.gentoo.org/734122)
-RESTRICT=test
+ ssl tokyocabinet test"
CDEPEND="
app-misc/mime-types
@@ -37,38 +36,45 @@ CDEPEND="
)
<sys-libs/db-6.3:=
)
- gdbm? ( sys-libs/gdbm )
+ gdbm? ( sys-libs/gdbm:= )
kyotocabinet? ( dev-db/kyotocabinet )
- lmdb? ( dev-db/lmdb )
+ lmdb? ( dev-db/lmdb:= )
nls? ( virtual/libintl )
qdbm? ( dev-db/qdbm )
tokyocabinet? ( dev-db/tokyocabinet )
- gnutls? ( >=net-libs/gnutls-1.0.17 )
- gpgme? ( >=app-crypt/gpgme-0.9.0 )
+ gnutls? ( >=net-libs/gnutls-1.0.17:= )
+ gpgme? ( >=app-crypt/gpgme-0.9.0:= )
idn? ( net-dns/libidn:= )
kerberos? ( virtual/krb5 )
- notmuch? ( net-mail/notmuch )
+ notmuch? ( net-mail/notmuch:= )
sasl? ( >=dev-libs/cyrus-sasl-2 )
- !slang? ( sys-libs/ncurses:0 )
+ !slang? ( sys-libs/ncurses:0= )
slang? ( sys-libs/slang )
ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6:0 )
- libressl? ( dev-libs/libressl )
+ !libressl? ( >=dev-libs/openssl-1.0.2u:0= )
+ libressl? ( dev-libs/libressl:= )
)
"
DEPEND="${CDEPEND}
- dev-lang/tcl
+ dev-lang/tcl:=
net-mail/mailbase
doc? (
dev-libs/libxml2
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
- || ( www-client/lynx www-client/w3m www-client/elinks )
- )"
+ || (
+ www-client/lynx
+ www-client/w3m
+ www-client/elinks
+ )
+ )
+"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-mutt )
"
+RESTRICT="!test? ( test )"
+
src_configure() {
local myconf=(
"$(usex doc --full-doc --disable-doc)"
@@ -94,11 +100,22 @@ src_configure() {
"--sysconfdir=${EPREFIX}/etc/${PN}"
"$(use_enable ssl)"
"$(use_enable gnutls)"
+
+ "$(usex test --testing --disable-testing)"
)
econf CCACHE=none "${myconf[@]}"
}
+src_test() {
+ local test_dir="$(readlink --canonicalize ${S}/../neomutt-test-files-${TEST_FILES_COMMIT})"
+ pushd ${test_dir} || die "Could not cd into test_dir"
+ NEOMUTT_TEST_DIR="${test_dir}" ./setup.sh \
+ || die "Failed to run the setup.sh script"
+ popd || die "Could not cd back"
+ NEOMUTT_TEST_DIR="${test_dir}" emake test
+}
+
src_install() {
emake DESTDIR="${D}" install