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