microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
898 stars 323 forks source link

Support RISC-V64 architecture #4837

Closed ww898 closed 9 months ago

ww898 commented 9 months ago

Hi, I got follwing exception trying to run dotnet test for RISC-V64:

Unhandled exception. System.NotSupportedException: Specified method is not supported.
   at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.ProcessHelper.GetCurrentProcessArchitecture() in /_/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs:line 45
   at Microsoft.VisualStudio.TestPlatform.CommandLine.Executor.PrintSplashScreen(Boolean isDiag, String[] args) in /_/src/vstest.console/CommandLine/Executor.cs:line 449
   at Microsoft.VisualStudio.TestPlatform.CommandLine.Executor.Execute(String[] args) in /_/src/vstest.console/CommandLine/Executor.cs:line 134
   at Microsoft.VisualStudio.TestPlatform.CommandLine.Program.Run(String[] args, UiLanguageOverride uiLanguageOverride) in /_/src/vstest.console/Program.cs:line 31
   at Microsoft.VisualStudio.TestPlatform.CommandLine.Program.Main(String[] args) in /_/src/vstest.console/Program.cs:line 22

I see that RISC-V64 is not even declared: https://github.com/microsoft/vstest/blob/58a1f6b114170b612224731442a8245845dad722/src/Microsoft.TestPlatform.ObjectModel/Architecture.cs#L6-L16

https://github.com/microsoft/vstest/blob/58a1f6b114170b612224731442a8245845dad722/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs#L32-L47

Hardware: StarFive VisionFive 2 OS: Unintu 23.10 (see https://ubuntu.com/download/risc-v) .NET SDK: 8.0.1(see https://github.com/dkurt/dotnet_riscv/releases)

$ dotnet --info
.NET SDK:
 Version:           8.0.101
 Commit:            6eceda187b
 Workload version:  8.0.100-manifests.69afb982

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  23.10
 OS Platform: Linux
 RID:         linux-riscv64
 Base Path:   /usr/local/dotnet/sdk/8.0.101/

.NET workloads installed:
 Workload version: 8.0.100-manifests.69afb982
There are no installed workloads to display.

Host:
  Version:      8.0.1
  Architecture: riscv64
  Commit:       bf5e279d92

.NET SDKs installed:
  8.0.101 [/usr/local/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.1 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.1 [/usr/local/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
nohwnd commented 9 months ago

This was inserted into net9 sdk, but insertion into net8 sdk is blocked on https://github.com/dotnet/sdk/pull/37983.