-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-45783: Preserve file moves and deletions in the tests for the freeze tool. #29527
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
bpo-45783: Preserve file moves and deletions in the tests for the freeze tool. #29527
Conversation
Thanks for the quick PR! The Granted, |
Ah, that's not great. I took the approach I did to save some time on each run when running locally. However, it isn't that big a difference, so I'll dial it back. That should take care of the problem. Sorry about that. Oh, I misunderstood. The problem is just where "outdir" is in relation to the test. Making it a temp dir should fix it. |
That, and the behavior when tests are run from a source release (no Git repo at all). |
@encukou, any objections? |
Almost. Sorry for giving you the info piecewise – I don't know the buildsystem well enough to see ahead :( It turns out that CPython can be built "out of tree" by running e.g.
We use this to produce regular and debug builds from the same source. In this case, |
Thanks for the feedback. I'll change that. |
@encukou, that should be fixed now. |
You should also run Or maybe do this as an extra CI/buildbot check? The deeper this goes, the more it seems like compiling the project from within the test suite cuts against the grain. |
That already happens. Did something happen that suggests otherwise?
I can look into that but wouldn't be able to any time soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I must have been using a wrong commit/patch at the time.
Thank you for the fix!
…eze tool. (pythonGH-29527) Use shutil.copytree rather than Git, which might be missing (or configured differently) when testing Python built from a source release.
The prep code for the test wasn't handling the case where uncommitted files were deleted or moved. This change takes care of that. We also ensure more consistent results by using
git status --porcelain
instead ofgit status -s
, as well asgit clean -x
andgit reset --hard
.https://bugs.python.org/issue45783