Bug#1004536: lintian: suggest Testsuite: autopkgtest-pkg-* when autodep8 detects it should be added
On Sun, 2022-01-30 at 20:40 +0100, Paul Gevers wrote: > But this is only useful if the test actually passes. We don't want > people to add the field if the test is broken. So if this is > implemented, make sure the priority/certainty/whatever is low enough > that people will *not* just blindly do this. Presumably when adding the tests, people will either run them on their own systems or wait until debci runs them, then review the results and fix any issues they see. The tag long description could suggest that. -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#1004536: lintian: suggest Testsuite: autopkgtest-pkg-* when autodep8 detects it should be added
Hi Paul, On Sun, 30 Jan 2022 16:28:54 +0800 Paul Wise wrote: I noticed while packaging some Python modules recently that they were not tested by debci. This is because debci only tests source packages that contain a Testsuite field. The autodep8 tool is able to generate the needed tests, but debci only runs it when the Testsuite field is present and contains an autopkgtest-pkg-* value. The autodep8 tool also contains heuristics to detect packages that could have autopkgtests but right now there is nothing suggesting to maintainers that they should add tests based on autodep8. I suggest that when the Testsuite field is missing, lintian run autodep8 from the unpacked source package dir and when autodep8 prints a test stanza on stdout, emit a tag suggesting that the maintainer add the Testsuite field. If the Testsuite is already present, presumably the maintainer already added some tests that are better than the autodep8 ones. Since autodep8 also prints warnings/errors on stderr, lintian could also emit tags there too. Here is an example of an affected package: $ debsnap python-circuitbreaker 1.3.2-1 $ chronic dpkg-source -x python-circuitbreaker_1.3.2-1.dsc $ cd python-circuitbreaker*/ $ grep Testsuite debian/control $ find debian/tests find: ‘debian/tests’: No such file or directory python-circuitbreaker-1.3.2 $ autodep8 Test-Command: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import circuitbreaker; print(circuitbreaker)" ; done Depends: python3-all, python3-circuitbreaker, Restrictions: allow-stderr, superficial, Features: test-name=autodep8-python3 But this is only useful if the test actually passes. We don't want people to add the field if the test is broken. So if this is implemented, make sure the priority/certainty/whatever is low enough that people will *not* just blindly do this. Paul OpenPGP_signature Description: OpenPGP digital signature
Bug#1004536: lintian: suggest Testsuite: autopkgtest-pkg-* when autodep8 detects it should be added
Package: lintian Severity: wishlist Usertags: feature X-Debbugs-CC: autod...@packages.debian.org I noticed while packaging some Python modules recently that they were not tested by debci. This is because debci only tests source packages that contain a Testsuite field. The autodep8 tool is able to generate the needed tests, but debci only runs it when the Testsuite field is present and contains an autopkgtest-pkg-* value. The autodep8 tool also contains heuristics to detect packages that could have autopkgtests but right now there is nothing suggesting to maintainers that they should add tests based on autodep8. I suggest that when the Testsuite field is missing, lintian run autodep8 from the unpacked source package dir and when autodep8 prints a test stanza on stdout, emit a tag suggesting that the maintainer add the Testsuite field. If the Testsuite is already present, presumably the maintainer already added some tests that are better than the autodep8 ones. Since autodep8 also prints warnings/errors on stderr, lintian could also emit tags there too. Here is an example of an affected package: $ debsnap python-circuitbreaker 1.3.2-1 $ chronic dpkg-source -x python-circuitbreaker_1.3.2-1.dsc $ cd python-circuitbreaker*/ $ grep Testsuite debian/control $ find debian/tests find: ‘debian/tests’: No such file or directory python-circuitbreaker-1.3.2 $ autodep8 Test-Command: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import circuitbreaker; print(circuitbreaker)" ; done Depends: python3-all, python3-circuitbreaker, Restrictions: allow-stderr, superficial, Features: test-name=autodep8-python3 -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part