[lintian] 02/02: t: Update test
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 7fca09eb2f3076718bba125667126b142ead1bc0
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jan 31 13:01:51 2016 +0000
t: Update test
Signed-off-by: Niels Thykier <niels@thykier.net>
---
t/runtests | 4 ++++
t/scripts/static-lab.t | 16 +++++++---------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/t/runtests b/t/runtests
index 8ec5f05..bc9c7aa 100755
--- a/t/runtests
+++ b/t/runtests
@@ -47,6 +47,7 @@ BEGIN {
# Whitelist the part of the environment we permit. This is to
# avoid inheriting things that messes up tests (like CFLAGS,
# DH_OPTIONS, DEB_HOST_ARCH etc.)
+ my $dplint;
my %PRESERVE_ENV = map { $_ => 1 } qw(
LINTIAN_TEST_INSTALLED
NO_PKG_MANGLE
@@ -66,12 +67,15 @@ BEGIN {
if (($ENV{'LINTIAN_TEST_INSTALLED'}//'no') eq 'yes') {
$LINTIAN_ROOT = '/usr/share/lintian';
$LINTIAN = '/usr/bin/lintian';
+ $dplint = '/usr/share/lintian/frontend/dplint';
} else {
$LINTIAN_ROOT = Cwd::cwd();
$LINTIAN = "$LINTIAN_ROOT/frontend/lintian";
+ $dplint = "$LINTIAN_ROOT/frontend/dplint";
}
$ENV{'LINTIAN_TEST_ROOT'} = $LINTIAN_ROOT;
$ENV{'LINTIAN_FRONTEND'} = $LINTIAN;
+ $ENV{'LINTIAN_DPLINT_FRONTEND'} = $dplint;
@LINTIAN_CMD = ($LINTIAN);
# Ubuntu auto-builders run pkg-mangle which messes with our
diff --git a/t/scripts/static-lab.t b/t/scripts/static-lab.t
index cd441ea..0df6371 100755
--- a/t/scripts/static-lab.t
+++ b/t/scripts/static-lab.t
@@ -7,15 +7,13 @@ use Test::Simple tests => 4;
$ENV{'LINTIAN_TEST_ROOT'} //= '.';
-my $lintian_path = "$ENV{LINTIAN_TEST_ROOT}/frontend/lintian";
+my $dplint = "$ENV{LINTIAN_TEST_ROOT}/frontend/dplint";
my $labdir = tempdir(CLEANUP => 1);
-$lintian_path = $ENV{'LINTIAN_FRONTEND'} if exists($ENV{'LINTIAN_FRONTEND'});
+$dplint = $ENV{'LINTIAN_DPLINT_FRONTEND'}
+ if exists($ENV{'LINTIAN_DPLINT_FRONTEND'});
-ok(system("$lintian_path --allow-root --lab $labdir --setup-lab") == 0,
- 'Create');
-ok(system("$lintian_path --allow-root --lab $labdir --setup-lab") == 0,
- 'Renew');
-ok(system("$lintian_path --allow-root --lab $labdir --remove-lab") == 0,
- 'Remove');
-ok(system("rmdir $labdir") == 0, 'Rmdir');
+ok(system($dplint, 'lab-tool', 'create-lab', $labdir) == 0, 'Create');
+ok(system($dplint, 'lab-tool', 'scrub-lab', $labdir) == 0, 'Scrub');
+ok(system($dplint, 'lab-tool', 'remove-lab', $labdir) == 0, 'Remove');
+ok(system('rmdir', $labdir) == 0, 'Rmdir');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: