Skip to content

Commit d9d15c8

Browse files
jonathanpeppersjonpryor
authored andcommitted
Bump to MSbuild.StructuredLogger 2.1.500 (dotnet#6168)
Some of our `PerformanceTest`'s are currently ignored due to: Ignored : Xamarin.Android.Build.Tests.PerformanceTest.Build_No_Changes Test requires an updated MSBuild.StructuredLogger We ignored these tests in 304e698. This was failing due to changes in the `.binlog` file format. I think we can remove this with the latest MSBuild.StructuredLogger.
1 parent a5e6806 commit d9d15c8

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<ItemGroup>
2727
<PackageReference Include="NodaTime" Version="2.4.5" />
28-
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.303" />
28+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.500" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,15 @@ double GetDurationFromBinLog (ProjectBuilder builder)
6868
var binlog = Path.Combine (Root, builder.ProjectDirectory, "msbuild.binlog");
6969
FileAssert.Exists (binlog);
7070

71-
try {
72-
var build = BinaryLog.ReadBuild (binlog);
73-
var duration = build
74-
.FindChildrenRecursive<Project> ()
75-
.Aggregate (TimeSpan.Zero, (duration, project) => duration + project.Duration);
76-
77-
if (duration == TimeSpan.Zero)
78-
throw new InvalidDataException ($"No project build duration found in {binlog}");
79-
80-
return duration.TotalMilliseconds;
81-
} catch (NotSupportedException) {
82-
// See: https://github.com/dotnet/msbuild/issues/6225
83-
Assert.Ignore ($"Test requires an updated MSBuild.StructuredLogger");
84-
return 0;
85-
}
71+
var build = BinaryLog.ReadBuild (binlog);
72+
var duration = build
73+
.FindChildrenRecursive<Project> ()
74+
.Aggregate (TimeSpan.Zero, (duration, project) => duration + project.Duration);
75+
76+
if (duration == TimeSpan.Zero)
77+
throw new InvalidDataException ($"No project build duration found in {binlog}");
78+
79+
return duration.TotalMilliseconds;
8680
}
8781

8882
ProjectBuilder CreateBuilderWithoutLogFile (string directory = null, bool isApp = true)

0 commit comments

Comments
 (0)