The self-tests tries seems to open some files which fails and I suspect
it is because srcdir != builddir reasons, or something similar, see
errors here:
https://salsa.debian.org/jas/python-tuf/-/jobs/6707693
==================================== ERRORS ====================================
______________ ERROR collecting tests/test_metadata_generation.py ______________
tests/test_metadata_generation.py:10: in <module>
from tests.generated_data.generate_md import generate_all_files tests/generated_data/generate_md.py:60: in <module>
os.mkdir(OUT_DIR)
E FileNotFoundError: [Errno 2] No such file or directory: 'generated_data/ed25519_metadata'
How is this (seamingly common) problem solved normally? Do we copy test
data files into the build directory somehow? Do we include them in the package? Do we patch hard-coded paths like this to make it work?
On Thu, Dec 05, 2024 at 11:39:24PM +0100, Simon Josefsson wrote:
The self-tests tries seems to open some files which fails and I suspect
it is because srcdir != builddir reasons, or something similar, see
errors here:
https://salsa.debian.org/jas/python-tuf/-/jobs/6707693
==================================== ERRORS ====================================
______________ ERROR collecting tests/test_metadata_generation.py ______________
tests/test_metadata_generation.py:10: in <module>
from tests.generated_data.generate_md import generate_all_files
tests/generated_data/generate_md.py:60: in <module>
os.mkdir(OUT_DIR)
E FileNotFoundError: [Errno 2] No such file or directory: 'generated_data/ed25519_metadata'
How is this (seamingly common) problem solved normally? Do we copy test
data files into the build directory somehow? Do we include them in the
package? Do we patch hard-coded paths like this to make it work?
It's not common and test data files are already copied because they are
under tests/. It's because of relative paths and I can reproduce this
problem by running pytest in the upstream's git checkout.
See full log:
https://salsa.debian.org/jas/python-tuf/-/jobs/6710680/viewer
Several failures seems related to not being able to find some test file,
any ideas how to fix this further?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 487 |
Nodes: | 16 (3 / 13) |
Uptime: | 01:59:31 |
Calls: | 9,662 |
Calls today: | 4 |
Files: | 13,709 |
Messages: | 6,166,608 |
Posted today: | 2 |