From 856c012f99043d304f07693794dbca7a471e3dbf Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 10 Apr 2016 10:08:52 -0700 Subject: use an environment variable to disable testing --- debian/install | 1 - dh_elpa.in | 12 +++++------- dh_elpa_test | 4 ++++ elpa.pm | 6 ++++++ elpa_plus_test.pm | 13 ------------- 5 files changed, 15 insertions(+), 21 deletions(-) mode change 100644 => 100755 elpa.pm delete mode 100755 elpa_plus_test.pm diff --git a/debian/install b/debian/install index b760d68..c410d21 100644 --- a/debian/install +++ b/debian/install @@ -1,4 +1,3 @@ elpa.pm usr/share/perl5/Debian/Debhelper/Sequence -elpa_plus_test.pm usr/share/perl5/Debian/Debhelper/Sequence emacsen-common usr/share/debhelper/dh_elpa usr/bin diff --git a/dh_elpa.in b/dh_elpa.in index cbf5823..f9e86cf 100755 --- a/dh_elpa.in +++ b/dh_elpa.in @@ -23,6 +23,11 @@ B [S>] [S>] B is a debhelper program that is responsible for installing elpa style emacs lisp packages into package build directories. +B 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). + =head1 FILES =over 4 @@ -314,10 +319,3 @@ substvars =back -=head1 SEE ALSO - -You can use B to run ERT and Buttercup test suites -automatically. See dh_elpa_test(1). - -=cut - diff --git a/dh_elpa_test b/dh_elpa_test index 5602caf..62bbf17 100755 --- a/dh_elpa_test +++ b/dh_elpa_test @@ -37,6 +37,10 @@ variable values with double-quotation marks. E.g. =over 4 +=item B + +If this variable is set, dh_elpa(1) will not invoke B. + =item B A comma-separated list of directories to add to the load-path when diff --git a/elpa.pm b/elpa.pm old mode 100644 new mode 100755 index cf73b54..dc64e33 --- a/elpa.pm +++ b/elpa.pm @@ -7,4 +7,10 @@ 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"); + remove_command("dh_auto_test"); +} + 1; diff --git a/elpa_plus_test.pm b/elpa_plus_test.pm deleted file mode 100755 index f56d60d..0000000 --- a/elpa_plus_test.pm +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/perl -# debhelper sequence file for dh_elpa_test script - -use warnings; -use strict; -use Debian::Debhelper::Dh_Lib; - -insert_after("dh_install", "dh_elpa"); -# insert_after("dh_auto_test", "dh_elpa_test"); # test suite gets run more than once -add_command("dh_elpa_test", "build"); -remove_command("dh_auto_test"); - -1; -- cgit v1.2.3