Path: csiph.com!news.mixmin.net!news.albasani.net!tahina.priv.at!bofh.it!news.nic.it!robomod From: =?UTF-8?Q?IOhannes_m_zm=c3=b6lnig_=28Debian/GNU=29?= Newsgroups: linux.debian.maint.python Subject: pybuild mysteriously does not copy all testfiles Date: Tue, 10 Sep 2019 16:00:01 +0200 Message-ID: X-Mailbox-Line: From debian-python-request@lists.debian.org Tue Sep 10 13:54:28 2019 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, PGPSIGNATURE=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 X-Greylist: delayed 2651 seconds by postgrey-1.36 at bendel; Tue, 10 Sep 2019 13:54:18 UTC Openpgp: preference=signencrypt Autocrypt: addr=umlaeute@debian.org; prefer-encrypt=mutual; keydata= mQINBFI/EooBEACZaZ/vapfz84oWHPgzR5Lb313+IAzMTj1hV+bkh1FgtDopoyrnVQMB8XKj mIXEfAoQQ064h7SW4Q3jDuNlyVU/5SdyM7YzE6RwHixP1x8zlNhWvKR+TTacsIqPxxHs4N3c 0OuCSBOCrYaQJntv/LGDbCyVbqhZcxLwWdYVSQll9e846SxE+NTAhhX7zKw8grXhz2xxt8FH YCxOK1gUlwvbHV5dSF1VNac+ZXakbdyxqLaR7S1Qr/haAFhf7jlvBlOXqJv9udC9bxk7Ta2b grfsIw6zc/TqRG20KMBAjIpdL18z2z5uoUBC6Bm+GksN+VYYF8F7qHncve1I2mEj/ednGPOf H7KKk1VrOHO7ElNDhEckLcSRcvYBOP+g8Itw8uWxWWrdeWACupVdxmQI14P4C0nKYq8rQ6QN OQ1YGRwx2hJfrH5GikjXDskcc9nnO2gjzFH+BOElsObBG4N/hnxZyu7v9qz9Q2SjjP1N3zzj xjPdfleBbBi040E0WnaYr6RWvFJT/isgSWZ/NFzzGd7Z1K7cif3LFoBn+f8WoGPQxIaOiESf QbM9Vi+dnu8HOwuWM1vUFWLJAbCj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iGEPxnhXguh zchKB37WqAkSw3h/NPlGFi1CSVI4/bNvmMMi1ksHHAukX/rtjo7hVk+RCPXY+CzCPUctAKVR WO4QQ9L5UVGE4hjHs7NCUGfRFyH3ZGzWLwno7Sy1I/99AS0AwpWfl8nafzPppEjs+OGEAdg8 ntOmpjDuKezwDyt1X6A47y6A34Mv+UjOEAkthTjr7QkZxktYqJM/gmXx4dLMvYmXXSQ/VFxM wHaykZRl0bLUCNx49opKLustc9UdCKygj7jq+EKqKwxn1vd336x5nndtiVH+GpRqPVyJnJpd HXwnFOg3dLsSM68C+oppyaw6 Organization: Debian/GNU User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BkxhuSnUuO1yD741L4IK5hVZ6GoxE4sMz" X-Mailing-List: archive/latest/17302 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/74223098-e73b-8eb3-b5f1-004cdad9302c@debian.org Approved: robomod@news.nic.it Lines: 140 Sender: robomod@news.nic.it X-Original-Date: Tue, 10 Sep 2019 15:10:01 +0200 X-Original-Message-ID: <74223098-e73b-8eb3-b5f1-004cdad9302c@debian.org> Xref: csiph.com linux.debian.maint.python:11781 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BkxhuSnUuO1yD741L4IK5hVZ6GoxE4sMz Content-Type: multipart/mixed; boundary="flWSk8ZjYiNSayVhJvGJvgeTiSYBSEPoe"; protected-headers="v1" From: =?UTF-8?Q?IOhannes_m_zm=c3=b6lnig_=28Debian/GNU=29?= To: debian-python@lists.debian.org Message-ID: <74223098-e73b-8eb3-b5f1-004cdad9302c@debian.org> Subject: pybuild mysteriously does not copy all testfiles --flWSk8ZjYiNSayVhJvGJvgeTiSYBSEPoe Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable updating one of my packages (python-can), the test-suite started to fail, with an error-code 5, indicating that "no tests have been run". since there *are* tests to be run, i investigated and - after scratching my head - found that 'pybuild' did not fully copy the test-directory from the source-directory to the build directory. The sources "test/" directory contains: ``` test/serial_test.py test/test_slcan.py test/test_cyclic_socketcan.py test/data/logfile.blf test/data/__init__.py test/data/example_data.py test/data/logfile.asc test/test_bit_timing.py test/zero_dlc_test.py test/test_systec.py test/open_vcan.sh test/message_helper.py test/contextmanager_test.py test/test_detect_available_configs.py test/test_message_sync.py test/notifier_test.py test/config.py test/simplecyclic_test.py test/test_scripts.py test/logformats_test.py test/listener_test.py test/back2back_test.py test/test_message_class.py test/__init__.py test/test_message_filtering.py test/test_socketcan.py test/test_kvaser.py test/test_viewer.py test/network_test.py test/test_vector.py test/test_socketcan_helpers.py test/test_load_file_config.py ``` However, ".pybuild/cpython3_3.7_can/build/test/" contains only: (after dh_auto_test failed): ``` test/data/__init__.py test/data/example_data.py ``` d/rules is pretty standard: ``` #! /usr/bin/make -f export PYBUILD_NAME=3Dcan include /usr/share/dpkg/default.mk export DEB_VERSION_UPSTREAM %: dh $@ --with python3,sphinxdoc --buildsystem=3Dpybuild override_dh_clean: dh_clean rm -f test.asc test.csv rm -rf .pytest_cache/ override_dh_auto_build: dh_auto_build python3 -m sphinx -E -T -b html doc .pybuild/docs/html/ override_dh_auto_install: dh_auto_install -for f in debian/*/usr/bin/*.py; do mv $$f $${f%.py}; done -rm -f debian/*/usr/lib/python*/dist-packages/test.??? ``` and the package does not contain d/pybuild.testfiles or similar. Now if I add a file from tests (say "test/network_test.py") to d/pybuild.testfiles, that file is copied (although into =2Epybuild/cpython3_3.7_can/build/ rather than into =2Epybuild/cpython3_3.7_can/build/test/) and runs correctly. adding "test/" to d/pybuild.testfiles (with or without the trailing slash) did not do anything (apart from the original behaviour of only copying 2 files). doing something like "find test -type f > d/pybuild.testfiles" copied all files, however the directory structure was lost (all files ended up in .pybuild/cpython3_3.7_can/build/), and the tests started to fail as they didn't find files in the subdirectories as expected. i'm totally stumified. an intermediate hack i found to work is to manually copy the "test/" directoy into the build-dir, using: export PYBUILD_BEFORE_TEST=3Dcp -r {dir}/test {build_dir} but that seems extraordinarily clumsy. esp. since pybuild(1) says: > By default only test and tests directories are copied to build > directory. any ideas what does wrong? mgfdsar IOhannes --flWSk8ZjYiNSayVhJvGJvgeTiSYBSEPoe-- --BkxhuSnUuO1yD741L4IK5hVZ6GoxE4sMz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdAXnRVdICXNIABVttlAZxH96NvgFAl13oKkACgkQtlAZxH96 NviJSQ/7B86o8nlGtc5aDdo4pkYK9AaBDVO0pWMm87rrkymNchph4vN7L2qEACsT fOJeJgfs8C5WQBvSeD9NMsUbX6OODdgzxLCVE3Qt5/qYpkJHotoWDScrIrkqdUN9 +AMWrrudZTpc29f7Elp1kDCm/TaE1ULwj+T0zIg1h3BPK8azw5h8By/sprTgYGq5 NAShtXFfLGYQDYZFWBQ6Ge+SXfqmqnViNokfwGVx1LR90u79KHXzDVY67meV87Mg qAkcGUue0d/D/LfZWuqJzNehc4li4eK8ovBW1iQMpFtGJ1hOaVLVrjRFNnxhld4R V+2rvtUcmAEICwuP52JzB1Yfpkieyuf6sJoU4IDME0izaEbcHTtnjJP1EAxtQKjh 189VxU0/E90CjvDtXqzAsMS3hMFoSQTIhDEABfTYzCR4jVSJF9oSr8FAt0zGuayF R0PDM9LBWU9GqUiJ5qsDOHRAaJKoWprqf4Y+pLE3CnOv6k/H81knM5K3za4SjrJM spNs3tPyxDi9QTNtH6bbBLhMDld+EvZtNM6CdaXLNnhk1ET+zL96AENuQGNERhY4 chrWs6v0FFfdn+LsxT+tGfiIMqxx4jIGPFazmQZg8q8/YZelXXhfYciY5fBfhgu6 VgbhMnKt4YttNrrla+ooOj7ZyFe0/7lCLR6nQXVkWgixzizL04Y= =Sss8 -----END PGP SIGNATURE----- --BkxhuSnUuO1yD741L4IK5hVZ6GoxE4sMz--