-
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
Build all managed coreclr tests on OSX in CI #35783
Conversation
Tagging subscribers to this area: @ViktorHofer |
This is a fairly significant change in CoreCLR test strategy, but I think it is a big win.
All pipelines will eventually need some testing. |
fc440bc
to
29a9d8e
Compare
Most of this looks good to me. Apart from the above pipeline failures that need investigating and fixing as they seem clearly related to your change, I have a hard time figuring out how the test split works with your change. If I'm not mistaken, you're removing the
Thanks Tomas |
The idea is that the category
This patch eliminates the So this really changes the three scenarios. We now have
The change relies on the bash/batch wrapper scripts to disable tests which do not run on the specific |
I think I'm getting the general idea but I still don't fully understand how we manage to only build platform-specific tests in run-test-job. Is the logic solely based on test build "incrementalism" that ends up not rebuilding tests that have already been built - i.o.w. we first download the target-agnostic tests and that by itself ensures that those tests won't be built again in run-test-job? If that is the case, it might be worth a comment in the yml file as it seems non-trivial to me and possible future changes to the test build process can easily break this. |
We are not building managed tests in So we are now building all tests for all target on OSX. If a test used to have multiple configurations, it now has a separate name for each configuration. So all tests can be built simulataneously. We are not building any managed tests during The target specific tests are being skipped in helix because of the |
OK, I finally got it, thanks for your patience with me! |
When you say "Build all managed coreclr tests on OSX", is that proxy for "Build all managed coreclr tests exactly once, and that happens to be macOS because our macOS build servers are the fastest ones we have available to us, and getting the build out fast unblocks subsequent parallel test run steps"? Would this enable or make easier a dev inner-loop scenario where devs download a recent test build instead of building tests themselves (if desired)? |
Yes
I do not see why not |
I answered too soon. you would still need the native components of the tests. Those are built in the build job. You would need to download two artifacts |
There is probably some more work required to improve the innerloop via download, but this makes things easier. |
5849d6c
to
648e2ff
Compare
648e2ff
to
3791f79
Compare
3791f79
to
5335f94
Compare
Looks to me like things are now working like they are expected. There are still some failing tests. These were likely regressions introduced because of the CI coverage outage. Rather than continuing to amend this patch, I have put these recent regressions in #35860 |
Also note the documentation doesn't actually represent the current implementation. To allow the PR to merge, I am not updating that here yet either. Also if we are concerned with helix payload increases, we can look alternatives... I can think of a few.... |
@naricc I am just tagging my self here because I am working on making sure the runtime tests work on Mono (we already have a lane for OSX up and running) and want to follow this. |
@@ -610,47 +610,6 @@ jobs: | |||
jobParameters: | |||
testGroup: innerloop | |||
liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} |
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.
I think we can incorporate the mono build-test-job in here too: https://github.com/dotnet/runtime/blob/5335f94a9747a64bd300ce06a4ce36a60f4ea71f/eng/pipelines/runtime.yml#L663
Although I can do that as a separate PR later if you like.
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.
I would suggest adding this in a follow up pr
Adding @jkoritzinsky and @AaronRobinsonMSFT for the COM specific bits |
After some discussion we have decided to revert the existing change. The rest of the work will happen in its own branch as it is clear each change will have follow up work. |
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.
Interop tests look good to me.
Remove concept of targetGeneric and targetSpecific Add OSX corelcr managed tests builds to all pipes Remove all other platform coreclr managed test build Remove property `TestUnsupportedOutsideWindows` Rename conditional `DisableProjectBuild` to `CLRTestTargetUnsupported` Refactor tests to allow all managed tests to be built on OSX. Split managed tests which based on target properties conditionally: + `<Compile Include/>` + `<DefineConstant/>` This creates a separate test for each target configuration permutation. Add `<CLRTestTargetUnsupported/>` conditions to select these at build Revise CLRTest.Execute.Bash.targets & CLRTest.Execute.Batch.targets to disable on `<CLRTestTargetUnsupported/>`. Append split tests with `_Target*` to identify intended test target For tests which depend on target specific internal details od System.Private.Corlib, expose a dummy implementation for unsupported targets. Clean up Remove <TraitTags/> Remove <CLRTestNeedTarget/> Remove managedOSXBuild Remove managedTestBuildOsGroup Remove managedTestBuildOsSubGroup Use issues.target to disable expected failures Some tests are configured to run on a targets with specific charecteristics. Use issues.targets to conditionally disable tests not intended to run on all targets.
5335f94
to
3264204
Compare
I just squashed and rebased on the origin/master after the #35868 revert. |
Design choices....
Open issues:
Open issues (deferrable):
|
My current design thought is to leverage the The project disable code would change to ... <!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported>+Windows+</CLRTestTargetUnsupported>
<!-- Test unsupported outside of windows -->
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported>+Windows+arm64+</CLRTestTargetUnsupported> The build of projects would be disabled based on The script targets would get added code to selectively disable the script <BashCLRTestEnvironmentCompatibilityCheck Condition="'$(CLRTestTargetUnsupported.Contains('+arm64+)"> For OS specific disables, we would rely on
For Arch specific disables
|
cc @safern for test selection. doesn't that sound very similar to what we are doing with xunit in libraries? |
I started drafting the disable code. For reference this is the set of $ git grep -h CLRTestTargetUnsupported | sort | uniq -c | sort -n -r
224 <CLRTestTargetUnsupported>+Unix+</CLRTestTargetUnsupported>
20 <CLRTestTargetUnsupported>+arm+x86+</CLRTestTargetUnsupported>
16 <CLRTestTargetUnsupported>+arm64+x64+</CLRTestTargetUnsupported>
7 <CLRTestTargetUnsupported>+Unix+arm64+</CLRTestTargetUnsupported>
4 <CLRTestTargetUnsupported>+Windows+</CLRTestTargetUnsupported>
4 <CLRTestTargetUnsupported>+arm64+x64+x86+</CLRTestTargetUnsupported>
4 <CLRTestTargetUnsupported>+arm64+x64+arm+</CLRTestTargetUnsupported>
2 <CLRTestTargetUnsupported>+arm+</CLRTestTargetUnsupported>
2 <CLRTestTargetUnsupported>+arm64+arm+x86+</CLRTestTargetUnsupported>
1 <CLRTestTargetUnsupported>+Unix+arm+</CLRTestTargetUnsupported>
1 <CLRTestTargetUnsupported>+arm64+</CLRTestTargetUnsupported> |
Merged to the dev/infrastructure branch as #36253 |
Remove concept of targetGeneric and targetSpecific
Add OSX corelcr managed tests builds to all pipes
Remove all other platform coreclr managed test build
Remove property
TestUnsupportedOutsideWindows
Rename target conditional
DisableProjectBuild
toCLRTestTargetUnsupported
Refactor tests to allow all managed tests to be built on OSX.
Split managed tests which based on target properties conditionally:
<Compile Include/>
<DefineConstant/>
This creates a separate test for each target configuration permutation.
Add
<CLRTestTargetUnsupported/>
conditions to select these at build time.Add issues to
issues.targets
to exclude incompatible tests at run time.Append split tests with
_Target*
to identify intended test targetFor tests which depend on target specific internal details of System.Private.Corlib,
expose a dummy implementation for unsupported targets.
Clean up
Remove
<TraitTags/>
Remove
<CLRTestNeedTarget/>
Remove managedOSXBuild
Remove managedTestBuildOsGroup
Remove managedTestBuildOsSubGroup
"