diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-04-03 18:38:32 +0200 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-04-18 02:35:46 +0200 |
commit | e1411e05184086ea6b91a20e5dc7bdd4795f3b5f (patch) | |
tree | 8c6a5aedd8f2fd54640acbf1f4f6a733587c719d /eclass | |
parent | eclass/elisp-common.eclass: add elisp-enable-tests and elisp-test (diff) | |
download | gentoo-e1411e05184086ea6b91a20e5dc7bdd4795f3b5f.tar.gz gentoo-e1411e05184086ea6b91a20e5dc7bdd4795f3b5f.tar.bz2 gentoo-e1411e05184086ea6b91a20e5dc7bdd4795f3b5f.zip |
eclass/elisp.eclass: add elisp_src_test
Closes: https://bugs.gentoo.org/898492
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/elisp.eclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass index 192f27384967..1ac1a2dbfabf 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} |