Hi, I've investigated a bit more and found where I was confused. TL;DR: I'm deleting the non-needed workaround and found where things are happening. On 05 Oct 2023 at 16:36:17, Andrey Rakhmatullin wrote: > On Tue, Oct 03, 2023 at 11:52:58PM +0100, Carles Pina i Estany wrote: > > > upstream tests. Though I think it won't see your explicit `pytest -k` and > > > you should replace the override with a PYBUILD_TEST_ARGS var. > > > > Done this way: > > https://salsa.debian.org/python-team/packages/python-cloudscraper/-/commit/78a83fbb0fe5fdfba78136921b919a11c8c9bc43 > Now you don't need to override dh_auto_test, it should call pytest with > correct args automatically. > > > pytest, as run automatically when having "Testsuite: > > autopkgtest-pkg-pybuild": runs in the directory > > "/tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build" doing > > "python3.11 -m pytest -k ...". > > > > The contents of the directory via "ls -l" can be seen here: > > https://salsa.debian.org/carlespina/python-cloudscraper/-/jobs/4766353#L357) > This gives 404. > > > Because there is the sub-directory > > /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraper > It shouldn't be there. They are not there if using all the automatic way. I was using at some point a manual invocation of pytest and then things are not as nice :-) So, using the automatic (generated via autodep8, etc.)...: autodep8 generates: ---- Test-Command: pybuild-autopkgtest Depends: @, pybuild-plugin-autopkgtest, @builddeps@, Restrictions: allow-stderr, skippable, Features: test-name=pybuild-autopkgtest ---- man pybuild-autopkgtest(1): ---- pybuild-autopkgtest will run the tests in exactly the same way as pybuild will dur‐ ing the build, with the exception that the tests are not run in the build directory. The test files are copied to a temporary directory, so that the tests will run against the installed Python modules, and not against anything in the source tree. ---- And yes, it happens in /usr/share/dh-python/dhpython/build/base.py So, all good as long as pybuild-autopkgtest is used (and not pytest invoked manually). I'm happy deleting the d/rules workaround. Cheers, -- Carles Pina i Estany https://carles.pina.cat
Attachment:
signature.asc
Description: PGP signature