Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/portage/dev-python/scikit-build-0.17.6/temp/pytest-of-portage/pytest-22' #1093

Open
arkamar opened this issue Jun 14, 2024 · 1 comment

Comments

@arkamar
Copy link

arkamar commented Jun 14, 2024

I tried to run tests on current main and following tests fail for me:

ERROR tests/test_command_line.py::test_cmake_initial_cache_as_global_option - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_setup.py::test_distribution_is_pure[unknown] - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_setup.py::test_distribution_is_pure[py_modules] - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_setup.py::test_distribution_is_pure[packages] - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_setup.py::test_distribution_is_pure[skbuild] - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_utils.py::test_push_dir - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_utils.py::test_push_dir_decorator - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'
ERROR tests/test_utils.py::test_mkdir_p - FileNotFoundError: [Errno 2] No such file or directory: b'/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22'

The issue seems to be related to tmpdir life cycle, because all of those tests pass if I run them individually. I tried to strace what happens there and the pytest-22 directory is renamed

rename("/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-22", "/var/tmp/portage/dev-python/scikit-build-9999/temp/pytest-of-portage/pytest-garbage-9e24e15f-96fd-4336-8f55-48394aae858e") = 0

between tests/test_command_line.py::test_no_command and tests/test_command_line.py::test_invalid_command tests.

The issue is related to Gentoo bug https://bugs.gentoo.org/933655

@mgorny
Copy link
Contributor

mgorny commented Jun 14, 2024

This is because we're passing -o tmp_path_retention_count=0 to save space. Forcing =1 instead resolves it. That said, it would be nice if scikit-build didn't rely on implicit temporary directory persistence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants