-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Conditionally build tests, using the conds on which we submit tests to Helix #58511
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
Conversation
…sts to Helix Still build functional etc tests, as a sanity check, but gate the libraries test builds behind a big ol' if statement
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsStill build functional etc tests, as a sanity check, but gate the libraries test builds behind a big ol' if statement This PR submission should do a test build. Additionally, keep the functional tests around - their building (or not building) is as much what we're testing as whether they run fine or not on Helix.
|
<ProjectReference Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" | ||
Exclude="@(ProjectExclusions)" | ||
Condition="'$(TestAssemblies)' == 'true'" /> | ||
Condition="'$(TestAssemblies)' == 'true' and |
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.
This is a very long complicated condition, couldn't you choose to skip the entire build step like the "Send to Helix" part does? (or do you need the non-test-project build to run here?)
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.
Building the functional tests is important on some platforms, as a way to integration test multiple things like the AOT tasks, LDAP tasks, linker, etc.
I could make the conditional even more complex by restricting it to only specific platforms...
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.
Another way to express it might be with a property, like:
<PropertyGroup>
<IncludeLibraryTests Condition="'$(TestAssemblies)' != 'true'">false</IncludeLibraryTests>
<IncludeLibraryTests Condition="'$(IncludeLibraryTests)' == '' and '$(ContinuousIntegrationBuild)' != 'true'">true</IncludeLibraryTests>
<IncludeLibraryTests Condition="'$(IncludeLibraryTests)' == '' and '$(RuntimeFlavor)' != 'Mono'">true</IncludeLibraryTests>
<IncludeLibraryTests Condition="'$(IncludeLibraryTests)' == '' and
'$(RuntimeFlavor)' == 'Mono' and
('$(librariesContainsChange)' == 'true' or
'$(monoContainsChange)' == 'true' or
'$(isFullMatrix)' == 'true')">true</IncludeLibraryTests>
<IncludeLibraryTests Condition="'$(IncludeLibraryTests)' == ''">false</IncludeLibraryTests>
</PropertyGroup>
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.
Maybe we can achieve that on the yaml as well? Either way I'm fine, but I do agree this is a very hard to read condition.
Still build functional etc tests, as a sanity check, but gate the libraries test builds behind a big ol' if statement
This PR submission should do a test build.
Additionally, keep the functional tests around - their building (or not building) is as much what we're testing as whether they run fine or not on Helix.