Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Andrey Rakhmatullin Newsgroups: linux.debian.maint.python Subject: Re: Testsuite: autopkgtest-pkg-pybuild: weird behavior in my uploaded package Date: Fri, 08 Nov 2024 08:30:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Nov 8 07:20:27 2024 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -3.5 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pnqUDyB1hJu+l3sq" Content-Disposition: inline X-Mailing-List: archive/latest/22511 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/Zy27rPBbzTLDSIxg@belkar.wrar.name Approved: robomod@news.nic.it Lines: 65 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Fri, 8 Nov 2024 12:20:12 +0500 X-Original-Message-ID: X-Original-References: <1e05c05d-299e-4185-a833-3c08520d535a@debian.org> Xref: csiph.com linux.debian.maint.python:16439 --pnqUDyB1hJu+l3sq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 07, 2024 at 08:34:29PM -0500, Boyuan Yang wrote: > According to pybuild-autopkgtest(1) [1], it seems that Python packages th= at > 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 h= ave > some confusion on it with my recent uploads. >=20 > 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.=20 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. > Since this package is not built in autopkgtest, pytest cannot find > anything to test and then directly fails: It'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 default. I don't know what's the preferred best practice for such packages, I imagine both copying the test manually and running tests against /usr/lib/python3/dist-packages/fscacher would work, but I don't think either are possible with autopkgtest-pkg-build, at least if you don't want to do extra copying not needed for build-time tests in d/rules. In my package (python-queuelib) that has a similar layout I haven't switched to autopkgtest-pkg-build. (I would also expect that if a maintainer adds autopkgtests to a package they actually run those before uploading) --=20 WBR, wRAR --pnqUDyB1hJu+l3sq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmctu6gtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh F+4QAKTro3sem34EwND9bcowozEskONkdDVj/NbFvzoOp5XUjnhBIczrfED++lRL Y2hgzLvXR+xHnruge2Dvd+ofx+8DMHWsBBrgZB2Se4vK+LxPpBT92UTZSxNQeCGN E7FzfIXL52RGMgjlVd6+SsrLpOKSGKKEvwxIa27Q9QpvHQR/mtdplBJGYROo+12s BgrTPaRsQbaB6MyC2GJGO++q5185bv3Ld7dZYia5APKPqHWijrc7yVgsZYQPoZUu zcomwEIsbPtRFEHzsWPhMdYavAN2s/mjNKWQDYzu1w9hGRvPhCfzqePIX5NjhLfe Xa/DyAojsGsKZdSygFYtF6V4cbyytxKpX8YDSsiwD3y5f2Bf0hfvGazHR8jGG3CK e2UiltKstZgXFAQxFd4Qdds/TJEnEZ8hf/6y/WCF2IQ6CoUS3f2jlu5jCzqBI3JJ PVLHGXtQEsv8cGiR57h+r0Qj06xQQViEbwgN1Hq/THgyFuyzgmKqPKQiynTyLXpB cV8vBQb2YqOUXQJTn3kVaJrm5a5jNpA0+bSiWbWdN+XGW0CcdIdkVhNJ9Q0+/PMw PxSoX6nWSpIFWFhRrPtmqWTCXHrVNqIvlhrh9Qk779gzZ00jMkzp+JX8FOcs5cOj +QXcxWrWqvKcSeyAo4pMl90xRMCF2S2X2NbySTH/pGb2O2Mq =vJXN -----END PGP SIGNATURE----- --pnqUDyB1hJu+l3sq--