Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #11782
| Path | csiph.com!weretis.net!feeder7.news.weretis.net!news.albasani.net!tahina.priv.at!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ole Streicher <olebole@debian.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: pybuild mysteriously does not copy all testfiles |
| Date | Tue, 10 Sep 2019 16:40:02 +0200 |
| Message-ID | <yEPtg-1Oi-5@gated-at.bofh.it> (permalink) |
| References | <yEOQx-1jy-5@gated-at.bofh.it> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Tue Sep 10 14:33:09 2019 |
| Old-Return-Path | <news@liska.ath.cx> |
| X-Amavis-Spam-Status | No, score=-6.75 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HEADER_FROM_DIFFERENT_DOMAINS=0.249, KHOP_HELO_FCRDNS=0.001, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .ath. - helo: .liska.ath. - helo-domain: .ath.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 112 |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/17303 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/871rwo9r1i.fsf@orrococo |
| Approved | robomod@news.nic.it |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Tue, 10 Sep 2019 16:14:49 +0200 |
| X-Original-Message-ID | <871rwo9r1i.fsf@orrococo> |
| X-Original-References | <74223098-e73b-8eb3-b5f1-004cdad9302c@debian.org> |
| Xref | csiph.com linux.debian.maint.python:11782 |
Show key headers only | View raw
Hi IOhannes,
I have basically the same problem, funnily with almost the same subject:
https://lists.debian.org/debian-python/2019/09/msg00040.html
The difference is, that the "external" subdirectory is not copied. So,
it seems to be a bug in dh-python.
Cheers
Ole
"IOhannes m zmölnig (Debian/GNU)" <umlaeute@debian.org> writes:
> 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=can
> include /usr/share/dpkg/default.mk
> export DEB_VERSION_UPSTREAM
> %:
> dh $@ --with python3,sphinxdoc --buildsystem=pybuild
> 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
> .pybuild/cpython3_3.7_can/build/ rather than into
> .pybuild/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=cp -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
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pybuild mysteriously does not copy all testfiles IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> - 2019-09-10 16:00 +0200
Re: pybuild mysteriously does not copy all testfiles Ole Streicher <olebole@debian.org> - 2019-09-10 16:40 +0200
Re: pybuild mysteriously does not copy all testfiles IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> - 2019-09-12 10:30 +0200
csiph-web