Skip to content

Commit 9a478f5

Browse files
committed
Disable Parallelization for Deterministic Build
1 parent 72f4a71 commit 9a478f5

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

test/coverlet.integration.determisticbuild/coverlet.integration.determisticbuild.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<TargetFramework>net8.0</TargetFramework>
77
<IsPackable>false</IsPackable>
88
<AssemblyName>coverletsample.integration.determisticbuild</AssemblyName>
9-
<MSBuildWarningsAsMessages>NU1604;NU1701</MSBuildWarningsAsMessages>
9+
<MSBuildWarningsAsMessages>NU1604</MSBuildWarningsAsMessages>
1010
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
1111
<RestoreSources>
1212
https://api.nuget.org/v3/index.json;
@@ -16,6 +16,7 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
19+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
1920
<PackageReference Include="coverlet.msbuild" Version="$(coverletMsbuildVersion)">
2021
<PrivateAssets>all</PrivateAssets>
2122
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

test/coverlet.integration.tests/Collectors.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
namespace Coverlet.Integration.Tests
1111
{
12-
public class TestSDK_17_8_0 : Collectors
12+
public class TestSDK_17_13_0 : Collectors
1313
{
14-
public TestSDK_17_8_0()
14+
public TestSDK_17_13_0()
1515
{
16-
TestSDKVersion = "17.8.0";
16+
TestSDKVersion = "17.13.0";
1717
}
1818

1919
private protected override void AssertCollectorsInjection(ClonedTemplateProject clonedTemplateProject)
@@ -27,19 +27,19 @@ private protected override void AssertCollectorsInjection(ClonedTemplateProject
2727
}
2828
}
2929

30-
public class TestSDK_17_6_0 : Collectors
30+
public class TestSDK_17_12_0 : Collectors
3131
{
32-
public TestSDK_17_6_0()
32+
public TestSDK_17_12_0()
3333
{
34-
TestSDKVersion = "17.6.0";
34+
TestSDKVersion = "17.12.0";
3535
}
3636
}
3737

3838
public class TestSDK_Preview : Collectors
3939
{
4040
public TestSDK_Preview()
4141
{
42-
TestSDKVersion = "17.9.0-preview-23531-01";
42+
TestSDKVersion = "17.14.0-preview-25107-01";
4343
}
4444
}
4545

test/coverlet.integration.tests/DeterministicBuild.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace Coverlet.Integration.Tests
1515
{
16+
[Collection("DeterministicBuild Collection")]
1617
public class DeterministicBuild : BaseTest, IDisposable
1718
{
1819
private static readonly string s_projectName = "coverlet.integration.determisticbuild";
@@ -383,4 +384,11 @@ public void Dispose()
383384
File.Delete(Path.Combine(_testProjectPath, PropsFileName));
384385
}
385386
}
387+
[CollectionDefinition("DeterministicBuild Collection", DisableParallelization = true)]
388+
public class DeterministicBuildCollection
389+
{
390+
// This class has no code, and is never created.
391+
// Its purpose is to be the place to apply [CollectionDefinition] and all the
392+
// ICollectionFixture<> interfaces.
393+
}
386394
}

0 commit comments

Comments
 (0)