-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Clean up test intermediates when clean test rebuild is requested #62001
Conversation
I hit this problem locally when working on the test merging - I made a change in Jeremy's Roslyn generator logic adding a hard FailFast and the tests continued building normally even when specifying the rebuild option because the XUnitWrapperGenerator project remained in the intermediate test folder and didn't get actually rebuilt. Thanks Tomas
Tagging subscribers to this area: @hoyosjs Issue DetailsI hit this problem locally when working on the test merging
Thanks Tomas /cc @dotnet/runtime-infrastructure
|
src/tests/build.sh
Outdated
if [[ -d "${__TestBinDir}" ]]; then | ||
echo "Removing test build dir: ${__TestBinDir}" | ||
rm -rf "${__TestBinDir}" | ||
echo "Removing test intermediate dir: ${__TestIntermediatesDir}" |
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.
Does this need a preceding:
if [[ -d "${__TestIntermediatesDir}" ]]; then
? Or will rm -rf
not complain if it doesn't exist? Of course, if __TestBinDir exists, it will essentially always exist anyway.
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.
Thanks Bruce for pointing that out. I have locally verified that rm -rf has no trouble with non-existent folders so I just removed the pre-existing condition instead of introducing a new one.
I have double-checked locally that Unix has no problem whatsoever with rm -rf on a non-existent directory. For this reason I have removed the pre-existing conditional block instead of creating a new one to cater for the intermediate folder. Thanks Tomas
As a side note, I'm not running outerloop or any other specialized pipelines as this change doesn't actually affect lab pipelines - the lab machines get cleaned up prior to each run - it is only useful in the context of local developer testing. |
I hit this problem locally when working on the test merging -
I made a change in Jeremy's Roslyn generator logic adding a hard
FailFast and the tests continued building normally even when
specifying the rebuild option because the XUnitWrapperGenerator
project remained in the intermediate test folder and didn't get
actually rebuilt. As an additional tiny cleanup I have also replaced
__TestWorkingDir with __TestBinDir in the Unix version of the script
as they are always identical.
Thanks
Tomas
/cc @dotnet/runtime-infrastructure