unify the target to build integration tests across platforms#8535
Conversation
| patterns: '**/*-$(targetPlatform).msi' | ||
|
|
||
| - script: tracer\build.cmd BuildAspNetIntegrationTests -Framework $(framework) | ||
| displayName: BuildWindowsIntegrationTests |
| .DependsOn(CopyNativeFilesForTests) | ||
| .DependsOn(CopyServerlessArtifacts); | ||
|
|
||
| Target BuildAndRunLinuxIntegrationTests => _ => _ |
There was a problem hiding this comment.
this target was not building the samples. It now does (as part of the unified command), though I doubt it sees much use.
| .After(CompileManagedSrc) | ||
| .After(CompileManagedTestHelpers) | ||
| .After(BuildRunnerTool) | ||
| .OnlyWhenStatic(() => IsLinux || IsOsx) |
There was a problem hiding this comment.
as the name implies. Necessary to put this in the common target and let this check skip it on windows
| .DependsOn(CleanTestLogs) | ||
| .Description("Runs the linux dd-dotnet integration tests") | ||
| .Requires(() => !IsWin) | ||
| .OnlyWhenStatic(() => IsLinux) |
There was a problem hiding this comment.
I don't think it makes any sense to run this target on OSX ?
BenchmarksBenchmark execution time: 2026-04-29 16:41:09 Comparing candidate commit 6304f2b in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 59 known flaky benchmarks, 28 flaky benchmarks without significant changes.
|
andrewlock
left a comment
There was a problem hiding this comment.
Makes sense overall thanks, just a couple of questions/suggestions
| .Where(path => !((string)path).Contains(Projects.DebuggerIntegrationTests)) | ||
| .Where(project => Solution.GetProject(project).GetTargetFrameworks().Contains(Framework)) | ||
| ; | ||
| .GlobFiles("test/*.IntegrationTests/*.csproj") |
There was a problem hiding this comment.
the linux/osx target was getting all csproj. It turns out it makes no difference now.
| ; | ||
| .GlobFiles("test/*.IntegrationTests/*.csproj") | ||
| .Where(path => !path.Contains(Projects.DebuggerIntegrationTests)) | ||
| .Where(project => Solution.GetProject(project).TryGetTargetFrameworks()?.Contains(Framework) ?? true); |
There was a problem hiding this comment.
linux/osx didn't have this guard, not sure it's actually useful
There was a problem hiding this comment.
Well it means you don't build the projects for every target framework, just the one you're running right?🤔
There was a problem hiding this comment.
yes but do we actually have projects that target only specific frameworks in the integration tests ? Not a lot I'd think. Maybe only in the paths that are excluded in linux and osx ?
There was a problem hiding this comment.
Well it means you don't build the projects for every target framework, just the one you're running right?🤔
This was an incorrect statement anyway 😅
we actually have projects that target only specific frameworks in the integration tests
Yes. And without this guard I think this would break?
There was a problem hiding this comment.
it worked well on the osx target without it 🤷
There was a problem hiding this comment.
(it meanse you don't build projects which don't target your selected framework, right ?)
Also, I (the AI) changed it to the "try" version, and I kept it that way because I thought it made sense
There was a problem hiding this comment.
(it meanse you don't build projects which don't target your selected framework, right ?)
Yep
Also, I (the AI) changed it to the "try" version, and I kept it that way because I thought it made sense
Yeah, probably 😄
There was a problem hiding this comment.
Also, I (the AI) changed it to the "try" version, and I kept it that way because I thought it made sense
Yeah, probably 😄
wow this place really is a minefield, I think that change broke something in the CI
| } | ||
|
|
||
| DotnetBuild(projects, framework: Framework); | ||
| DotnetBuild(projects, framework: Framework, noRestore: IsWin); |
There was a problem hiding this comment.
no idea why windows had norestore and not linux/macOS. I kept it as is, but maybe we want norestore for all ?
There was a problem hiding this comment.
I kept it as is
For the record, I don't remember why we can't use noRestore on Linux, but almost certainly "something breaks" if you try 😅
There was a problem hiding this comment.
either that, or it was added to the generic target (used only for windows) because it was an optim, and the person forgot to reflect it in the linux/osx target ^^
…ring contains, but it's not
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8535) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (75ms) : 70, 81
master - mean (76ms) : 72, 79
section Bailout
This PR (8535) - mean (79ms) : 75, 83
master - mean (79ms) : 75, 82
section CallTarget+Inlining+NGEN
This PR (8535) - mean (1,081ms) : 1034, 1129
master - mean (1,081ms) : 1024, 1138
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (119ms) : 110, 127
master - mean (118ms) : 112, 125
section Bailout
This PR (8535) - mean (116ms) : 113, 119
master - mean (115ms) : 112, 118
section CallTarget+Inlining+NGEN
This PR (8535) - mean (781ms) : 751, 811
master - mean (780ms) : 755, 805
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (104ms) : 98, 110
master - mean (104ms) : 98, 111
section Bailout
This PR (8535) - mean (101ms) : 99, 104
master - mean (103ms) : 98, 108
section CallTarget+Inlining+NGEN
This PR (8535) - mean (943ms) : 910, 976
master - mean (939ms) : 900, 977
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (103ms) : 97, 109
master - mean (101ms) : 96, 105
section Bailout
This PR (8535) - mean (105ms) : 101, 110
master - mean (105ms) : 99, 110
section CallTarget+Inlining+NGEN
This PR (8535) - mean (826ms) : 789, 862
master - mean (824ms) : 783, 864
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (203ms) : 197, 210
master - mean (204ms) : 194, 214
section Bailout
This PR (8535) - mean (207ms) : 200, 214
master - mean (207ms) : 199, 215
section CallTarget+Inlining+NGEN
This PR (8535) - mean (1,207ms) : 1163, 1251
master - mean (1,208ms) : 1156, 1259
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (291ms) : 281, 301
master - mean (293ms) : 280, 306
section Bailout
This PR (8535) - mean (292ms) : 281, 303
master - mean (294ms) : 283, 305
section CallTarget+Inlining+NGEN
This PR (8535) - mean (963ms) : 930, 996
master - mean (966ms) : 929, 1002
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (289ms) : 274, 305
master - mean (286ms) : 272, 299
section Bailout
This PR (8535) - mean (292ms) : 273, 311
master - mean (286ms) : 273, 299
section CallTarget+Inlining+NGEN
This PR (8535) - mean (1,160ms) : 1119, 1200
master - mean (1,158ms) : 1114, 1202
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8535) - mean (284ms) : 274, 295
master - mean (283ms) : 273, 292
section Bailout
This PR (8535) - mean (286ms) : 274, 298
master - mean (281ms) : 273, 289
section CallTarget+Inlining+NGEN
This PR (8535) - mean (1,048ms) : 1001, 1094
master - mean (1,040ms) : 991, 1089
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary of changes
Remove platform specific "BuildOsxIntegrationTests" etc. in favor of a single one that handles the things to skip internally.
Reason for change
make instructions simpler, and behavior consistent with the other targets
Implementation details
Test coverage
Other details