Skip to content

Commit 79bbe97

Browse files
committed
EnvironmentContentTests.CheckForInvalidHttpClientHandlerType works
1 parent 9b5d100 commit 79bbe97

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/EnvironmentContentTests.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,14 @@ public void CheckForInvalidHttpClientHandlerType ([Values] AndroidRuntime runtim
181181
}
182182

183183
[Test]
184-
public void CheckHttpClientHandlerType ([Values (AndroidRuntime.MonoVM, AndroidRuntime.CoreCLR)] AndroidRuntime runtime)
184+
public void CheckHttpClientHandlerType ([Values] AndroidRuntime runtime)
185185
{
186+
bool isRelease = runtime == AndroidRuntime.NativeAOT;
187+
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
188+
return;
189+
}
186190
var proj = new XamarinAndroidApplicationProject () {
187-
IsRelease = true,
191+
IsRelease = isRelease,
188192
};
189193
var httpClientHandlerVarName = "XA_HTTP_CLIENT_HANDLER_TYPE";
190194
var expectedDefaultValue = "System.Net.Http.SocketsHttpHandler, System.Net.Http";
@@ -193,6 +197,7 @@ public void CheckHttpClientHandlerType ([Values (AndroidRuntime.MonoVM, AndroidR
193197
string supportedAbis = runtime switch {
194198
AndroidRuntime.MonoVM => "armeabi-v7a;arm64-v8a",
195199
AndroidRuntime.CoreCLR => "arm64-v8a;x86_64",
200+
AndroidRuntime.NativeAOT => "arm64-v8a;x86_64",
196201
_ => throw new NotSupportedException ($"Unsupported runtime '{runtime}'")
197202
};
198203
proj.SetRuntime (runtime);

0 commit comments

Comments
 (0)