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

can't run the tox tests twice without deleting _trial_temp #10036

Closed
twisted-trac opened this issue Oct 24, 2020 · 2 comments
Closed

can't run the tox tests twice without deleting _trial_temp #10036

twisted-trac opened this issue Oct 24, 2020 · 2 comments

Comments

@twisted-trac
Copy link

graingert's avatar @graingert reported
Trac ID trac#10036
Type enhancement
Created 2020-10-24 13:31:14Z

when running the tests twice in a row I get this error

WARNING: Ignoring special file error '`/home/graingert/projects/twisted/_trial_temp/twisted.test.test_unix/DatagramUnixSocketTests/test_reprWithNewStyleProtocol/lk6x7h_1/temp` is a socket' encountered copying /home/graingert/projects/twisted/_trial_temp/twisted.test.test_unix/DatagramUnixSocketTests/test_reprWithNewStyleProtocol/lk6x7h_1/temp to /tmp/pip-req-build-1wyjs487/_trial_temp/twisted.test.test_unix/DatagramUnixSocketTests/test_reprWithNewStyleProtocol/lk6x7h_1/temp.
...
shutil.Error: [('/home/graingert/projects/twisted/_trial_temp/twisted.test.test_process/UtilTests/test_whichWithoutPATH/z5hnzywn/temp/baz/bar/executable', '/tmp/pip-req-build-bdskj_1a/_trial_temp/twisted.test.test_process/UtilTests/test_whichWithoutPATH/z5hnzywn/temp/baz/bar/executable', "[Errno 13] Permission denied: '/home/graingert/projects/twisted/_trial_temp/twisted.test.test_process/UtilTests/test_whichWithoutPATH/z5hnzywn/temp/baz/bar/executable'"), ('/home/graingert/projects/twisted/_trial_temp/twisted.test.test_process/UtilTests/test_which/wqtzvpna/temp/baz/bar/executable', '/tmp/pip-req-build-bdskj_1a/_trial_temp/twisted.test.test_process/UtilTests/test_which/wqtzvpna/temp/baz/bar/executable', "[Errno 13] Permission denied: '/home/graingert/projects/twisted/_trial_temp/twisted.test.test_process/UtilTests/test_which/wqtzvpna/temp/baz/bar/executable'"), ('/home/graingert/projects/twisted/_trial_temp/twisted.test.test_process/UtilTests/test_whichPathExt/4q2uzyt2/temp/baz/bar/executable', '/tmp/pip-req-build-bdskj_1a/_trial_temp/twisted.test.test_process/UtilTests/test_whichPathExt/4q2uzyt2/temp/baz/bar/executable', "[Errno 13] Permission denied: '/home/graingert/projects/twisted/_trial_temp/twisted.test.test_process/UtilTests/test_whichPathExt/4q2uzyt2/temp/baz/bar/executable'")]

this is because sockets and chmod u-x files in this directory are not cleaned up and cannot be copied by pip when building wheels

there's various other problems with _trail_temp not being cleaned up and I talk about it more here https://freenode.logbot.info/twisted-dev/20201024#c5576741-c5577518

Just moving it to {toxenvtmp} fixes a load of stuff for us and is an easy fix, but we should probably think about how to handle this sort of cleanup for other consumers of twisted.trial.

I'd like a new flag eg --basetmp-keep=3 that would opt into the pytest style tmp behaviour https://github.com/pytest-dev/pytest/blob/f81c6c00a9279ab17b29fe87d6215ace11cd7f43/src/_pytest/pathlib.py#L334

#1467

Searchable metadata
trac-id__10036 10036
type__enhancement enhancement
reporter__graingert graingert
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1603546274083361 1603546274083361
changetime__1603749140280535 1603749140280535
version__None None
owner__graingert graingert

@twisted-trac
Copy link
Author

wsanchez's avatar @wsanchez set owner to @graingert

@twisted-trac
Copy link
Author

wsanchez's avatar @wsanchez set status to closed

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

No branches or pull requests

2 participants