diff options
author | 2024-10-06 19:50:34 +0200 | |
---|---|---|
committer | 2024-10-06 21:51:36 +0200 | |
commit | b506dc58cbbb462610346bd332a27d16a06fec20 (patch) | |
tree | f38bb733f1ab460b8485ded706a7da7024e9c8d5 /app-emacs/ert-runner | |
parent | sci-mathematics/easycrypt: bump to 2024.09 (diff) | |
download | gentoo-b506dc58cbbb462610346bd332a27d16a06fec20.tar.gz gentoo-b506dc58cbbb462610346bd332a27d16a06fec20.tar.bz2 gentoo-b506dc58cbbb462610346bd332a27d16a06fec20.zip |
app-emacs/ert-runner: enable tests; minor tweaks
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-emacs/ert-runner')
-rw-r--r-- | app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild b/app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild new file mode 100644 index 000000000000..2124baa14fb0 --- /dev/null +++ b/app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp edo + +DESCRIPTION="Opinionated Emacs Ert testing workflow" +HOMEPAGE="https://github.com/rejeep/ert-runner.el/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/rejeep/${PN}.el.git" +else + SRC_URI="https://github.com/rejeep/${PN}.el/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}/${PN}.el-${PV}" + + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-emacs/ansi + app-emacs/commander + app-emacs/dash + app-emacs/f + app-emacs/dash + app-emacs/shut-up +" +BDEPEND=" + ${RDEPEND} + test? ( + app-emacs/ecukes + ) +" + +ELISP_REMOVE=" + Makefile + features/reporter.feature +" +PATCHES=( + "${FILESDIR}/${PN}-bin-launcher-fix.patch" +) + +DOCS=( README.md ) +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + elisp_src_prepare + + sed "s|@SITELISP@|${EPREFIX}${SITELISP}/${PN}|" -i "./bin/${PN}" || die +} + +src_compile() { + elisp_src_compile + elisp-compile ./reporters/*.el +} + +src_test() { + # Set up fake Cask for tests. + mkdir -p "${T}/bin" || die + cat <<-EOF >> "${T}/bin/cask" || die + #!/usr/bin/env bash + set -e + if [[ "\${1}" != exec ]] ; then echo "Not a exec call!" ; exit 1 ; fi + shift + "\${@}" + EOF + chmod +x "${T}/bin/cask" || die + local -x PATH="${T}/bin:${PATH}" || die + + edo ecukes --debug --reporter spec --script --verbose features +} + +src_install() { + elisp_src_install + elisp-install "${PN}/reporters" reporters/*.el{,c} + + exeinto /usr/bin + doexe "./bin/${PN}" +} |