diff options
author | Niels Thykier <niels@thykier.net> | 2019-10-26 06:15:11 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2019-10-26 06:15:11 +0000 |
commit | 1f7b871e13ba716b32f956fdf3b8deb8389a0565 (patch) | |
tree | f3e8ecbf0ea065097d5ebe1d8e63a38c7918e658 | |
parent | ceb7bae3d2d118379deb01fd9beed9f930cfea9a (diff) | |
download | debhelper-1f7b871e13ba716b32f956fdf3b8deb8389a0565.tar.gz |
Skip dh_installman test by default as it requires extra dependencies
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | .gitlab-ci.yml | 8 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | t/dh_installman/01-basics.t | 17 |
3 files changed, 26 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfecfe10..713ae1ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,14 @@ tests-testing: - apt-get build-dep -y . - dpkg-buildpackage -us -uc -tc +tests-unstable-all: + stage: test + image: debian:unstable + script: + - apt-get update + - apt-get build-dep -y -Ppkg.debhelper.ci . + - dpkg-buildpackage -us -uc -tc + tests-unstable: stage: test image: debian:unstable diff --git a/debian/control b/debian/control index 656456df..e2574f68 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,8 @@ Uploaders: Niels Thykier <niels@thykier.net>, Build-Depends: dpkg-dev (>= 1.18.0~), perl:any, po4a, + man-db <pkg.debhelper.ci>, + libtest-pod-perl <pkg.debhelper.ci>, Rules-Requires-Root: no Standards-Version: 4.4.0 Testsuite: autopkgtest-pkg-perl diff --git a/t/dh_installman/01-basics.t b/t/dh_installman/01-basics.t index de7293d7..6e90cc94 100755 --- a/t/dh_installman/01-basics.t +++ b/t/dh_installman/01-basics.t @@ -9,7 +9,22 @@ use Test::DH; use File::Path qw(remove_tree make_path); use Debian::Debhelper::Dh_Lib qw(!dirname); -plan(tests => 2); +sub has_man_db_tool { + my ($tool) = @_; + open(my $old_stderr, '>&', *STDERR) or error("dup(STDERR, tmp_fd): $!"); + open(*STDERR, '>', '/dev/null') or error("re-open stderr as /dev/null: $!"); + + my $res = defined(`$tool --version`); + open(*STDERR, '>&', $old_stderr) or error("dup(tmp_fd, STDERR): $!"); + close($old_stderr); + return $res; +} + +if (has_man_db_tool('man') || has_man_db_tool('man-recode')) { + plan(tests => 2); +} else { + plan(skip_all => 'Test requires man or man-recode'); +} our @TEST_DH_EXTRA_TEMPLATE_FILES = (qw( manpage-uncompressed.pod |