Browse Source

Merge pull request #3507 from icsharpcode/christophwille/net10mtp

.NET 10 MTP dotnet test
pull/3511/head
Christoph Wille 2 weeks ago committed by GitHub
parent
commit
3fd30711ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      .github/workflows/build-ilspy.yml
  2. 1
      .gitignore
  3. 4
      Directory.Build.props
  4. 4
      Directory.Packages.props
  5. 7
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  6. 4
      ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
  7. 11
      ILSpy.Tests/ILSpy.Tests.csproj
  8. 2
      dotnet.config

10
.github/workflows/build-ilspy.yml

@ -63,24 +63,20 @@ jobs:
run: msbuild ILSpy.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=$env:BuildPlatform /m run: msbuild ILSpy.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=$env:BuildPlatform /m
- name: Execute unit tests - name: Execute unit tests
run: dotnet test --logger "trx;LogFileName=${{ matrix.configuration }}.trx" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3 run: dotnet test --solution ilspy.sln --configuration ${{ matrix.configuration }} --no-build --report-trx --results-directory test-results/${{ matrix.configuration }}
env:
Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll
Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net10.0-windows\ILSpy.Tests.dll
Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll
- name: Upload Test Logs - name: Upload Test Logs
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: success() || failure() if: success() || failure()
with: with:
name: test-results-${{ matrix.configuration }} name: test-results-${{ matrix.configuration }}
path: 'test-results/${{ matrix.configuration }}.trx' path: 'test-results/${{ matrix.configuration }}/*.trx'
- name: Create Test Report - name: Create Test Report
uses: icsharpcode/test-summary-action@dist uses: icsharpcode/test-summary-action@dist
if: always() if: always()
with: with:
paths: "test-results/${{ matrix.configuration }}.trx" paths: "test-results/${{ matrix.configuration }}/*.trx"
folded: true folded: true
- name: Format check - name: Format check

1
.gitignore vendored

@ -21,3 +21,4 @@ ILSpy.Installer/wix/
/ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.cs /ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.cs
*/.vscode/ */.vscode/
DecompilerTests.config.json DecompilerTests.config.json
*.trx

4
Directory.Build.props

@ -2,4 +2,8 @@
<PropertyGroup> <PropertyGroup>
<WarningsAsErrors>IDE2000</WarningsAsErrors> <WarningsAsErrors>IDE2000</WarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<EnableNUnitRunner>true</EnableNUnitRunner>
</PropertyGroup>
</Project> </Project>

4
Directory.Packages.props

@ -11,7 +11,6 @@
<PackageVersion Include="Dirkster.AvalonDock.Themes.VS2013" Version="4.72.1" /> <PackageVersion Include="Dirkster.AvalonDock.Themes.VS2013" Version="4.72.1" />
<PackageVersion Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="10.0.0-preview.4.25213.101" /> <PackageVersion Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="10.0.0-preview.4.25213.101" />
<PackageVersion Include="Iced" Version="1.21.0" /> <PackageVersion Include="Iced" Version="1.21.0" />
<PackageVersion Include="JunitXml.TestLogger" Version="6.1.0" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" /> <PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" /> <PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageVersion Include="McMaster.Extensions.Hosting.CommandLine" Version="4.1.1" /> <PackageVersion Include="McMaster.Extensions.Hosting.CommandLine" Version="4.1.1" />
@ -29,12 +28,13 @@
<PackageVersion Include="Microsoft.NETCore.ILDAsm" Version="9.0.4" /> <PackageVersion Include="Microsoft.NETCore.ILDAsm" Version="9.0.4" />
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.1.0" /> <PackageVersion Include="Microsoft.Sbom.Targets" Version="3.1.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" /> <PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="1.7.3" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" /> <PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageVersion Include="Mono.Cecil" Version="0.11.6" /> <PackageVersion Include="Mono.Cecil" Version="0.11.6" />
<PackageVersion Include="NSubstitute" Version="5.3.0" /> <PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" /> <PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
<PackageVersion Include="NUnit" Version="4.3.2" /> <PackageVersion Include="NUnit" Version="4.3.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" /> <PackageVersion Include="NUnit3TestAdapter" Version="5.1.0-alpha.3" />
<PackageVersion Include="NuGet.Protocol" Version="6.13.2" /> <PackageVersion Include="NuGet.Protocol" Version="6.13.2" />
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" /> <PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
<PackageVersion Include="Shouldly" Version="4.3.0" /> <PackageVersion Include="Shouldly" Version="4.3.0" />

7
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -13,7 +13,10 @@
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier> <RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject>
<GenerateTestingPlatformEntryPoint>true</GenerateTestingPlatformEntryPoint>
<StartupObject>ICSharpCode.Decompiler.Tests.MicrosoftTestingPlatformEntryPoint</StartupObject>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@ -69,7 +72,7 @@
</PackageReference> </PackageReference>
<PackageReference Include="NUnit" /> <PackageReference Include="NUnit" />
<PackageReference Include="Shouldly" /> <PackageReference Include="Shouldly" />
<PackageReference Include="JunitXml.TestLogger" /> <PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
<PackageReference Include="Microsoft.NET.Test.Sdk" /> <PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="System.Memory" /> <PackageReference Include="System.Memory" />
<PackageReference Include="Mono.Cecil" /> <PackageReference Include="Mono.Cecil" />

4
ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj

@ -12,7 +12,7 @@
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier> <RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject> <OutputType>Exe</OutputType>
<EnableDefaultItems>false</EnableDefaultItems> <EnableDefaultItems>false</EnableDefaultItems>
<UseWpf>true</UseWpf> <UseWpf>true</UseWpf>
@ -40,7 +40,7 @@
<PackageReference Include="NUnit" /> <PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" /> <PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Shouldly" /> <PackageReference Include="Shouldly" />
<PackageReference Include="JunitXml.TestLogger" /> <PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
<PackageReference Include="coverlet.collector"> <PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

11
ILSpy.Tests/ILSpy.Tests.csproj

@ -1,10 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsWindowsX64 Condition="$([MSBuild]::IsOsPlatform('Windows')) And $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) == X64">true</IsWindowsX64>
<IsWindowsARM64 Condition="$([MSBuild]::IsOsPlatform('Windows')) And $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) == ARM64">true</IsWindowsARM64>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework> <TargetFramework>net10.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject> <RuntimeIdentifier Condition="$(IsWindowsX64) == true">win-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@ -75,7 +82,7 @@
</PackageReference> </PackageReference>
<PackageReference Include="NUnit" /> <PackageReference Include="NUnit" />
<PackageReference Include="Shouldly" /> <PackageReference Include="Shouldly" />
<PackageReference Include="JunitXml.TestLogger" /> <PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
dotnet.config

@ -0,0 +1,2 @@
[dotnet.test.runner]
name = "Microsoft.Testing.Platform"
Loading…
Cancel
Save