Skip to content

Commit 60d59f7

Browse files
committed
Migrate from VSTest to MTP
1 parent 120aff2 commit 60d59f7

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

.github/workflows/dotnet.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,37 +98,37 @@ jobs:
9898

9999
# DirectX 12 unit tests
100100
- name: Run ComputeSharp.Tests
101-
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release /p:Platform=x64 -v n -l "console;verbosity=detailed"
101+
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release /p:Platform=x64 -v n -- --output detailed
102102
- name: Run ComputeSharp.Tests.DisableDynamicCompilation
103-
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release /p:Platform=x64 -v n -l "console;verbosity=detailed"
103+
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release /p:Platform=x64 -v n -- --output detailed
104104
- name: Run ComputeSharp.Tests.GlobalStatements
105-
run: dotnet run --project tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release /p:Platform=x64 -v n -l "console;verbosity=detailed"
105+
run: dotnet run --project tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release /p:Platform=x64 -v n -- --output detailed
106106
- name: Run ComputeSharp.Tests.Internals
107-
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release /p:Platform=x64 -v n -l "console;verbosity=detailed"
107+
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release /p:Platform=x64 -v n -- --output detailed
108108

109109
# Run the source generator tests as well (even though they're not really runtime specific)
110110
- name: Run ComputeSharp.Tests.SourceGenerators
111-
run: dotnet test tests\ComputeSharp.Tests.SourceGenerators\ComputeSharp.Tests.SourceGenerators.csproj -v n -l "console;verbosity=detailed"
111+
run: dotnet test tests\ComputeSharp.Tests.SourceGenerators\ComputeSharp.Tests.SourceGenerators.csproj -v n -- --output detailed
112112

113113
# DirectX 12 device lost unit tests.
114114
# These tests are run one class at a time to ensure there's no accidental conflicts between any of them. This is because
115115
# the code paths being tested in this project are heavily dependent on process-wide mutable state (ie. DirectX 12 devices).
116116
- name: Run ComputeSharp.Tests.DeviceLost "DeviceDisposal"
117-
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release -v n -l "console;verbosity=detailed"
117+
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release -v n -- --output detailed
118118
- name: Run ComputeSharp.Tests.DeviceLost "DeviceLost"
119-
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release -v n -l "console;verbosity=detailed"
119+
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release -v n -- --output detailed
120120
- name: Run ComputeSharp.Tests.DeviceLost "GetDefaultDevice"
121-
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release -v n -l "console;verbosity=detailed"
121+
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release -v n -- --output detailed
122122

123123
# D2D1 unit tests
124124
- name: Run ComputeSharp.D2D1.Tests
125-
run: dotnet test tests\ComputeSharp.D2D1.Tests\ComputeSharp.D2D1.Tests.csproj -c Release -v n -l "console;verbosity=detailed"
125+
run: dotnet test tests\ComputeSharp.D2D1.Tests\ComputeSharp.D2D1.Tests.csproj -c Release -v n -- --output detailed
126126
- name: Run ComputeSharp.D2D1.Tests.AssemblyLevelAttributes
127-
run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -v n -l "console;verbosity=detailed"
127+
run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -v n -- --output detailed
128128

129129
# Run the D2D1 source generators tests as well
130130
- name: Run ComputeSharp.D2D1.Tests.SourceGenerators
131-
run: dotnet test tests\ComputeSharp.D2D1.Tests.SourceGenerators\ComputeSharp.D2D1.Tests.SourceGenerators.csproj -v n -l "console;verbosity=detailed"
131+
run: dotnet test tests\ComputeSharp.D2D1.Tests.SourceGenerators\ComputeSharp.D2D1.Tests.SourceGenerators.csproj -v n -- --output detailed
132132

133133
# Run all unit tests using D3D12MA
134134
run-tests-d3d12ma:
@@ -142,13 +142,13 @@ jobs:
142142

143143
# D3D12MA tests (main ComputeSharp tests, as well as the device lost ones)
144144
- name: Run ComputeSharp.Tests
145-
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release /p:Platform=x64 /p:UseD3D12MemoryAllocator=true -v n -l "console;verbosity=detailed"
145+
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release /p:Platform=x64 /p:UseD3D12MemoryAllocator=true -v n -- --output detailed
146146
- name: Run ComputeSharp.Tests.DeviceLost "DeviceDisposal"
147-
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release /p:UseD3D12MemoryAllocator=true -v n -l "console;verbosity=detailed"
147+
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release /p:UseD3D12MemoryAllocator=true -v n -- --output detailed
148148
- name: Run ComputeSharp.Tests.DeviceLost "DeviceLost"
149-
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release /p:UseD3D12MemoryAllocator=true -v n -l "console;verbosity=detailed"
149+
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release /p:UseD3D12MemoryAllocator=true -v n -- --output detailed
150150
- name: Run ComputeSharp.Tests.DeviceLost "GetDefaultDevice"
151-
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release /p:UseD3D12MemoryAllocator=true -v n -l "console;verbosity=detailed"
151+
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release /p:UseD3D12MemoryAllocator=true -v n -- --output detailed
152152

153153
# Run all Win2D tests (separately, as they need VS Test)
154154
run-tests-win2d:
@@ -387,7 +387,7 @@ jobs:
387387
# This is used to ensure the native dependencies can always be loaded correctly
388388
# regardless of whether the app is shipping with R2R, self-contained, etc.
389389
- name: Run ComputeSharp.Tests.NativeLibrariesResolver
390-
run: dotnet test tests\ComputeSharp.Tests.NativeLibrariesResolver\ComputeSharp.Tests.NativeLibrariesResolver.csproj -v n -l "console;verbosity=detailed"
390+
run: dotnet test tests\ComputeSharp.Tests.NativeLibrariesResolver\ComputeSharp.Tests.NativeLibrariesResolver.csproj -v n -- --output detailed
391391

392392
# Also run the NativeAOT publishing tests
393393
- name: Publish and run ComputeSharp.NuGet with NativeAOT

tests/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@
1717

1818
<!-- See notes in .props file in the sample projects directory -->
1919
<NoWarn>$(NoWarn);WMC1006</NoWarn>
20+
21+
<EnableMSTestRunner>true</EnableMSTestRunner>
22+
<TestingPlatformDotNetTestSupport>true</TestingPlatformDotNetTestSupport>
23+
<TestingPlatformCaptureOutput>false</TestingPlatformCaptureOutput>
24+
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
2025
</PropertyGroup>
2126
</Project>

0 commit comments

Comments
 (0)