diff options
Diffstat (limited to 't/recipes/checks/testsuite')
79 files changed, 431 insertions, 0 deletions
diff --git a/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/control b/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/control new file mode 100644 index 0000000..25b6eb5 --- /dev/null +++ b/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/control @@ -0,0 +1,7 @@ +Tests: test-1 +Restrictions: + superficial + +Tests: test-2 +Restrictions: + superficial diff --git a/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/test-1 b/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/test-1 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/test-2 b/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/test-2 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/all-superficial/build-spec/debian/tests/test-2 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/all-superficial/build-spec/fill-values b/t/recipes/checks/testsuite/all-superficial/build-spec/fill-values new file mode 100644 index 0000000..026f42f --- /dev/null +++ b/t/recipes/checks/testsuite/all-superficial/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: all-superficial +Description: All declared tests carry Restrictions: superficial diff --git a/t/recipes/checks/testsuite/all-superficial/eval/desc b/t/recipes/checks/testsuite/all-superficial/eval/desc new file mode 100644 index 0000000..cad04a2 --- /dev/null +++ b/t/recipes/checks/testsuite/all-superficial/eval/desc @@ -0,0 +1,2 @@ +Testname: all-superficial +Check: testsuite diff --git a/t/recipes/checks/testsuite/all-superficial/eval/hints b/t/recipes/checks/testsuite/all-superficial/eval/hints new file mode 100644 index 0000000..cf6c186 --- /dev/null +++ b/t/recipes/checks/testsuite/all-superficial/eval/hints @@ -0,0 +1 @@ +all-superficial (source): superficial-tests [debian/tests/control] diff --git a/t/recipes/checks/testsuite/command-with-ampersand/build-spec/debian/tests/control b/t/recipes/checks/testsuite/command-with-ampersand/build-spec/debian/tests/control new file mode 100644 index 0000000..883acb9 --- /dev/null +++ b/t/recipes/checks/testsuite/command-with-ampersand/build-spec/debian/tests/control @@ -0,0 +1,2 @@ +Test-Command: /bin/true & +Depends: @ diff --git a/t/recipes/checks/testsuite/command-with-ampersand/build-spec/fill-values b/t/recipes/checks/testsuite/command-with-ampersand/build-spec/fill-values new file mode 100644 index 0000000..cd31281 --- /dev/null +++ b/t/recipes/checks/testsuite/command-with-ampersand/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: command-with-ampersand +Description: Ampersand at the end of an autopkgtest command diff --git a/t/recipes/checks/testsuite/command-with-ampersand/eval/desc b/t/recipes/checks/testsuite/command-with-ampersand/eval/desc new file mode 100644 index 0000000..45c62f3 --- /dev/null +++ b/t/recipes/checks/testsuite/command-with-ampersand/eval/desc @@ -0,0 +1,4 @@ +Testname: command-with-ampersand +Check: testsuite +See-Also: + Bug#988591 diff --git a/t/recipes/checks/testsuite/command-with-ampersand/eval/hints b/t/recipes/checks/testsuite/command-with-ampersand/eval/hints new file mode 100644 index 0000000..9396019 --- /dev/null +++ b/t/recipes/checks/testsuite/command-with-ampersand/eval/hints @@ -0,0 +1 @@ +command-with-ampersand (source): backgrounded-test-command /bin/true & [debian/tests/control:1] diff --git a/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/control.in b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/control.in new file mode 100644 index 0000000..6d6a7c3 --- /dev/null +++ b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/control.in @@ -0,0 +1,20 @@ +Source: [% $source %] +Priority: [% $priority %] +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: [% $rules_requires_root %] +Homepage: [% $homepage %] +X-Python3-Version: >= 3.4 + +Package: [% $source %] +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. + . + This package probably has no meaningful contents. diff --git a/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/tests/control b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/tests/control new file mode 100644 index 0000000..d6ccd9d --- /dev/null +++ b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/tests/control @@ -0,0 +1,2 @@ +Tests: script +Depends: python3-all diff --git a/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/tests/script b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/tests/script new file mode 100644 index 0000000..4a0ba92 --- /dev/null +++ b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/debian/tests/script @@ -0,0 +1,14 @@ +#!/bin/sh + +# Good +echo $(py3versions -r) +echo $(py3versions -vr) +echo $(py3versions --requested) +echo $(py3versions --verbose --requested) + +# Bad +echo $(py3versions -s) +echo $(py3versions -vs) +echo $(py3versions --supported) +echo $(py3versions --verbose --supported) + diff --git a/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/fill-values b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/fill-values new file mode 100644 index 0000000..61308e5 --- /dev/null +++ b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: does-not-query-declared-python-versions +Description: Tests for py3versions -s with X-Python3-Version diff --git a/t/recipes/checks/testsuite/does-not-query-declared-python-versions/eval/desc b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/eval/desc new file mode 100644 index 0000000..0b80638 --- /dev/null +++ b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/eval/desc @@ -0,0 +1,2 @@ +Testname: does-not-query-declared-python-versions +Check: testsuite diff --git a/t/recipes/checks/testsuite/does-not-query-declared-python-versions/eval/hints b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/eval/hints new file mode 100644 index 0000000..11c3a42 --- /dev/null +++ b/t/recipes/checks/testsuite/does-not-query-declared-python-versions/eval/hints @@ -0,0 +1 @@ +does-not-query-declared-python-versions (source): drop-python-version-declaration [debian/control:9] diff --git a/t/recipes/checks/testsuite/empty-tests-control/build-spec/debian/tests/control b/t/recipes/checks/testsuite/empty-tests-control/build-spec/debian/tests/control new file mode 100644 index 0000000..cba0d7d --- /dev/null +++ b/t/recipes/checks/testsuite/empty-tests-control/build-spec/debian/tests/control @@ -0,0 +1,2 @@ +#Test-Command: everything is commented out +#Depends: @ diff --git a/t/recipes/checks/testsuite/empty-tests-control/build-spec/fill-values b/t/recipes/checks/testsuite/empty-tests-control/build-spec/fill-values new file mode 100644 index 0000000..8f4edaa --- /dev/null +++ b/t/recipes/checks/testsuite/empty-tests-control/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: empty-tests-control +Skeleton: upload-native +Description: Test for empty d/tests/control after comments were removed diff --git a/t/recipes/checks/testsuite/empty-tests-control/eval/desc b/t/recipes/checks/testsuite/empty-tests-control/eval/desc new file mode 100644 index 0000000..e1740d8 --- /dev/null +++ b/t/recipes/checks/testsuite/empty-tests-control/eval/desc @@ -0,0 +1,2 @@ +Testname: empty-tests-control +Check: testsuite diff --git a/t/recipes/checks/testsuite/empty-tests-control/eval/hints b/t/recipes/checks/testsuite/empty-tests-control/eval/hints new file mode 100644 index 0000000..bc29114 --- /dev/null +++ b/t/recipes/checks/testsuite/empty-tests-control/eval/hints @@ -0,0 +1 @@ +empty-tests-control (source): empty-debian-tests-control [debian/tests/control] diff --git a/t/recipes/checks/testsuite/missing-tests-control/build-spec/debian/control.in b/t/recipes/checks/testsuite/missing-tests-control/build-spec/debian/control.in new file mode 100644 index 0000000..aecee76 --- /dev/null +++ b/t/recipes/checks/testsuite/missing-tests-control/build-spec/debian/control.in @@ -0,0 +1,19 @@ +Source: [% $source %] +Priority: [% $priority %] +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: [% $rules_requires_root %] +Homepage: [% $homepage %] +Testsuite: autopkgtest + +Package: [% $source %] +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/testsuite/missing-tests-control/build-spec/fill-values b/t/recipes/checks/testsuite/missing-tests-control/build-spec/fill-values new file mode 100644 index 0000000..0c0c3ec --- /dev/null +++ b/t/recipes/checks/testsuite/missing-tests-control/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: missing-tests-control +Description: Declares Testsuite: autopkgtest but provides no d/tests/control diff --git a/t/recipes/checks/testsuite/missing-tests-control/build-spec/pre-build b/t/recipes/checks/testsuite/missing-tests-control/build-spec/pre-build new file mode 100755 index 0000000..b053083 --- /dev/null +++ b/t/recipes/checks/testsuite/missing-tests-control/build-spec/pre-build @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +packagedir="$1" + +rm -rf "$packagedir"/debian/tests/control diff --git a/t/recipes/checks/testsuite/missing-tests-control/eval/desc b/t/recipes/checks/testsuite/missing-tests-control/eval/desc new file mode 100644 index 0000000..dbd057c --- /dev/null +++ b/t/recipes/checks/testsuite/missing-tests-control/eval/desc @@ -0,0 +1,2 @@ +Testname: missing-tests-control +Check: testsuite diff --git a/t/recipes/checks/testsuite/missing-tests-control/eval/hints b/t/recipes/checks/testsuite/missing-tests-control/eval/hints new file mode 100644 index 0000000..e643cd4 --- /dev/null +++ b/t/recipes/checks/testsuite/missing-tests-control/eval/hints @@ -0,0 +1 @@ +missing-tests-control (source): missing-tests-control [debian/control:9] diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/control b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/control new file mode 100644 index 0000000..b3207d3 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/control @@ -0,0 +1,50 @@ +Tests: test-1 +Comment: Test-1 is öh so good. + Last paragraph misses a Tests field. + +Tests: fifo missing-test under_score + +Tests: test-in-subdir +Restrictions: + rw-build-tree + breaks-testbed + needs-root + build-needed +Depends: @ +Features: +Tests-Directory: subdir + +Test-Command: /bin/true +Depends: @ + +Tests: test-2 +Test-Command: /bin/true +Depends: @, missing a comma + +Test-Command: /bin/true +Features: unknownfeature, test-name=false-positive +Restrictions: unknownrestriction + +Test-Command: /bin/true +Restrictions: breaks-testbed, rw-build-tree, needs-root, needs-recommends # comment +Depends: @, @builddeps@ + +Tests: test-1, test-2 +Depends: @ + +Tests: asym, asym1, self, self1, broken, lfifo, working +Depends: @ + +# Depends line starts on a newline (#910210) +Tests: test-1 +Depends: + @ + +Test-Command: /bin/comment +Restrictions: needs-root, # comment + # comment + breaks-testbed + # comment +Depends: @, + @builddeps@ + # comment diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/control.autodep8 b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/control.autodep8 new file mode 100644 index 0000000..19e2aee --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/control.autodep8 @@ -0,0 +1 @@ +Tests: test-1 diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/test-1 b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/test-1 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/test-2 b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/test-2 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/test-2 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/under_score b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/under_score new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/debian/tests/under_score @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/fill-values b/t/recipes/checks/testsuite/national-encoding/build-spec/fill-values new file mode 100644 index 0000000..b2d609d --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: national-encoding +Description: Autopkgtest spec in national encoding diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/orig/subdir/test-in-subdir b/t/recipes/checks/testsuite/national-encoding/build-spec/orig/subdir/test-in-subdir new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/orig/subdir/test-in-subdir @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/national-encoding/build-spec/pre-build b/t/recipes/checks/testsuite/national-encoding/build-spec/pre-build new file mode 100755 index 0000000..2e39c9c --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/build-spec/pre-build @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +DIR="$1" +mkfifo "$DIR/debian/tests/fifo" +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/recipes/checks/testsuite/national-encoding/eval/desc b/t/recipes/checks/testsuite/national-encoding/eval/desc new file mode 100644 index 0000000..a027698 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/eval/desc @@ -0,0 +1,4 @@ +Testname: national-encoding +Test-Against: + unnecessary-testsuite-autopkgtest-field +Check: testsuite diff --git a/t/recipes/checks/testsuite/national-encoding/eval/hints b/t/recipes/checks/testsuite/national-encoding/eval/hints new file mode 100644 index 0000000..11deb68 --- /dev/null +++ b/t/recipes/checks/testsuite/national-encoding/eval/hints @@ -0,0 +1 @@ +national-encoding (source): debian-tests-control-autodep8-is-obsolete [debian/tests/control.autodep8] diff --git a/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/debian/tests/control b/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/debian/tests/control new file mode 100644 index 0000000..d6ccd9d --- /dev/null +++ b/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/debian/tests/control @@ -0,0 +1,2 @@ +Tests: script +Depends: python3-all diff --git a/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/debian/tests/script b/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/debian/tests/script new file mode 100644 index 0000000..eb277a2 --- /dev/null +++ b/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/debian/tests/script @@ -0,0 +1,13 @@ +#!/bin/sh + +# Good +echo $(py3versions -s) +echo $(py3versions -vs) +echo $(py3versions --supported) +echo $(py3versions --verbose --supported) + +# Bad +echo $(py3versions -r) +echo $(py3versions -vr) +echo $(py3versions --requested) +echo $(py3versions --verbose --requested) diff --git a/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/fill-values b/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/fill-values new file mode 100644 index 0000000..184e36c --- /dev/null +++ b/t/recipes/checks/testsuite/requests-undeclared-python-versions/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: requests-undeclared-python-versions +Description: Tests for py3versions -r without X-Python3-Version diff --git a/t/recipes/checks/testsuite/requests-undeclared-python-versions/eval/desc b/t/recipes/checks/testsuite/requests-undeclared-python-versions/eval/desc new file mode 100644 index 0000000..7dea8e4 --- /dev/null +++ b/t/recipes/checks/testsuite/requests-undeclared-python-versions/eval/desc @@ -0,0 +1,2 @@ +Testname: requests-undeclared-python-versions +Check: testsuite diff --git a/t/recipes/checks/testsuite/requests-undeclared-python-versions/eval/hints b/t/recipes/checks/testsuite/requests-undeclared-python-versions/eval/hints new file mode 100644 index 0000000..9380e9c --- /dev/null +++ b/t/recipes/checks/testsuite/requests-undeclared-python-versions/eval/hints @@ -0,0 +1,4 @@ +requests-undeclared-python-versions (source): declare-python-versions-for-test py3versions -vr [debian/tests/script:11] +requests-undeclared-python-versions (source): declare-python-versions-for-test py3versions -r [debian/tests/script:10] +requests-undeclared-python-versions (source): declare-python-versions-for-test py3versions --verbose --requested [debian/tests/script:13] +requests-undeclared-python-versions (source): declare-python-versions-for-test py3versions --requested [debian/tests/script:12] diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/debian/tests/control b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/debian/tests/control new file mode 100644 index 0000000..c831b63 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/debian/tests/control @@ -0,0 +1,3 @@ +Tests: test-1 +Depends: + python3-all:any diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/debian/tests/test-1 b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..a7aaf84 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/debian/tests/test-1 @@ -0,0 +1,13 @@ +#!/bin/sh + +# Good +echo $(py3versions -s) +echo $(py3versions -vs) +echo $(py3versions -sv) +echo $(py3versions -v) + +# Bad +echo $(py3versions -i) +echo $(py3versions -vi) +echo $(py3versions --installed) +echo $(py3versions --verbose --installed) diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/fill-values b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/fill-values new file mode 100644 index 0000000..209cf4f --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/build-spec/fill-values @@ -0,0 +1,4 @@ +Skeleton: upload-native +Testname: runtime-test-file-uses-installed-python-versions +Description: Tests for py3versions -i +Extra-Build-Depends: python3-all diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/eval/desc b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/eval/desc new file mode 100644 index 0000000..cbb5a5a --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/eval/desc @@ -0,0 +1,2 @@ +Testname: runtime-test-file-uses-installed-python-versions +Check: testsuite diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/eval/hints b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/eval/hints new file mode 100644 index 0000000..b493a59 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-installed-python-versions/eval/hints @@ -0,0 +1,4 @@ +runtime-test-file-uses-installed-python-versions (source): runtime-test-file-uses-installed-python-versions py3versions -vi [debian/tests/test-1:11] +runtime-test-file-uses-installed-python-versions (source): runtime-test-file-uses-installed-python-versions py3versions -i [debian/tests/test-1:10] +runtime-test-file-uses-installed-python-versions (source): runtime-test-file-uses-installed-python-versions py3versions --verbose --installed [debian/tests/test-1:13] +runtime-test-file-uses-installed-python-versions (source): runtime-test-file-uses-installed-python-versions py3versions --installed [debian/tests/test-1:12] diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/debian/tests/control b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/debian/tests/control new file mode 100644 index 0000000..19e2aee --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/debian/tests/control @@ -0,0 +1 @@ +Tests: test-1 diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/debian/tests/test-1 b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..99b3e21 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/debian/tests/test-1 @@ -0,0 +1,13 @@ +#!/bin/sh + +# Good +echo $(py3versions -i) +echo $(py3versions -is) +echo $(py3versions -iv) +echo $(py3versions -v) + +# Bad +echo $(py3versions -s) +echo $(py3versions -vs) +echo $(py3versions --supported) +echo $(py3versions --verbose --supported) diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/fill-values b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/fill-values new file mode 100644 index 0000000..64d7889 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: runtime-test-file-uses-supported-python-versions-without-test-depends +Description: Tests for py3versions -s without python3-all build-depends diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/eval/desc b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/eval/desc new file mode 100644 index 0000000..efed163 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/eval/desc @@ -0,0 +1,2 @@ +Testname: runtime-test-file-uses-supported-python-versions-without-test-depends +Check: testsuite diff --git a/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/eval/hints b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/eval/hints new file mode 100644 index 0000000..68e6970 --- /dev/null +++ b/t/recipes/checks/testsuite/runtime-test-file-uses-supported-python-versions-without-test-depends/eval/hints @@ -0,0 +1,8 @@ +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-supported-python-versions-without-test-depends py3versions -vs [debian/tests/test-1:11] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-supported-python-versions-without-test-depends py3versions -s [debian/tests/test-1:10] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-supported-python-versions-without-test-depends py3versions -is [debian/tests/test-1:5] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-supported-python-versions-without-test-depends py3versions --verbose --supported [debian/tests/test-1:13] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-supported-python-versions-without-test-depends py3versions --supported [debian/tests/test-1:12] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-installed-python-versions py3versions -iv [debian/tests/test-1:6] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-installed-python-versions py3versions -is [debian/tests/test-1:5] +runtime-test-file-uses-supported-python-versions-without-test-depends (source): runtime-test-file-uses-installed-python-versions py3versions -i [debian/tests/test-1:4] diff --git a/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/debian/tests/control b/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/debian/tests/control new file mode 100644 index 0000000..bde2cb8 --- /dev/null +++ b/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/debian/tests/control @@ -0,0 +1,2 @@ +Tests: some-python +Depends: python3-all diff --git a/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/debian/tests/some-python b/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/debian/tests/some-python new file mode 100644 index 0000000..3ff10ea --- /dev/null +++ b/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/debian/tests/some-python @@ -0,0 +1,7 @@ +#!/bin/sh +set -efu + +cp -a tests "$AUTOPKGTEST_TMP" +cd "$AUTOPKGTEST_TMP" + +python3 -m unittest tests -v diff --git a/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/fill-values b/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/fill-values new file mode 100644 index 0000000..cca93ba --- /dev/null +++ b/t/recipes/checks/testsuite/should-query-all-python-versions/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: source-native +Testname: should-query-all-python-versions +Description: Autopkgtest depends on python3-all but does not invoke 'py3versions --supported' diff --git a/t/recipes/checks/testsuite/should-query-all-python-versions/eval/desc b/t/recipes/checks/testsuite/should-query-all-python-versions/eval/desc new file mode 100644 index 0000000..f979541 --- /dev/null +++ b/t/recipes/checks/testsuite/should-query-all-python-versions/eval/desc @@ -0,0 +1,2 @@ +Testname: should-query-all-python-versions +Check: testsuite diff --git a/t/recipes/checks/testsuite/should-query-all-python-versions/eval/hints b/t/recipes/checks/testsuite/should-query-all-python-versions/eval/hints new file mode 100644 index 0000000..73bfede --- /dev/null +++ b/t/recipes/checks/testsuite/should-query-all-python-versions/eval/hints @@ -0,0 +1 @@ +should-query-all-python-versions (source): test-leaves-python-version-untested [debian/tests/some-python] diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/control b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/control new file mode 100644 index 0000000..aa243b3 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/control @@ -0,0 +1,53 @@ +Tests: test-1 +Comment: Test-1 is öh so good. + Last paragraph misses a Tests field. + +Tests: fifo missing-test under_score + +Tests: test-in-subdir +Restrictions: + rw-build-tree + breaks-testbed + needs-root + build-needed +Depends: @ +Features: +Tests-Directory: subdir + +Test-Command: /bin/true +Depends: @ + +Tests: test-2 +Test-Command: /bin/true +Depends: @, missing a comma + +Test-Command: /bin/true +Features: unknownfeature, test-name=false-positive +Restrictions: unknownrestriction + +Test-Command: /bin/true +Restrictions: breaks-testbed, rw-build-tree, needs-root, needs-recommends, needs-sudo # comment +Depends: @, @builddeps@ + +Tests: test-1, test-2 +Depends: @ + +Tests: asym, asym1, self, self1, broken, lfifo, working +Depends: @ + +# Depends line starts on a newline (#910210) +Tests: test-1 +Depends: + @ + +Test-Command: /bin/comment +Restrictions: needs-root, # comment + # comment + breaks-testbed + # comment +Depends: @, + @builddeps@ + # comment + +Test-Command: /bin/true +Depends: @, @builddeps@, @recommends@ diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/control.autodep8 b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/control.autodep8 new file mode 100644 index 0000000..19e2aee --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/control.autodep8 @@ -0,0 +1 @@ +Tests: test-1 diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/test-1 b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/test-1 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/test-2 b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/test-2 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/test-2 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/under_score b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/under_score new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/debian/tests/under_score @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/fill-values b/t/recipes/checks/testsuite/testsuite-general/build-spec/fill-values new file mode 100644 index 0000000..95c0c3c --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: testsuite-general +Description: General tests of the autopkgtest control file diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/orig/subdir/test-in-subdir b/t/recipes/checks/testsuite/testsuite-general/build-spec/orig/subdir/test-in-subdir new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/orig/subdir/test-in-subdir @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/testsuite-general/build-spec/pre-build b/t/recipes/checks/testsuite/testsuite-general/build-spec/pre-build new file mode 100755 index 0000000..2e39c9c --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/build-spec/pre-build @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +DIR="$1" +mkfifo "$DIR/debian/tests/fifo" +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/recipes/checks/testsuite/testsuite-general/eval/desc b/t/recipes/checks/testsuite/testsuite-general/eval/desc new file mode 100644 index 0000000..6357ee3 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/eval/desc @@ -0,0 +1,4 @@ +Testname: testsuite-general +Test-Against: + unnecessary-testsuite-autopkgtest-field +Check: testsuite diff --git a/t/recipes/checks/testsuite/testsuite-general/eval/hints b/t/recipes/checks/testsuite/testsuite-general/eval/hints new file mode 100644 index 0000000..cc2cee3 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-general/eval/hints @@ -0,0 +1,16 @@ +testsuite-general (source): unknown-runtime-tests-restriction unknownrestriction [debian/tests/control:26] +testsuite-general (source): unknown-runtime-tests-field Comment [debian/tests/control:2] +testsuite-general (source): unknown-runtime-tests-feature unknownfeature [debian/tests/control:25] +testsuite-general (source): testsuite-dependency-has-unparsable-elements "missing a comma" [debian/tests/control:22] +testsuite-general (source): runtime-test-file-is-not-a-regular-file debian/tests/lfifo [debian/tests/control:35] +testsuite-general (source): runtime-test-file-is-not-a-regular-file debian/tests/fifo [debian/tests/control:5] +testsuite-general (source): obsolete-runtime-tests-restriction needs-recommends [debian/tests/control:29] +testsuite-general (source): missing-runtime-test-file debian/tests/self1 [debian/tests/control:35] +testsuite-general (source): missing-runtime-test-file debian/tests/self [debian/tests/control:35] +testsuite-general (source): missing-runtime-test-file debian/tests/missing-test [debian/tests/control:5] +testsuite-general (source): missing-runtime-test-file debian/tests/broken [debian/tests/control:35] +testsuite-general (source): missing-runtime-test-file debian/tests/asym1 [debian/tests/control:35] +testsuite-general (source): missing-runtime-test-file debian/tests/asym [debian/tests/control:35] +testsuite-general (source): illegal-runtime-test-name under_score [debian/tests/control:5] +testsuite-general (source): debian-tests-control-autodep8-is-obsolete [debian/tests/control.autodep8] +testsuite-general (source): conflicting-test-fields Tests Test-Command [debian/tests/control:20] diff --git a/t/recipes/checks/testsuite/testsuite-no-op/build-spec/debian/tests/control b/t/recipes/checks/testsuite/testsuite-no-op/build-spec/debian/tests/control new file mode 100644 index 0000000..5f9a99e --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-no-op/build-spec/debian/tests/control @@ -0,0 +1,2 @@ +Test-Command: /bin/true +Depends: @ diff --git a/t/recipes/checks/testsuite/testsuite-no-op/build-spec/fill-values b/t/recipes/checks/testsuite/testsuite-no-op/build-spec/fill-values new file mode 100644 index 0000000..5ee981c --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-no-op/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: testsuite-no-op +Description: Test for no-op autopkgtests diff --git a/t/recipes/checks/testsuite/testsuite-no-op/eval/desc b/t/recipes/checks/testsuite/testsuite-no-op/eval/desc new file mode 100644 index 0000000..307cd57 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-no-op/eval/desc @@ -0,0 +1,2 @@ +Testname: testsuite-no-op +Check: testsuite diff --git a/t/recipes/checks/testsuite/testsuite-no-op/eval/hints b/t/recipes/checks/testsuite/testsuite-no-op/eval/hints new file mode 100644 index 0000000..99f6ee4 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-no-op/eval/hints @@ -0,0 +1 @@ +testsuite-no-op (source): no-op-testsuite [debian/tests/control:1] diff --git a/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/control.in b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/control.in new file mode 100644 index 0000000..d1552e1 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Testsuite: autopkgtest, golf + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/tests/control b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/tests/control new file mode 100644 index 0000000..19e2aee --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/tests/control @@ -0,0 +1 @@ +Tests: test-1 diff --git a/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/tests/test-1 b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/tests/test-1 new file mode 100644 index 0000000..039e4d0 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/debian/tests/test-1 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff --git a/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/fill-values b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/fill-values new file mode 100644 index 0000000..11a2f63 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-unknown-suite/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: testsuite-unknown-suite +Description: Tests for unknown suite in the control being non-file diff --git a/t/recipes/checks/testsuite/testsuite-unknown-suite/eval/desc b/t/recipes/checks/testsuite/testsuite-unknown-suite/eval/desc new file mode 100644 index 0000000..d818b13 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-unknown-suite/eval/desc @@ -0,0 +1,2 @@ +Testname: testsuite-unknown-suite +Check: testsuite diff --git a/t/recipes/checks/testsuite/testsuite-unknown-suite/eval/hints b/t/recipes/checks/testsuite/testsuite-unknown-suite/eval/hints new file mode 100644 index 0000000..0689d59 --- /dev/null +++ b/t/recipes/checks/testsuite/testsuite-unknown-suite/eval/hints @@ -0,0 +1,2 @@ +testsuite-unknown-suite (source): unnecessary-testsuite-autopkgtest-field [debian/control:8] +testsuite-unknown-suite (source): unknown-testsuite golf [debian/control:8] diff --git a/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/build-spec/debian/control.in b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/build-spec/debian/control.in new file mode 100644 index 0000000..d19c70b --- /dev/null +++ b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/build-spec/debian/control.in @@ -0,0 +1,19 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no +Homepage: https://lintian.debian.org/ +Testsuite: autopkgtest + +Package: [% $source %] +Architecture: [% $package_architecture %] +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. diff --git a/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/build-spec/fill-values b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/build-spec/fill-values new file mode 100644 index 0000000..ed175e9 --- /dev/null +++ b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: unnecessary-testsuite-autopkgtest-field +Skeleton: upload-native +Description: Test with an unnecessary field Testsuite in control diff --git a/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/eval/desc b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/eval/desc new file mode 100644 index 0000000..4ff09a5 --- /dev/null +++ b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/eval/desc @@ -0,0 +1,2 @@ +Testname: unnecessary-testsuite-autopkgtest-field +Check: testsuite diff --git a/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/eval/hints b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/eval/hints new file mode 100644 index 0000000..bd34a18 --- /dev/null +++ b/t/recipes/checks/testsuite/unnecessary-testsuite-autopkgtest-field/eval/hints @@ -0,0 +1 @@ +unnecessary-testsuite-autopkgtest-field (source): unnecessary-testsuite-autopkgtest-field [debian/control:9] |