diff options
author | Nicolas Bock <nicolasbock@gentoo.org> | 2020-07-28 12:07:51 -0600 |
---|---|---|
committer | Nicolas Bock <nicolasbock@gentoo.org> | 2020-08-26 05:44:29 -0600 |
commit | 73b2695d16c80a3bdb84e3edaf3289089ad7f60a (patch) | |
tree | 4cf04d23e6718f0e2bb76aed0f9ae3588b3df31d /mail-client/neomutt/neomutt-20200626-r1.ebuild | |
parent | sys-kernel/vanilla-sources: Automated version bump to {4.4.234,4.9.234,4.14.1... (diff) | |
download | gentoo-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>
Diffstat (limited to 'mail-client/neomutt/neomutt-20200626-r1.ebuild')
-rw-r--r-- | mail-client/neomutt/neomutt-20200626-r1.ebuild | 51 |
1 files changed, 34 insertions, 17 deletions
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 |