From 9dfefe999455c8c29de495bd250b89066de11ec0 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sun, 25 Aug 2024 18:11:33 +0200 Subject: app-xemacs/ebuild-mode: Enable tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ulrich Müller --- app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild b/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild index e8a7b29..08028ad 100644 --- a/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild +++ b/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild @@ -17,31 +17,39 @@ S="${WORKDIR}/${PN}" LICENSE="GPL-2+" SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" -RDEPEND=">=app-editors/xemacs-21.4.20-r5 +RDEPEND=">=app-editors/xemacs-21.4.24-r9 app-xemacs/sh-script" -BDEPEND="${RDEPEND}" +BDEPEND="${RDEPEND} + test? ( || ( + >=app-editors/xemacs-21.5.35 + app-xemacs/test-harness + ) )" src_compile() { - local XEMACS="${EPREFIX}/usr/bin/xemacs" + local EMACS="${EPREFIX}/usr/bin/xemacs" - "${XEMACS}" -batch -q --no-site-file \ + "${EMACS}" -batch -q --no-site-file \ -eval "(add-to-list 'load-path nil)" \ -f batch-byte-compile \ ebuild-mode.el gentoo-newsitem-mode.el || die - "${XEMACS}" -batch -q --no-site-file \ + "${EMACS}" -batch -q --no-site-file \ -eval "(setq autoload-package-name \"${PN}\")" \ -eval "(setq generated-autoload-file \"${S}/auto-autoloads.el\")" \ -l autoload -f batch-update-autoloads \ ebuild-mode.el gentoo-newsitem-mode.el || die } -src_test() { :; } # ERT is not yet available for XEmacs +src_test() { + emake check EMACS="${EPREFIX}/usr/bin/xemacs" +} src_install() { insinto /usr/share/xemacs/site-packages/lisp/${PN} - doins *.el *.elc + doins ebuild-mode.{el,elc} gentoo-newsitem-mode.{el,elc} auto-autoloads.el # XEmacs 21.4 compatibility dosym -r /usr/{share,lib}/xemacs/site-packages/lisp/${PN} } -- cgit v1.2.3-65-gdbad