Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Jan 10, 2023

Create a .NET version of Xamarin.Android.JcwGen-Tests. It currently isn't possible to multi-target our test projects, so this creates a copy and uses $(AndroidJavaSource) to simplify the test suite by eliminating the Xamarin.Android.McwGen-Tests project and its custom MSBuild logic. This new version uses the more descriptive Xamarin.Android.BindingRuntime_Tests project name.

This ports 34 of the 41 tests in JcwGen-Tests. The remaining tests require additional projects to be ported to .NET to run successfully or require additional custom MSBuild logic from JcwGen to be ported.

Additionally, stop running this suite on Classic test agents in main.

We are choosing to not prioritize the remaining tests at this point and committing what we already have.

The unported tests are tracked in #7794.

@jpobst jpobst force-pushed the jcwgen-net branch 2 times, most recently from 8c90367 to ae11f04 Compare January 10, 2023 21:58
@jpobst jpobst mentioned this pull request Feb 13, 2023
4 tasks
@dotnet dotnet deleted a comment from azure-pipelines bot Feb 16, 2023
@jpobst jpobst marked this pull request as ready for review February 16, 2023 23:18
@jonpryor
Copy link
Contributor

The addition of tests/BindingTests/Xamarin.Android.BindingRuntime-Tests/Jars/org.jetbrains.kotlin.kotlin-stdlib.jar seems odd to me; why don't we instead reference the Xamarin.Kotlin.Stdlib NuGet package?

@jpobst jpobst force-pushed the jcwgen-net branch 2 times, most recently from 1bd3d6f to c10d515 Compare February 22, 2023 22:07
@dotnet dotnet deleted a comment from azure-pipelines bot Feb 27, 2023
@jonpryor
Copy link
Contributor

jonpryor commented Mar 3, 2023

Context: https://github.com/xamarin/xamarin-android/issues/7794

Create a .NET version of
`tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests`.  It currently
isn't possible to multi-target our test projects, so instead create a
copy and use `@(AndroidJavaSource)` to simplify the test suite by
eliminating the `Xamarin.Android.McwGen-Tests` project and its custom
MSBuild logic.

This new version uses the more descriptive
`Xamarin.Android.BindingRuntime_Tests` project name.

This ports 34 of the 41 tests in `Xamarin.Android.JcwGen-Tests`.
The remaining tests require additional projects to be ported to .NET
to run successfully or require additional custom MSBuild logic from
`Xamarin.Android.JcwGen-Tests` to be ported.

Additionally, stop running this suite on Classic test agents on `main`.

We are choosing to not prioritize the remaining tests at this point
and committing what we already have.

The unported tests are tracked in #7794.

Copy link
Member

@pjcollins pjcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thought -- rather than creating a copy of all of the Java sources used by the tests, should we instead link to the files that already exist in the other test directory (for example https://github.com/xamarin/xamarin-android/tree/main/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/java/com/xamarin/android)? I'm assuming the java sources are unchanged and could be shared?

If so, should we do the same for the test files as well? We could wrap any test changes or ignored tests in a #if NET6_0_OR_GREATER if we wanted to use the same files to help preserve git history.

@jpobst
Copy link
Contributor Author

jpobst commented Mar 6, 2023

Honestly, we could just remove the old files and they would show up as moved files. This PR created a copy because it was originally done before we started removing Classic from main.

# Conflicts:
#	build-tools/automation/azure-pipelines.yaml
@jpobst jpobst marked this pull request as draft April 11, 2023 19:30
@jpobst
Copy link
Contributor Author

jpobst commented Apr 12, 2023

Replaced with #7949.

@jpobst jpobst closed this Apr 12, 2023
@jpobst jpobst deleted the jcwgen-net branch April 12, 2023 15:00
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants