Allow repos to opt-out of building tests#46394
Conversation
Yes please, I already had to read that sentence twice to spot the difference :D I'd call it |
| <BuildArgs Condition="'$(DotNetBuildSourceOnly)' != 'true' and '@(TransitiveRepositoryReference->AnyHaveMetadataValue('Identity', 'runtime'))' == 'true'">$(BuildArgs) /p:DotNetBuildTargetRidOnly=true</BuildArgs> | ||
|
|
||
| <!-- Only pass when enabled to reduce command line noise. --> | ||
| <BuildArgs Condition="'$(DotNetBuildTests)' == 'true' and '$(DoNotBuildTests)' != 'true'">$(BuildArgs) /p:DotNetBuildTests=true</BuildArgs> |
There was a problem hiding this comment.
I do think the names are deceptively similar. I propose a name like ExcludeFromBuildingTests.
There was a problem hiding this comment.
This doesn't need to be in a target. Only properties that need dynamic resolution (like the one above) needs to be here.
I would put this here:
There was a problem hiding this comment.
Yeah, that's better - thanks!
|
|
||
| <PropertyGroup> | ||
| <DeterministicBuildOptOut>true</DeterministicBuildOptOut> | ||
| <DoNotBuildTests>true</DoNotBuildTests> |
There was a problem hiding this comment.
Should we file tracking issues for these exclusions and add comments here?
There was a problem hiding this comment.
Sure. I'll do that - thanks!
Hmm, we have two naming proposals now: To me, |
OK - going with |
Fixed with 51744b8 |
|
All checks are passing except an unrelated |
This is a prerequisite for us enabling tests in VMR, i.e. #44843
This PR sets the new opt-out property for repos that are not ready to build tests, for some reason. I will create issues for each of those repos with detailed info about test failures and steps forward. PRs with fixes would follow soon after.
This PR also fixes the issue with building tests in
sdkrepo.I understand that the new property
DoNotBuildTestshas a very similar name to the property we use to enable tests:DotNetBuildTests. If there is a significant risk of confusion, we can change the name to something else.