Path: csiph.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Soren Stoutner Newsgroups: linux.debian.maint.python Subject: Re: electrum: How to enable autopkgtest? Date: Wed, 30 Oct 2024 08:10:01 +0100 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Oct 30 07:07:04 2024 Old-Return-Path: X-Amavis-Spam-Status: No, score=-114.93 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIMWL_WL_HIGH=-0.421, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001, USER_IN_DKIM_WELCOMELIST=-0.01, USER_IN_DKIM_WHITELIST=-100] autolearn=ham autolearn_force=no Organization: Debian MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8923372.crm7W8obWO"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Debian-User: soren X-Mailing-List: archive/latest/22484 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/2054530.MAUd7XiDRF@soren-desktop Approved: robomod@news.nic.it Lines: 118 Sender: robomod@news.nic.it X-Original-Date: Wed, 30 Oct 2024 00:06:32 -0700 X-Original-Message-ID: <2054530.MAUd7XiDRF@soren-desktop> X-Original-References: <15878157.HmTS7JG1Cm@soren-desktop> <16967863.pHPEaDev0z@soren-desktop> Xref: csiph.com linux.debian.maint.python:16414 --nextPart8923372.crm7W8obWO Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Soren Stoutner To: debian-python@lists.debian.org Subject: Re: electrum: How to enable autopkgtest? Date: Wed, 30 Oct 2024 00:06:32 -0700 Message-ID: <2054530.MAUd7XiDRF@soren-desktop> Organization: Debian In-Reply-To: <16967863.pHPEaDev0z@soren-desktop> MIME-Version: 1.0 On Tuesday, October 29, 2024 11:11:44 PM MST Soren Stoutner wrote: > > > My question is, what is the canonical way to handle this? > >=20 > > Fixing the package so that it provides that module or patching the tests > > so that they don't require it. >=20 > The tests run successfully during build. >=20 > "688 passed, 3 skipped, 3 warnings in 98.99s (0:01:38)=E2=80=9D >=20 > https://salsa.debian.org/cryptocoin-team/electrum/-/jobs/6505007#L1548 Looking at things more deeply, the underlying cause is that the upstream=20 source contains GUI environments for both Linux (Qt) and Android (QML). In= =20 the build environment, all these files are present (this was the key I was= =20 missing). But, in the Debian package, the QML files have been removed (bec= ause=20 they aren=E2=80=99t needed). (Andrey, as I=E2=80=99m writing this I see you just sent me an email explai= ning the=20 same thing.) The test in question is test_qml_types.py. If I disable it in debian/rules using the following command the test no lon= ger=20 runs during build. export PYBUILD_TEST_ARGS=3D-k 'not test_qml_types.py=E2=80=99 However, that doesn=E2=80=99t fix the autopkgtest problem. I still receive= the=20 following error: I: pybuild base:311: cd /tmp/autopkgtest-lxc.0qtzuqhg/downtmp/autopkgtest_t= mp/ build; python3.12 -m pytest -k 'not test_qml_types.py' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D test session starts=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 rootdir: /tmp/autopkgtest-lxc.0qtzuqhg/downtmp/autopkgtest_tmp/build plugins: typeguard-4.3.0 collected 688 items / 1 error =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERRORS=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ___________________ ERROR collecting tests/test_qml_types.py=20 ___________________ ImportError while importing test module '/tmp/autopkgtest-lxc.0qtzuqhg/ downtmp/autopkgtest_tmp/build/tests/test_qml_types.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib/python3.12/importlib/__init__.py:90: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_qml_types.py:5: in from electrum.gui.qml.qetypes import QEAmount E ModuleNotFoundError: No module named =E2=80=98electrum.gui.qml=E2=80=99 https://salsa.debian.org/cryptocoin-team/electrum/-/jobs/6506576#L662 I assume this is because autopkgtests enumerates all of the imports, even f= or=20 tests it isn=E2=80=99t going to run. Is there a recommended way to disable this test entirely, including the=20 import? I would assume at least one of the following would work: 1. Use some other command (of which I am not aware) instead of "export=20 PYBUILD_TEST_ARGS=3D-k=E2=80=9D that causes autopkgtest to ignore the file = entirely. 2. Patch out the import line in the test using debian/patches. 3. Exclude the entire test file when repacking the upstream source. =2D-=20 Soren Stoutner soren@debian.org --nextPart8923372.crm7W8obWO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmch2vgACgkQwufLJ66w tgNv5A/+KOyGUO0YPMo3C+b+fl75l556wmAi1mH7FronBa+ABrZQNyaKDj//D6eJ WAJb+JQpyfSJzA696viIvm5mHKx+bzfVxCgI//ZICl/c/AjQVZcxYPyAuIJJeLly L6//M3priwPIoIm4Gf9Ws5RHun7yZEXfx7j1huVrukbYYslHZff3235ViRK8Ei5v 47dTElOmfu7RugKdKkqbjVY8vGxiuPndhNAxecX+5kGi5kcXzDVHqIyN0HA0Hplh Y22Owjm6cmyTL2HnE/MXNXrHAleZLK9O6hzThn3U2HhMzvZCEod+uKiTM16+3j6R o4RZ+gAn4bxVsQJe4OZGveINs5JLm3EEz49n3rWfHzDTGtuJT/feN08lADY2Bsbv 6DU9QwtecMjS4XD4lub8bYHGDMUZPMQjXa19o+pcs2OZRq6po1hKhv4LMElAI0dB urlf3D88Pd41eLMXEx/61ot9BPgIpP2DbWF9PFs7KM8nc7LEKM9sfNTYvIftXwsp aPVqhtzg+dzfY03JXJvsUU9XbJKUR9w2tmfwiVGnr6sahvucZ6an+8p4q3IFSTrB LJHh/3wRH5Khmj75cXMf5mDu66eSP1AthxyJ3kCW6iIPJgkOJO+VmSDSllQGx7qm dAaTk5VcrhTEKAE2zsrv/7xgyRJHoDgTJzzGf77vDVd8KNMS2LA= =LRIl -----END PGP SIGNATURE----- --nextPart8923372.crm7W8obWO--