Skip to content

Conversation

@grendello
Copy link
Contributor

NOTE: should be merged after #10585

@grendello grendello changed the title Enable more tests to run on all 3 runtimes, part 5 Enable more tests to run on all 3 runtimes, part 6 Nov 20, 2025
@grendello grendello force-pushed the dev/grendel/test-runtimes-6 branch from 71c0fc0 to 4d78971 Compare November 21, 2025 11:19
@grendello grendello marked this pull request as ready for review November 21, 2025 15:52
@grendello
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello grendello force-pushed the dev/grendel/test-runtimes-6 branch 2 times, most recently from 81a53cd to 79bbe97 Compare November 26, 2025 08:15
@grendello
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello
Copy link
Contributor Author

/azp run

@grendello
Copy link
Contributor Author

Please CI deities, make it not time out this time?

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppers
Copy link
Member

I think SuccessfulBuildFew(NativeAOT) fails because it has warnings (AOT warnings) and then $(TreatWarningsAsErrors)=true in this test.

@grendello
Copy link
Contributor Author

I think SuccessfulBuildFew(NativeAOT) fails because it has warnings (AOT warnings) and then $(TreatWarningsAsErrors)=true in this test.

The odd thing is that this test doesn't fail locally:

[TESTLOG] Test SuccessfulBuildFewNativeAOT Starting
bin/Debug/dotnet/dotnet build bin/TestDebug/temp/CodeBehind/SuccessfulBuildFewNativeAOT/Debug/project/CodeBehindBuildTests.NET.csproj /t:SignAndroidPackage /noconsolelogger "/flp1:LogFile=bin/TestDebug/temp/CodeBehind/SuccessfulBuildFewNativeAOT/Debug/project/CodeBehindBuildTests.NET.SuccessfulBuildFewNativeAOT.log;Encoding=UTF-8;Verbosity=detailed" -nodeReuse:false @"bin/TestDebug/temp/CodeBehind/SuccessfulBuildFewNativeAOT/Debug/project/project.rsp"
Found Time Elapsed 00:00:31.0800000
[TESTLOG] Test SuccessfulBuildFewNativeAOT Complete
[TESTLOG] Test SuccessfulBuildFewNativeAOT Outcome=Passed

@grendello
Copy link
Contributor Author

And this is the reason why, it's Directory.Build.props from CI:

  <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>

@grendello grendello force-pushed the dev/grendel/test-runtimes-6 branch from 79bbe97 to d2166b8 Compare December 2, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants