diff options
authorSean Whitton <>2016-08-01 10:46:47 -0700
committerSean Whitton <>2016-08-01 10:46:47 -0700
commitecc663f6b4518069b389a1e3f2e1b9f4bddaad3a (patch)
parenta2393770b6c09f7d67a5f06b090019ae0357f034 (diff)
update dh_elpa_test(1) for new config file
1 files changed, 29 insertions, 35 deletions
diff --git a/dh_elpa_test b/dh_elpa_test
index 254cfb9..b735b81 100755
--- a/dh_elpa_test
+++ b/dh_elpa_test
@@ -24,34 +24,39 @@ 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.
-B<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.
+=head1 FILES
=over 4
- export DH_ELPA_TEST_BUTTERCUP_LOAD_PATH=lib,other_lib
+=item debian/elpa-test
+An INI-format configuration file, where each line is of the form
+I<key> = I<value>, with I<key> drawn from the list of configuration
+options below.
+Note that you should not surround values with double quotation marks.
+This is convenient for including lisp. Configuration values cannot
+cover more than one line. Lines preceded with a # are ignored as
-Also note that due to Makefile syntax, any dollar signs in your
-regular expressions must be replaced with two dollar signs.
=over 4
+=item B<disable>
-If this variable is set, dh_elpa(1) will not invoke B<dh_elpa_test>.
+If this variable is set to any value, dh_elpa(1) will not invoke
+=item B<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
B<-L> command line argument.
+=item B<buttercup_patterns>
A comma-separated list of Emacs regular expressions jointly matching
all and only the files containing Buttercup tests that you wish to
@@ -59,12 +64,12 @@ run. If this variable is not defined, all tests that can be found
will be run. Will be passed to buttercup(1) with its B<-p> command
line argument.
+=item B<ert_exclude>
A comma-separated list of file globs matching files containing ERT
tests that should not be run.
+=item B<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, B<dh_elpa_test>
@@ -75,22 +80,29 @@ but don't actually run the tests. For that, you can use something like
=over 4
- export DH_ELPA_TEST_ERT_EVAL=(load-file "test-helper.el")
+ ert_eval = (load-file "test-helper.el")
+=item B<ert_eval>
Emacs Lisp code to be run prior to running ERT tests by the Emacs
instance spawned by B<dh_elpa_test> to run those tests.
+=item B<ert_load_path>
A comma-separated list of directories to add to the load-path when
B<dh_elpa_test> invokes Emacs to run ERT tests.
+Older versions of B<dh_elpa_test> were configured using environment
+variables corresponding to the above configuration keys. For example,
+the B<ert_eval> configuration key replaced environment variable
+B<DH_ELPA_TEST_ERT_EVAL>. Their use is now deprecated.
use File::Find::Rule;
@@ -240,21 +252,3 @@ if (@ert_files) {
-=head1 EXAMPLES
-Here is an example of using the helper in a dh(1) style debian/rules
-=over 4
- #!/usr/bin/make -f
- export DH_ELPA_TEST_BUTTERCUP_LOAD_PATH=lib,other_lib
- export DH_ELPA_TEST_ERT_EXCLUDE=broken-tests/*.el
- %:
- dh $@ --with elpa