Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Microsoft.TestPlatform.ObjectModel/Architecture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ public enum Architecture
S390x,
Ppc64le,
RiscV64,
LoongArch64,
}
Original file line number Diff line number Diff line change
Expand Up @@ -975,3 +975,4 @@ Microsoft.VisualStudio.TestPlatform.ObjectModel.RunConfiguration.CaptureStandard
Microsoft.VisualStudio.TestPlatform.ObjectModel.RunConfiguration.ForwardStandardOutput.get -> bool
Microsoft.VisualStudio.TestPlatform.ObjectModel.RunConfiguration.DisableSharedTestHost.get -> bool
Microsoft.VisualStudio.TestPlatform.ObjectModel.RunConfiguration.SkipDefaultAdapters.get -> bool
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.LoongArch64 = 9 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ public enum PlatformArchitecture
S390x,
Ppc64le,
RiscV64,
LoongArch64,
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.PlatformAssemblyResolver.Dispose(bool disposing) -> void
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.RiscV64 = 6 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.LoongArch64 = 7 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public PlatformArchitecture Architecture
// preview 6 or later, so use the numerical value for now.
// case System.Runtime.InteropServices.Architecture.S390x:
(Architecture)5 => PlatformArchitecture.S390x,
(Architecture)6 => PlatformArchitecture.LoongArch64,
(Architecture)8 => PlatformArchitecture.Ppc64le,
(Architecture)9 => PlatformArchitecture.RiscV64,
_ => throw new NotSupportedException(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public PlatformArchitecture GetCurrentProcessArchitecture()
// preview 6 or later, so use the numerical value for now.
// case System.Runtime.InteropServices.Architecture.S390x:
(Architecture)5 => PlatformArchitecture.S390x,
(Architecture)6 => PlatformArchitecture.LoongArch64,
(Architecture)8 => PlatformArchitecture.Ppc64le,
(Architecture)9 => PlatformArchitecture.RiscV64,
_ => throw new NotSupportedException(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ private static string GetTestHostName(Architecture architecture, Framework targe
PlatformArchitecture.S390x => Architecture.S390x,
PlatformArchitecture.Ppc64le => Architecture.Ppc64le,
PlatformArchitecture.RiscV64 => Architecture.RiscV64,
PlatformArchitecture.LoongArch64 => Architecture.LoongArch64,
_ => throw new NotSupportedException(),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,8 @@ PlatformArchitecture TranslateToPlatformArchitecture(Architecture targetArchitec
return PlatformArchitecture.Ppc64le;
case Architecture.RiscV64:
return PlatformArchitecture.RiscV64;
case Architecture.LoongArch64:
return PlatformArchitecture.LoongArch64;
case Architecture.AnyCPU:
case Architecture.Default:
default:
Expand All @@ -667,6 +669,7 @@ static bool IsSameArchitecture(Architecture targetArchitecture, PlatformArchitec
Architecture.S390x => platformAchitecture == PlatformArchitecture.S390x,
Architecture.Ppc64le => platformAchitecture == PlatformArchitecture.Ppc64le,
Architecture.RiscV64 => platformAchitecture == PlatformArchitecture.RiscV64,
Architecture.LoongArch64 => platformAchitecture == PlatformArchitecture.LoongArch64,
_ => throw new TestPlatformException($"Invalid target architecture '{targetArchitecture}'"),
};

Expand Down
2 changes: 2 additions & 0 deletions src/vstest.console/TestPlatformHelpers/TestRequestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,8 @@ static Architecture TranslateToArchitecture(PlatformArchitecture targetArchitect
return Architecture.Ppc64le;
case PlatformArchitecture.RiscV64:
return Architecture.RiscV64;
case PlatformArchitecture.LoongArch64:
return Architecture.LoongArch64;
default:
EqtTrace.Error($"TestRequestManager.TranslateToArchitecture: Unhandled architecture '{targetArchitecture}'.");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void InitializeShouldThrowIfArgumentIsNotAnArchitecture()
{
ExceptionUtilities.ThrowsException<CommandLineException>(
() => _executor.Initialize("foo"),
"Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le, RiscV64.",
"Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le, RiscV64, LoongArch64.",
"foo");
}

Expand All @@ -94,7 +94,7 @@ public void InitializeShouldThrowIfArgumentIsNotASupportedArchitecture()
{
ExceptionUtilities.ThrowsException<CommandLineException>(
() => _executor.Initialize("AnyCPU"),
"Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le, RiscV64.",
"Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le, RiscV64, LoongArch64.",
"AnyCPU");
}

Expand Down
Loading