Skip to content

Commit 1d0e7bf

Browse files
authored
Merge pull request #403 from 0xced/restore-parallel-tests
Restore parallel tests execution
2 parents 15abae9 + 75cbe35 commit 1d0e7bf

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,3 @@ FakesAssemblies/
201201
project.lock.json
202202

203203
artifacts/
204-
/test/TestApp-*

Build.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ if($LASTEXITCODE -ne 0) { throw 'pack failed' }
3030

3131
Write-Output "build: Testing"
3232

33-
& dotnet test test\Serilog.Settings.Configuration.Tests\Serilog.Settings.Configuration.Tests.csproj
33+
# Dotnet test doesn't run separate TargetFrameworks in parallel: https://github.com/dotnet/sdk/issues/19147
34+
# Workaround: use `dotnet test` on dlls directly in order to pass the `--parallel` option to vstest.
35+
# The _reported_ runtime is wrong but the _actual_ used runtime is correct, see https://github.com/microsoft/vstest/issues/2037#issuecomment-720549173
36+
& dotnet test test\Serilog.Settings.Configuration.Tests\bin\Release\*\Serilog.Settings.Configuration.Tests.dll --parallel
3437

35-
if($LASTEXITCODE -ne 0) { throw 'unit tests failed' }
38+
if($LASTEXITCODE -ne 0) { throw 'unit tests failed' }

global.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"sdk": {
3-
"version": "8.0.100"
3+
"version": "8.0.100",
4+
"allowPrerelease": false,
5+
"rollForward": "latestFeature"
46
}
57
}

test/Serilog.Settings.Configuration.Tests/Serilog.Settings.Configuration.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net48</TargetFrameworks>
55
<TargetFrameworks>$(TargetFrameworks);net6.0;net7.0;net8.0</TargetFrameworks>
6+
<DeterministicSourcePaths>false</DeterministicSourcePaths>
67
</PropertyGroup>
78

89
<ItemGroup>

0 commit comments

Comments
 (0)