* [gentoo-dev] [PATCH 2/9] eclass/elisp.eclass: add elisp_src_test
@ 2023-04-04 15:02 Maciej Barć
0 siblings, 0 replies; only message in thread
From: Maciej Barć @ 2023-04-04 15:02 UTC (permalink / raw
To: gentoo-dev; +Cc: gnu-emacs, Maciej Barć
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
---
eclass/elisp.eclass | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 192f27384..1ac1a2dbf 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -9,6 +9,7 @@
# Jeremy Maitin-Shepard <jbms@attbi.com>
# Christian Faulhammer <fauli@gentoo.org>
# Ulrich Müller <ulm@gentoo.org>
+# Maciej Barć <xgqt@gentoo.org>
# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: elisp-common
# @BLURB: Eclass for Emacs Lisp packages
@@ -142,6 +143,19 @@ elisp_src_compile() {
fi
}
+# @FUNCTION: elisp_src_test
+# @DESCRIPTION:
+# Call "elisp-test" to test the package if "elisp-enable-tests" was called
+# beforehand, otherwise execute the default test function - "src_test".
+
+elisp_src_test() {
+ if [[ ${_ELISP_TEST_FUNCTION} ]]; then
+ elisp-test
+ else
+ default_src_test
+ fi
+}
+
# @FUNCTION: elisp_src_install
# @DESCRIPTION:
# Call elisp-install to install all Emacs Lisp (*.el and *.elc) files.
@@ -187,5 +201,5 @@ elisp_pkg_postrm() {
elisp-site-regen
}
-EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,test,install} \
pkg_{setup,postinst,postrm}
--
2.39.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-04 15:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04 15:02 [gentoo-dev] [PATCH 2/9] eclass/elisp.eclass: add elisp_src_test Maciej Barć
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox