summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/NEWS16
-rwxr-xr-xdh_elpa.in7
-rwxr-xr-xdh_elpa_test9
-rwxr-xr-xelpa.pm3
4 files changed, 20 insertions, 15 deletions
diff --git a/debian/NEWS b/debian/NEWS
index b5196d3..50964ff 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,13 +1,13 @@
dh-elpa (0.0.20) unstable; urgency=medium
This version of dh_elpa will try to run any ERT and Buttercup test
- suites that it can find. If you are currently running your
- package's test suite with a override_dh_auto_test stanza in
- debian/rules, or if there exists an upstream test suite that you are
- not running, dh_elpa will override any override_dh_auto_test stanza
- and try to run the test suite. If it can't run it in its default
- configuration, this will lead to your package failing to build from
- source.
+ suites that it can find if you set the debhelper compat level to 10
+ or above. If you are currently running your package's test suite
+ with a override_dh_auto_test stanza in debian/rules, or if there
+ exists an upstream test suite that you are not running, dh_elpa will
+ override any override_dh_auto_test stanza and try to run the test
+ suite. If it can't run it in its default configuration, this will
+ lead to your package failing to build from source.
The easy fix is to add a line like this to the top of your debian/rules:
@@ -18,4 +18,4 @@ dh-elpa (0.0.20) unstable; urgency=medium
dh_elpa_test(1) for how to configure dh_elpa_test to run the test
suite successfully.
- -- Sean Whitton <spwhitton@spwhitton.name> Mon, 11 Apr 2016 07:39:26 -0700
+ -- Sean Whitton <spwhitton@spwhitton.name>, Sun, 1 May 2016 10:46:33 -0700
diff --git a/dh_elpa.in b/dh_elpa.in
index f9e86cf..94fa94f 100755
--- a/dh_elpa.in
+++ b/dh_elpa.in
@@ -24,9 +24,10 @@ B<dh_elpa> is a debhelper program that is responsible for installing
elpa style emacs lisp packages into package build directories.
B<dh_elpa> will attempt to run ERT and Buttercup test suites using
-dh_elpa_test(1). To disable this behaviour, or tweak it if it is
-failing to run the tests as they should be run, set environment
-variables in debian/rules as detailed in dh_elpa_test(1).
+dh_elpa_test(1) if the debhelper compat level is 10 or higher. To
+disable this behaviour, or tweak it if it is failing to run the tests
+as they should be run, set environment variables in debian/rules as
+detailed in dh_elpa_test(1).
=head1 FILES
diff --git a/dh_elpa_test b/dh_elpa_test
index c2d366a..d91925c 100755
--- a/dh_elpa_test
+++ b/dh_elpa_test
@@ -21,7 +21,8 @@ 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.
+if ERT test files can be found. Neither kind of test will be
+activated unless the debhelper compat level is 10 or higher.
=head1 ENVIRONMENT VARIABLES
@@ -98,7 +99,11 @@ use Array::Utils qw{ array_minus };
use Debian::Debhelper::Dh_Lib;
use Debian::Control;
-if (get_buildoption("nocheck")) {
+# This checks whether the debhelper compat is 10 or above. With
+# debhelper compat below 9, dh_elpa_test will get run more in more
+# than one sequence, including inside fakeroot, which can cause tests
+# to fail
+if ( get_buildoption("nocheck") || compat(9) ) {
exit 0;
}
diff --git a/elpa.pm b/elpa.pm
index dc64e33..cd0dfd2 100755
--- a/elpa.pm
+++ b/elpa.pm
@@ -8,8 +8,7 @@ use Debian::Debhelper::Dh_Lib;
insert_after("dh_install", "dh_elpa");
unless ( defined $ENV{ 'DH_ELPA_TEST_DISABLE' } ) {
- # insert_after("dh_auto_test", "dh_elpa_test"); # test suite gets run more than once
- add_command("dh_elpa_test", "build");
+ insert_after("dh_auto_test", "dh_elpa_test");
remove_command("dh_auto_test");
}