On Fri, Nov 08, 2024 at 10:03:18AM +0100, Roland Mas wrote:
You need to list the files required for testing in debian/pybuild.testfiles.
Then both dh_auto_test and autopkgtest-pkg-pybuild do the right thing.
This is the thing I didn't want to suggest, because dh_auto_test already works.
According to pybuild-autopkgtest(1) [1], it seems that Python packages that uses Testsuite: autopkgtest-pkg-build will "run the tests in the same way as pybuild ... exception that tests are not run in the build directory". I have some confusion on it with my recent uploads.
When I look at fscacher/0.4.1-1.1 upload [2], the autopkgtest failure for this upload is weird. In [3], it looks like the tests are still to be executed in the "build" directory.
Since this package is not built in autopkgtest, pytest cannot find
anything to test and then directly fails:
On Thu, Nov 07, 2024 at 08:34:29PM -0500, Boyuan Yang wrote:
According to pybuild-autopkgtest(1) [1], it seems that Python packages that >> uses Testsuite: autopkgtest-pkg-build will "run the tests in the same way as >> pybuild ... exception that tests are not run in the build directory". I have >> some confusion on it with my recent uploads.There is no package build directory when autopkgtest runs, because autopkgtest runs in a new separate chroot. That's what the line from the manpage means.
When I look at fscacher/0.4.1-1.1 upload [2], the autopkgtest failure for
this upload is weird. In [3], it looks like the tests are still to be
executed in the "build" directory.
Since this package is not built in autopkgtest, pytest cannot findIt's not directly related to building, it's just because your tests are in src/fscacher/tests and so they are not copied into the test dir by
anything to test and then directly fails:
default. I don't know what's the preferred best practice for such
packages,
You need to list the files required for testing in debian/pybuild.testfiles. Then both dh_auto_test and autopkgtest-pkg-pybuild do the right thing.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 481 |
Nodes: | 16 (3 / 13) |
Uptime: | 11:09:04 |
Calls: | 9,539 |
Calls today: | 7 |
Files: | 13,653 |
Messages: | 6,139,230 |
Posted today: | 1 |