[lintian] 01/01: Allow relative symlinks for autopkgtest tests
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit a3089c2c32da033e844d4c3151a52dfd51a24687
Author: Christian Seiler <christian@iwakd.de>
Date: Sun Feb 14 17:46:21 2016 +0100
Allow relative symlinks for autopkgtest tests
Relative symbolic links to autopkgtest tests should be allowed as long
as they point to regular files.
Closes: #809440
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/testsuite.desc | 3 ++-
checks/testsuite.pm | 2 +-
debian/changelog | 4 ++++
t/tests/testsuite-general/debian/debian/tests/control | 3 +++
t/tests/testsuite-general/pre_build | 11 ++++++++++-
t/tests/testsuite-general/tags | 6 ++++++
6 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/checks/testsuite.desc b/checks/testsuite.desc
index 1fad72d..f68fc74 100644
--- a/checks/testsuite.desc
+++ b/checks/testsuite.desc
@@ -68,7 +68,8 @@ Tag: runtime-test-file-is-not-a-regular-file
Severity: wishlist
Certainty: certain
Info: A runtime test listed by debian/tests/control is not a regular
- file.
+ file or a relative symbolic link to a regular file in the source
+ package.
Ref: http://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;a=blob_plain;f=doc/README.package-tests.rst;hb=HEAD
Tag: syntax-error-in-debian-tests-control
diff --git a/checks/testsuite.pm b/checks/testsuite.pm
index a9de939..aa57023 100644
--- a/checks/testsuite.pm
+++ b/checks/testsuite.pm
@@ -184,7 +184,7 @@ sub check_test_file {
if (not defined($index)) {
tag 'missing-runtime-test-file', $path,
'paragraph starting at line', $line;
- } elsif (not $index->is_regular_file) {
+ } elsif (not $index->is_open_ok) {
tag 'runtime-test-file-is-not-a-regular-file', $path;
}
# Test files are allowed not to be executable.
diff --git a/debian/changelog b/debian/changelog
index b164a26..6a93545 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,10 @@ lintian (2.5.41) UNRELEASED; urgency=medium
"Multi-Arch: no". Thanks to Bas Couwenberg for the bug report.
* checks/scripts.desc:
+ [JW] Fix typos.
+ * checks/testsuite.{desc,pm}:
+ + [JW, NT] Apply patch from Christian Seiler to accept DEP-8 tests
+ being symlinks to existing files in the source package. Thanks
+ to Raphaël Hertzog for suggesting it. (Closes: #809440)
* commands/lab-tool.pm:
+ [NT] New utility to handle most laboratory operations.
diff --git a/t/tests/testsuite-general/debian/debian/tests/control b/t/tests/testsuite-general/debian/debian/tests/control
index 6348583..0fef676 100644
--- a/t/tests/testsuite-general/debian/debian/tests/control
+++ b/t/tests/testsuite-general/debian/debian/tests/control
@@ -30,3 +30,6 @@ Depends: @
Tests: test-1, test-2
Depends: @
+
+Tests: asym, asym1, self, self1, broken, lfifo, working
+Depends: @
diff --git a/t/tests/testsuite-general/pre_build b/t/tests/testsuite-general/pre_build
index 9302e88..1043be5 100755
--- a/t/tests/testsuite-general/pre_build
+++ b/t/tests/testsuite-general/pre_build
@@ -3,4 +3,13 @@
set -e
DIR="$1"
-mkfifo "$DIR/debian/tests/fifo"
+mkfifo "$DIR/debian/tests/fifo"
+ln -s /dev/null "$DIR/debian/tests/asym"
+ln -s /dev/null "$DIR/debian/tests/asym2"
+ln -s asym2 "$DIR/debian/tests/asym1"
+ln -s self "$DIR/debian/tests/self"
+ln -s self2 "$DIR/debian/tests/self2"
+ln -s self2 "$DIR/debian/tests/self1"
+ln -s nonexistent "$DIR/debian/tests/broken"
+ln -s fifo "$DIR/debian/tests/lfifo"
+ln -s test-1 "$DIR/debian/tests/working"
diff --git a/t/tests/testsuite-general/tags b/t/tests/testsuite-general/tags
index c537b70..95dcb9a 100644
--- a/t/tests/testsuite-general/tags
+++ b/t/tests/testsuite-general/tags
@@ -1,4 +1,10 @@
+I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/asym
+I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/asym1
+I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/broken
I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/fifo
+I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/lfifo
+I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/self
+I: testsuite-general source: runtime-test-file-is-not-a-regular-file debian/tests/self1
P: testsuite-general source: unknown-runtime-tests-feature unknownfeature paragraph starting at line 24
P: testsuite-general source: unknown-runtime-tests-field comment paragraph starting at line 1
P: testsuite-general source: unknown-runtime-tests-restriction unknownrestriction paragraph starting at line 24
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: