Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #11781 > unrolled thread
| Started by | IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> |
|---|---|
| First post | 2019-09-10 16:00 +0200 |
| Last post | 2019-09-12 10:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.debian.maint.python
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
| From | IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> |
|---|---|
| Date | 2019-09-10 16:00 +0200 |
| Subject | pybuild mysteriously does not copy all testfiles |
| Message-ID | <yEOQx-1jy-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [next] | [standalone]
| From | Ole Streicher <olebole@debian.org> |
|---|---|
| Date | 2019-09-10 16:40 +0200 |
| Message-ID | <yEPtg-1Oi-5@gated-at.bofh.it> |
| In reply to | #11781 |
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
[toc] | [prev] | [next] | [standalone]
| From | IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> |
|---|---|
| Date | 2019-09-12 10:30 +0200 |
| Message-ID | <yFsEh-3kv-3@gated-at.bofh.it> |
| In reply to | #11782 |
On 10.09.19 16:14, Ole Streicher wrote: > Hi IOhannes, > > I have basically the same problem, funnily with almost the same subject: which was entirely intentional :-) i decided to start a new thread because i'm not sure whether the problem is really the same. but i guess, i'll just file a bug against dh-python... dfasdr IOhannes
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.maint.python
csiph-web