• [gentoo-dev] [PATCH 2/9] eclass/elisp.eclass: add elisp_src_test

    From =?UTF-8?q?Maciej=20Bar=C4=87?=@21:1/5 to All on Tue Apr 4 17:10:01 2023
    Signed-off-by: Maciej Barć <[email protected]>
    ---
    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 <[email protected]>
    # Christian Faulhammer <[email protected]>
    # Ulrich Müller <[email protected]>
    +# Maciej Barć <[email protected]>
    # @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.
    @@ -