[SCM] Debian package checker branch, master, updated. 2.5.11-161-g772d358
The following commit has been merged in the master branch:
commit 772d35821a0ccbd641a638ccd18476875ce3c5e2
Author: Niels Thykier <niels@thykier.net>
Date: Sat Feb 16 19:51:21 2013 +0100
Add DEP-8 tests based on the built-time test suite
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/debian/changelog b/debian/changelog
index 86ea262..58e243b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -151,8 +151,13 @@ lintian (2.5.12) UNRELEASED; urgency=low
* debian/control:
+ [NT] Bump dependency on hardening-includes to avoid having
to work around #677530.
+ + [NT] Add XS-Testsuite for autopkgtest tests.
+ * debian/lintian.install:
+ + [NT] Install Test::Lintian in /usr/share/lintian/lib.
* debian/rules:
+ [NT] Include the new Tutorial pods in the "api-doc" target.
+ * debian/tests/{control,testsuite,testsuite-legacy}:
+ + [NT] New file.
* doc/tutorial/Lintian/Tutorial{/WritingChecks}.pod:
+ [NT] Add POD tutorial on writing checks.
diff --git a/debian/control b/debian/control
index e2bad92..353c40e 100644
--- a/debian/control
+++ b/debian/control
@@ -60,6 +60,7 @@ Build-Depends: binutils,
Standards-Version: 3.9.4
Vcs-Git: git://anonscm.debian.org/lintian/lintian.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=lintian/lintian.git
+XS-Testsuite: autopkgtest
Package: lintian
Architecture: all
diff --git a/debian/lintian.install b/debian/lintian.install
index bd316ad..4981058 100644
--- a/debian/lintian.install
+++ b/debian/lintian.install
@@ -4,5 +4,6 @@ checks usr/share/lintian
collection usr/share/lintian
data usr/share/lintian
lib/Lintian usr/share/perl5
+lib/Test usr/share/lintian/lib
profiles usr/share/lintian
vendors usr/share/lintian
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..89ae8c8
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,25 @@
+Tests: testsuite testsuite-legacy
+Depends: @,
+ cdbs,
+ debhelper (>= 9),
+ default-jdk,
+ dpkg-dev (>= 1.16.1~),
+ fakeroot,
+ javahelper (>= 0.32~),
+ libhtml-parser-perl,
+ libtest-minimumversion-perl,
+ libtest-pod-coverage-perl,
+ libtest-pod-perl,
+ libtest-strict-perl,
+ libtest-synopsis-perl,
+ libtext-template-perl,
+ perl (>= 5.12) | libtest-simple-perl (>= 0.93),
+ python,
+ python-all-dev,
+ python-numpy,
+ quilt,
+ rsync,
+ unzip,
+ xz-utils,
+ xz-utils (>= 5.1.1alpha+20120614) | xz-lzma | lzma,
+ zip
diff --git a/debian/tests/testsuite b/debian/tests/testsuite
new file mode 100755
index 0000000..8226c94
--- /dev/null
+++ b/debian/tests/testsuite
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+WORKDIR="$ADTTMP/$(basename $0)"
+
+export LINTIAN_TEST_INSTALLED=yes
+
+rm -f runtests
+
+debian/rules TEST_WORK_DIR="$WORKDIR" runtests onlyrun="suite:changes,debs,source,tests"
+
diff --git a/debian/tests/testsuite-legacy b/debian/tests/testsuite-legacy
new file mode 100755
index 0000000..d4d23ab
--- /dev/null
+++ b/debian/tests/testsuite-legacy
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+WORKDIR="$ADTTMP/$(basename $0)"
+
+export LINTIAN_TEST_INSTALLED=yes
+
+rm -f runtests
+
+debian/rules TEST_WORK_DIR="$WORKDIR" runtests onlyrun="--legacy-only"
diff --git a/private/runtests b/private/runtests
index f801c73..de51852 100755
--- a/private/runtests
+++ b/private/runtests
@@ -2,6 +2,14 @@
set -e
+if [ "$LINTIAN_TEST_INSTALLED" = "yes" ]; then
+ LINTIAN_FRONTEND="/usr/bin/lintian"
+ LINTIAN_ROOT="/usr/share/lintian"
+else
+ unset LINTIAN_FRONTEND
+ LINTIAN_ROOT=""
+fi
+
if [ "$1" = "-j" ] ; then
NUMJOBS="$2"
test "$NUMJOBS" -gt 0 || (
@@ -26,7 +34,6 @@ if [ "$1" ] ; then
fi
LC_ALL="C"
-LINTIAN_ROOT=""
LINTIAN_PROFILE=debian
NO_PKG_MANGLE=true
unset MAKEFLAGS
@@ -36,6 +43,7 @@ unset HOME
[ "$TEST_WORK_DIR" ] || TEST_WORK_DIR="debian/test-out"
export LC_ALL
+export LINTIAN_FRONTEND
export LINTIAN_ROOT
export LINTIAN_PROFILE
export NO_PKG_MANGLE
diff --git a/t/runtests b/t/runtests
index 0227d0d..0854811 100755
--- a/t/runtests
+++ b/t/runtests
@@ -65,6 +65,9 @@ use Lintian::Util qw(delete_dir fail read_dpkg_control slurp_entire_file);
our $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
our $LINTIAN = $LINTIAN_ROOT . '/frontend/lintian';
+$LINTIAN = $ENV{'LINTIAN_FRONTEND'} if exists $ENV{'LINTIAN_FRONTEND'};
+$ENV{'LINTIAN_FRONTEND'} = $LINTIAN;
+
our @DPKG_BUILDPACKAGE_CMD = (qw(dpkg-buildpackage -rfakeroot -us -uc -d),
qw(-iNEVER_MATCH_ANYTHING -INEVER_MATCH_ANYTHING));
if (`dpkg-source --help` =~ m,\s--commit\s,) {
diff --git a/testset/runtests b/testset/runtests
index e6f96dd..467044c 100755
--- a/testset/runtests
+++ b/testset/runtests
@@ -120,9 +120,10 @@ my $lintian_options = '-I -E';
my $lintian_info_options = '-I -E -i';
my $dpkg_buildpackage_options = '-rfakeroot -us -uc -d -iNEVER_MATCH_ANYTHING'
. ' -INEVER_MATCH_ANYTHING';
+my $testok = 1;
my $lintian_path = $LINTIAN_ROOT . "/frontend/lintian";
+$lintian_path = $ENV{'LINTIAN_FRONTEND'} if exists $ENV{'LINTIAN_FRONTEND'};
-my $testok = 1;
# --- Display output immediately
$| = 1;
--
Debian package checker
Reply to: