-
Notifications
You must be signed in to change notification settings - Fork 565
Enable more tests to run on all 3 runtimes, part 6 #10595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
71c0fc0 to
4d78971
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
81a53cd to
79bbe97
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Please CI deities, make it not time out this time? |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I think |
The odd thing is that this test doesn't fail locally: |
|
And this is the reason why, it's <PropertyGroup>
<!--
Use $(TreatWarningsAsErrors) for CI builds. We have grandfathered some projects that have existing warnings,
but we would like to go ahead and prevent any other projects from getting new warnings.
This can be opted into locally with $(_AndroidTreatWarningsAsErrors) = true.
-->
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'jnienv-gen.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'Mono.Android.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'Mono.Android.NET-Tests.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'MSBuildDeviceIntegration.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'NativeAOT.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'TestRunner.Core.NET.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'Xamarin.Android.Build.Tests.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'Xamarin.Android.JcwGen-Tests.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'Xamarin.Android.NUnitLite.NET.csproj' ">true</_AllowProjectWarnings>
<_AllowProjectWarnings Condition=" '$(MSBuildProjectFile)' == 'Xamarin.ProjectTools.csproj' ">true</_AllowProjectWarnings>
<TreatWarningsAsErrors Condition=" ('$(RunningOnCI)' == 'true' OR '$(_AndroidTreatWarningsAsErrors)' == 'true') AND '$(_AllowProjectWarnings)' != 'true' ">true</TreatWarningsAsErrors>
</PropertyGroup> |
0f1fb8a to
8ec7d61
Compare
024cc4e to
74d6990
Compare
74d6990 to
4e8003c
Compare
5768795 to
058b806
Compare
058b806 to
2562ea9
Compare
NOTE: should be merged after #10585
Summary
This pull request enhances the test coverage and flexibility of the Xamarin.Android build tests by parameterizing tests to run across different Android runtimes and refactoring the way build properties are handled for NativeAOT scenarios. The changes ensure that tests are more robust and adaptable to future runtime changes, and they improve warning management—especially for CI environments.
Test Parameterization and Runtime Handling
AssetPackTests.csandCodeBehindTests.csto use the[Values]attribute for bothisReleaseandAndroidRuntime runtimeparameters, enabling comprehensive testing across all runtime configurations.IgnoreUnsupportedConfiguration, preventing test failures on invalid configurations.Build Properties and Warning Management
GetBuildPropertiesto dynamically construct theNoWarnproperty, including additional IL and XA warnings when running NativeAOT tests on CI, improving test reliability and output clarity.Test Infrastructure Improvements
TestProjectInfoclass to track the selected runtime and test root directory, supporting better test isolation and reporting.runtimeparameter through all test helpers and runners.These changes collectively make the test suite more maintainable and future-proof, especially as new runtimes or build scenarios are introduced.