|
|
c51fa4 |
From 7ea33be2e1949d9c63ff58b59deb5b1a84105aae Mon Sep 17 00:00:00 2001
|
|
|
c51fa4 |
From: Giridhar Trivedi <giridhar.trivedi@ibm.com>
|
|
|
c51fa4 |
Date: Wed, 12 Oct 2022 14:14:40 +0200
|
|
|
c51fa4 |
Subject: [PATCH] Fix Invalid target architecture 'S390x' error
|
|
|
c51fa4 |
|
|
|
c51fa4 |
In commit 3ae5c4aef823 ("Add support for s390x processor architecture")
|
|
|
c51fa4 |
support for S390x architecture was provided for .NET6. This is broken
|
|
|
c51fa4 |
in .NET7. Add missing case statements to fix this for S390x and also
|
|
|
c51fa4 |
Power architectures.
|
|
|
c51fa4 |
---
|
|
|
c51fa4 |
.../Hosting/DotnetTestHostManager.cs | 6 ++++++
|
|
|
c51fa4 |
1 file changed, 6 insertions(+)
|
|
|
c51fa4 |
|
|
|
c51fa4 |
diff --git a/src/vstest/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs b/src/vstest/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
|
|
|
c51fa4 |
index b4fa53776f..deadfcb684 100644
|
|
|
c51fa4 |
--- a/src/vstest/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
|
|
|
c51fa4 |
+++ b/src/vstest/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
|
|
|
c51fa4 |
@@ -536,6 +536,10 @@ PlatformArchitecture TranslateToPlatformArchitecture(Architecture targetArchitec
|
|
|
c51fa4 |
return PlatformArchitecture.ARM;
|
|
|
c51fa4 |
case Architecture.ARM64:
|
|
|
c51fa4 |
return PlatformArchitecture.ARM64;
|
|
|
c51fa4 |
+ case Architecture.S390x:
|
|
|
c51fa4 |
+ return PlatformArchitecture.S390x;
|
|
|
c51fa4 |
+ case Architecture.Ppc64le:
|
|
|
c51fa4 |
+ return PlatformArchitecture.Ppc64le;
|
|
|
c51fa4 |
case Architecture.AnyCPU:
|
|
|
c51fa4 |
case Architecture.Default:
|
|
|
c51fa4 |
default:
|
|
|
c51fa4 |
@@ -552,6 +556,8 @@ static bool IsSameArchitecture(Architecture targetArchitecture, PlatformArchitec
|
|
|
c51fa4 |
Architecture.X64 => platformAchitecture == PlatformArchitecture.X64,
|
|
|
c51fa4 |
Architecture.ARM => platformAchitecture == PlatformArchitecture.ARM,
|
|
|
c51fa4 |
Architecture.ARM64 => platformAchitecture == PlatformArchitecture.ARM64,
|
|
|
c51fa4 |
+ Architecture.S390x => platformAchitecture == PlatformArchitecture.S390x,
|
|
|
c51fa4 |
+ Architecture.Ppc64le => platformAchitecture == PlatformArchitecture.Ppc64le,
|
|
|
c51fa4 |
_ => throw new TestPlatformException($"Invalid target architecture '{targetArchitecture}'"),
|
|
|
c51fa4 |
};
|
|
|
c51fa4 |
|