diff --git a/src/Microsoft.TestPlatform.ObjectModel/Architecture.cs b/src/Microsoft.TestPlatform.ObjectModel/Architecture.cs index f3d59e7ae4..278c9c6b97 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Architecture.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Architecture.cs @@ -12,5 +12,6 @@ public enum Architecture AnyCPU, ARM64, S390x, - Ppc64le + Ppc64le, + RiscV64, } diff --git a/src/Microsoft.TestPlatform.ObjectModel/PublicAPI/PublicAPI.Shipped.txt b/src/Microsoft.TestPlatform.ObjectModel/PublicAPI/PublicAPI.Shipped.txt index 9268eb55ad..803c09d86c 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/PublicAPI/PublicAPI.Shipped.txt +++ b/src/Microsoft.TestPlatform.ObjectModel/PublicAPI/PublicAPI.Shipped.txt @@ -971,3 +971,4 @@ virtual Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject.Properties.ge virtual Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject.ProtectedGetPropertyValue(Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty! property, object? defaultValue) -> object? virtual Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject.ProtectedSetPropertyValue(Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty! property, object? value) -> void virtual Microsoft.VisualStudio.TestPlatform.ObjectModel.ValidateValueCallback.Invoke(object? value) -> bool +Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.RiscV64 = 8 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/PlatformArchitecture.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/PlatformArchitecture.cs index 907ec721dd..9c656677de 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/PlatformArchitecture.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/PlatformArchitecture.cs @@ -14,4 +14,5 @@ public enum PlatformArchitecture ARM64, S390x, Ppc64le, + RiscV64, } diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/PublicAPI/PublicAPI.Shipped.txt b/src/Microsoft.TestPlatform.PlatformAbstractions/PublicAPI/PublicAPI.Shipped.txt index e6a482d21c..60e7d5e4a9 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/PublicAPI/PublicAPI.Shipped.txt +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/PublicAPI/PublicAPI.Shipped.txt @@ -121,3 +121,4 @@ static Microsoft.VisualStudio.TestPlatform.ObjectModel.PlatformEqtTrace.ErrorOnI static Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformAssemblyExtensions.GetAssemblyLocation(this System.Reflection.Assembly! assembly) -> string! virtual Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventHandler.Invoke(object? sender, Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces.AssemblyResolveEventArgs? args) -> System.Reflection.Assembly? virtual Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformAssemblyResolver.Dispose(bool disposing) -> void +Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.RiscV64 = 6 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs index f2163db898..31f5fde389 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs @@ -29,6 +29,7 @@ public PlatformArchitecture Architecture // case System.Runtime.InteropServices.Architecture.S390x: (Architecture)5 => PlatformArchitecture.S390x, (Architecture)8 => PlatformArchitecture.Ppc64le, + (Architecture)9 => PlatformArchitecture.RiscV64, _ => throw new NotSupportedException(), }; } diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs index d2d048e355..24c07fa5ed 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs @@ -42,6 +42,7 @@ public PlatformArchitecture GetCurrentProcessArchitecture() // case System.Runtime.InteropServices.Architecture.S390x: (Architecture)5 => PlatformArchitecture.S390x, (Architecture)8 => PlatformArchitecture.Ppc64le, + (Architecture)9 => PlatformArchitecture.RiscV64, _ => throw new NotSupportedException(), }; } diff --git a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DefaultTestHostManager.cs b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DefaultTestHostManager.cs index 6b42aa4caa..b51f84a48e 100644 --- a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DefaultTestHostManager.cs +++ b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DefaultTestHostManager.cs @@ -290,6 +290,7 @@ private static string GetTestHostName(Architecture architecture, Framework targe PlatformArchitecture.ARM64 => Architecture.ARM64, PlatformArchitecture.S390x => Architecture.S390x, PlatformArchitecture.Ppc64le => Architecture.Ppc64le, + PlatformArchitecture.RiscV64 => Architecture.RiscV64, _ => throw new NotSupportedException(), }; diff --git a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs index 02dad4370a..3a82b6a7bc 100644 --- a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs +++ b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs @@ -548,6 +548,8 @@ PlatformArchitecture TranslateToPlatformArchitecture(Architecture targetArchitec return PlatformArchitecture.S390x; case Architecture.Ppc64le: return PlatformArchitecture.Ppc64le; + case Architecture.RiscV64: + return PlatformArchitecture.RiscV64; case Architecture.AnyCPU: case Architecture.Default: default: @@ -566,6 +568,7 @@ static bool IsSameArchitecture(Architecture targetArchitecture, PlatformArchitec Architecture.ARM64 => platformAchitecture == PlatformArchitecture.ARM64, Architecture.S390x => platformAchitecture == PlatformArchitecture.S390x, Architecture.Ppc64le => platformAchitecture == PlatformArchitecture.Ppc64le, + Architecture.RiscV64 => platformAchitecture == PlatformArchitecture.RiscV64, _ => throw new TestPlatformException($"Invalid target architecture '{targetArchitecture}'"), }; diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index 33d3e4d1dd..d76f1cfd23 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -848,6 +848,8 @@ static Architecture TranslateToArchitecture(PlatformArchitecture targetArchitect return Architecture.S390x; case PlatformArchitecture.Ppc64le: return Architecture.Ppc64le; + case PlatformArchitecture.RiscV64: + return Architecture.RiscV64; default: EqtTrace.Error($"TestRequestManager.TranslateToArchitecture: Unhandled architecture '{targetArchitecture}'."); break; diff --git a/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs index b452b48408..a0119490ac 100644 --- a/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs @@ -85,7 +85,7 @@ public void InitializeShouldThrowIfArgumentIsNotAnArchitecture() { ExceptionUtilities.ThrowsException( () => _executor.Initialize("foo"), - "Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le.", + "Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le, RiscV64.", "foo"); } @@ -94,7 +94,7 @@ public void InitializeShouldThrowIfArgumentIsNotASupportedArchitecture() { ExceptionUtilities.ThrowsException( () => _executor.Initialize("AnyCPU"), - "Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le.", + "Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le, RiscV64.", "AnyCPU"); }