dotnet / dotnet/runtime

Android test host doesn't match behavior of shipping host

Open
#121,040 3 comments 0 reactions 0 assignees View on GitHub
area-Host os-android
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

The android tests in this repo use a custom java host to run the tests. The host is responsible for setup such as setting the `AppContext.BaseDirectory`, and the process working directory.

Because this host is different than the one used in the product, we aren't testing what we're shipping. Many of our tests rely on the behavior of `AppContext.BaseDirectory` and the working directory, and pass with our custom host. But this hides product issues like https://github.com/dotnet/android/issues/3489 that only happen with the shipping host.

For example, maybe it's possible to consume LKG bits from dotnet/android and use those to generate a test host instead. Or maybe there's a way to move ownership of the android host into dotnet/runtime (but I fear that would bring in a lot of java interop tooling). Not the expert here, so I wanted to raise this in case someone has a better idea.

I noticed this while standing up native AOT tests for android. For now I'm getting the native AOT tests passing with the existing approach (custom host logic).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.