Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ppc64le processor architecture #4028

Merged
merged 4 commits into from
Sep 30, 2022
Merged
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
3 changes: 2 additions & 1 deletion src/Microsoft.TestPlatform.ObjectModel/Architecture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public enum Architecture
ARM,
AnyCPU,
ARM64,
S390x
S390x,
Ppc64le
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM = 3 -> Microsof
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.Default = 0 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.S390x = 6 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.Ppc64le = 7 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.X64 = 2 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.X86 = 1 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public enum PlatformArchitecture
ARM,
ARM64,
S390x,
Ppc64le,
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.ARM = 2 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.ARM64 = 3 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.S390x = 4 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.Ppc64le = 5 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.X64 = 1 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture.X86 = 0 -> Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture
Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformAssemblyExtensions
Expand Down
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)8 => PlatformArchitecture.Ppc64le,
_ => 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)8 => PlatformArchitecture.Ppc64le,
_ => throw new NotSupportedException(),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ private static string GetTestHostName(Architecture architecture, Framework targe
PlatformArchitecture.ARM => Architecture.ARM,
PlatformArchitecture.ARM64 => Architecture.ARM64,
PlatformArchitecture.S390x => Architecture.S390x,
PlatformArchitecture.Ppc64le => Architecture.Ppc64le,
_ => throw new NotSupportedException(),
};

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 @@ -841,6 +841,8 @@ static Architecture TranslateToArchitecture(PlatformArchitecture targetArchitect
return Architecture.ARM64;
case PlatformArchitecture.S390x:
return Architecture.S390x;
case PlatformArchitecture.Ppc64le:
return Architecture.Ppc64le;
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.",
"Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le.",
"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.",
"Invalid platform type: {0}. Valid platform types are X86, X64, ARM, ARM64, S390x, Ppc64le.",
"AnyCPU");
}

Expand Down