dh_elpa_test(1) run ELPA package testsuites

SYNOPSIS

dh_elpa_test [debhelperĀ options] [pkg-file]

DESCRIPTION

dh_elpa_test is a debhelper program that is responsible for running the testsuites of ELPA packages, when those test suites use ERT or buttercup(1). dh_auto_test is rarely suitable.

Testing with buttercup(1) will be activated if the package build-depends on elpa-buttercup. Testing with ERT will be activated if ERT test files can be found. Neither kind of test will be activated unless the debhelper compat level is 10 or higher.

ENVIRONMENT VARIABLES

dh_elpa_test will respond to the following variables set, for example, at the top of your debian/rules file. Do not surround variable values with double-quotation marks. E.g.

    export DH_ELPA_TEST_BUTTERCUP_LOAD_PATH=lib,other_lib

Also note that due to Makefile syntax, any dollar signs in your regular expressions must be replaced with two dollar signs.

DH_ELPA_TEST_DISABLE
If this variable is set, dh_elpa(1) will not invoke dh_elpa_test.
DH_ELPA_TEST_BUTTERCUP_LOAD_PATH
A comma-separated list of directories to add to the load-path when buttercup(1) invokes Emacs. Will be passed to buttercup(1) with its -L command line argument.
DH_ELPA_TEST_BUTTERCUP_PATTERNS
A comma-separated list of Emacs regular expressions jointly matching all and only the files containing Buttercup tests that you wish to run. If this variable is not defined, all tests that can be found will be run. Will be passed to buttercup(1) with its -p command line argument.
DH_ELPA_TEST_ERT_EXCLUDE
A comma-separated list of file globs matching files containing ERT tests that should not be run.
DH_ELPA_TEST_ERT_HELPER
The name of a *.el file containing Emacs Lisp code that will run the ERT test suite. When this variable is not defined, dh_elpa_test calls the function (ert-run-tests-batch-and-exit).

Note that this is not the way to load test helpers that do needed work but don't actually run the tests. For that, you can use something like

    export DH_ELPA_TEST_ERT_EVAL=(load-file "test-helper.el")
DH_ELPA_TEST_ERT_EVAL
Emacs Lisp code to be run prior to running ERT tests by the Emacs instance spawned by dh_elpa_test to run those tests.
DH_ELPA_TEST_ERT_LOAD_PATH
A comma-separated list of directories to add to the load-path when dh_elpa_test invokes Emacs to run ERT tests.

EXAMPLES

Here is an example of using the helper in a dh(1) style debian/rules

    #!/usr/bin/make -f
    export DH_ELPA_TEST_BUTTERCUP_LOAD_PATH=lib,other_lib
    %:
        dh $@ --with elpa