diff options
-rwxr-xr-x | t/dh_missing/01-no-missing.t | 33 | ||||
-rwxr-xr-x | t/dh_missing/02-fail-on-missing.t (renamed from t/dh_missing/dh_missing.t) | 21 | ||||
-rwxr-xr-x | t/dh_missing/03-dh_install-redirection.t | 35 | ||||
-rw-r--r-- | t/dh_missing/template/Makefile (renamed from t/dh_missing/Makefile) | 0 | ||||
-rw-r--r-- | t/dh_missing/template/debian/changelog (renamed from t/dh_missing/debian/changelog) | 0 | ||||
-rw-r--r-- | t/dh_missing/template/debian/control (renamed from t/dh_missing/debian/control) | 0 | ||||
-rw-r--r-- | t/dh_missing/template/debian/foo.install (renamed from t/dh_missing/debian/foo.install) | 0 | ||||
-rw-r--r-- | t/dh_missing/template/file-for-foo (renamed from t/dh_missing/file-for-foo) | 0 |
8 files changed, 70 insertions, 19 deletions
diff --git a/t/dh_missing/01-no-missing.t b/t/dh_missing/01-no-missing.t new file mode 100755 index 00000000..2528d2d5 --- /dev/null +++ b/t/dh_missing/01-no-missing.t @@ -0,0 +1,33 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Test::More; + +use File::Basename qw(dirname); +use lib dirname(dirname(__FILE__)); +use Test::DH; + +our $TEST_DH_FIXTURE_DIR = 'template'; +our @TEST_DH_EXTRA_TEMPLATE_FILES = (qw( + debian/changelog + debian/control + debian/foo.install + file-for-foo + Makefile +)); + +plan(tests => 1); + +each_compat_subtest { + # Verify dh_missing does not fail when all files are installed. + ok(run_dh_tool('dh_clean')); + is(system('make', 'install'), 0); + ok(run_dh_tool('dh_install', '--sourcedir', 'debian/tmp')); + ok(run_dh_tool('dh_missing', '--fail-missing'), 'dh_missing failed'); +}; + +# Local Variables: +# indent-tabs-mode: t +# tab-width: 4 +# cperl-indent-level: 4 +# End: diff --git a/t/dh_missing/dh_missing.t b/t/dh_missing/02-fail-on-missing.t index 8d87f77b..fa1a6869 100755 --- a/t/dh_missing/dh_missing.t +++ b/t/dh_missing/02-fail-on-missing.t @@ -7,6 +7,7 @@ use File::Basename qw(dirname); use lib dirname(dirname(__FILE__)); use Test::DH; +our $TEST_DH_FIXTURE_DIR = 'template'; our @TEST_DH_EXTRA_TEMPLATE_FILES = (qw( debian/changelog debian/control @@ -15,15 +16,7 @@ our @TEST_DH_EXTRA_TEMPLATE_FILES = (qw( Makefile )); -plan(tests => 3); - -each_compat_subtest { - # Verify dh_missing does not fail when all files are installed. - ok(run_dh_tool('dh_clean')); - is(system('make', 'install'), 0); - ok(run_dh_tool('dh_install', '--sourcedir', 'debian/tmp')); - ok(run_dh_tool('dh_missing', '--fail-missing'), 'dh_missing failed'); -}; +plan(tests => 1); each_compat_subtest { # Verify dh_missing does fail when not all files are installed. @@ -38,16 +31,6 @@ each_compat_subtest { is($exitcode, 2, 'dh_missing exited with exit code 2'); }; -each_compat_up_to_and_incl_subtest(10, sub { - # Verify that dh_install -X --fail-missing is passed through to dh_missing (#863447) - # dh_install -Xfile makes file-for-foo not be installed. Then we shouldn't - # complain about it not being missing. - ok(run_dh_tool('dh_clean')); - is(system('make', 'install'), 0); - ok(run_dh_tool({ 'quiet' => 1 }, 'dh_install', '--sourcedir', 'debian/tmp', - '-X', 'more', '--exclude', 'lots', '--fail-missing')); -}); - # Local Variables: # indent-tabs-mode: t # tab-width: 4 diff --git a/t/dh_missing/03-dh_install-redirection.t b/t/dh_missing/03-dh_install-redirection.t new file mode 100755 index 00000000..ce56fec1 --- /dev/null +++ b/t/dh_missing/03-dh_install-redirection.t @@ -0,0 +1,35 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Test::More; + +use File::Basename qw(dirname); +use lib dirname(dirname(__FILE__)); +use Test::DH; + +our $TEST_DH_FIXTURE_DIR = 'template'; +our @TEST_DH_EXTRA_TEMPLATE_FILES = (qw( + debian/changelog + debian/control + debian/foo.install + file-for-foo + Makefile +)); + +plan(tests => 1); + +each_compat_up_to_and_incl_subtest(10, sub { + # Verify that dh_install -X --fail-missing is passed through to dh_missing (#863447) + # dh_install -Xfile makes file-for-foo not be installed. Then we shouldn't + # complain about it not being missing. + ok(run_dh_tool('dh_clean')); + is(system('make', 'install'), 0); + ok(run_dh_tool({ 'quiet' => 1 }, 'dh_install', '--sourcedir', 'debian/tmp', + '-X', 'more', '--exclude', 'lots', '--fail-missing')); +}); + +# Local Variables: +# indent-tabs-mode: t +# tab-width: 4 +# cperl-indent-level: 4 +# End: diff --git a/t/dh_missing/Makefile b/t/dh_missing/template/Makefile index e33e1dfc..e33e1dfc 100644 --- a/t/dh_missing/Makefile +++ b/t/dh_missing/template/Makefile diff --git a/t/dh_missing/debian/changelog b/t/dh_missing/template/debian/changelog index 5850f0e2..5850f0e2 100644 --- a/t/dh_missing/debian/changelog +++ b/t/dh_missing/template/debian/changelog diff --git a/t/dh_missing/debian/control b/t/dh_missing/template/debian/control index 48d4de2f..48d4de2f 100644 --- a/t/dh_missing/debian/control +++ b/t/dh_missing/template/debian/control diff --git a/t/dh_missing/debian/foo.install b/t/dh_missing/template/debian/foo.install index eddea57c..eddea57c 100644 --- a/t/dh_missing/debian/foo.install +++ b/t/dh_missing/template/debian/foo.install diff --git a/t/dh_missing/file-for-foo b/t/dh_missing/template/file-for-foo index 8773f398..8773f398 100644 --- a/t/dh_missing/file-for-foo +++ b/t/dh_missing/template/file-for-foo |