Skip to content

[infra][Apple] Fix Apple mobile runtime test reporting #114862

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,55 @@ jobs:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

#
# MacCatalyst interp - requires AOT Compilation and Interp flags
# Build the whole product using Mono and run runtime tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
platforms:
- maccatalyst_x64
- maccatalyst_arm64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ]
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: pr/dotnet/runtime/$(Build.SourceBranch)
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_RuntimeTests
buildArgs: -s mono+libs -c $(_BuildConfig)
timeoutInMinutes: 240
# extra steps, run tests
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
parameters:
testGroup: innerloop
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
testBuildArgs: /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true
compileOnHelix: true
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

#
# MacCatalyst interp - requires AOT Compilation and Interp flags
# Build the whole product using Mono and run libraries tests
Expand Down
1 change: 1 addition & 0 deletions src/mono/msbuild/apple/build/AppleBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<_ProcessRuntimeComponentsForLibraryMode Condition="'$(_IsLibraryMode)' == 'true' and '$(UseNativeAOTRuntime)' != 'true'">_ProcessRuntimeComponentsForLibraryMode</_ProcessRuntimeComponentsForLibraryMode>
<EnableDefaultAssembliesToBundle Condition="'$(EnableDefaultAssembliesToBundle)' == ''">false</EnableDefaultAssembliesToBundle>
<UseSystemZlib Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'android' or '$(TargetArchitecture)' == 'armv6'">true</UseSystemZlib>
<UseMonoRuntime Condition="'$(RuntimeFlavor)' == 'mono'">true</UseMonoRuntime>
</PropertyGroup>

<UsingTask Condition="'$(AppleGenerateAppBundle)' == 'true'"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Common/XHarnessRunnerLibrary/RunnerEntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public AppleEntryPoint(
protected override bool IsXunit => true;
protected override TestRunner GetTestRunner(LogWriter logWriter)
{
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionTable, writeBase64TestResults: true);
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionTable, writeBase64TestResults: false);
if (_methodNameToRun is not null)
{
runner.SkipMethod(_methodNameToRun, isExcluded: false);
Expand Down
2 changes: 0 additions & 2 deletions src/tests/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

<!-- Merged test runner assemblies might not have any non-generated sources, and that's okay -->
<NoWarn Condition="'$(IsMergedTestRunnerAssembly)' == 'true'">$(NoWarn);CS2008</NoWarn>

<IncludesTestRunner Condition="'$(TargetsAppleMobile)' == 'true'">false</IncludesTestRunner>
</PropertyGroup>

<!-- All CLRTests need to be of a certain "kind". These kinds are enumerated below.
Expand Down
11 changes: 8 additions & 3 deletions src/tests/JIT/Directed/coverage/compiler/FilterToHandler.il
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
.ver 4:0:0:0
}
.assembly extern xunit.core {}
.assembly extern Microsoft.DotNet.XUnitExtensions { .publickeytoken = (31 BF 38 56 AD 36 4E 35 ) }
.assembly extern TestLibrary { .ver 0:0:0:0 }
.assembly extern mscorlib {}
.assembly extern common {}
.assembly 'FilterToHandler' {}
Expand Down Expand Up @@ -57,9 +59,12 @@ done2:

.class public auto ansi FilterToHandler {
.method public static int32 Main() {
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = {}
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {
string('https://github.com/dotnet/runtime/issues/114902')
type([TestLibrary]TestLibrary.PlatformDetection)
string[1] ('IsAppleMobile')
}
.entrypoint
.maxstack 20
.try
Expand Down
2 changes: 2 additions & 0 deletions src/tests/JIT/Regression/JitBlue/GitHub_21990/GitHub_21990.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.Runtime.CompilerServices;
using Xunit;
using TestLibrary;

// Test to stress FP-relative addressing of generics context slot on ARM64. "str" instruction has a 32760 byte offset limit.
// And normally, the frame pointer is at the bottom of the frame and the stored generics context at the top. If the locals
Expand Down Expand Up @@ -573,6 +574,7 @@ public static int TestGenericContext<T>(int x)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/46622", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile))]
public static int TestEntryPoint()
{
const int Pass = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/tests/JIT/Regression/JitBlue/GitHub_23791/GitHub_23791.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.Runtime.CompilerServices;
using Xunit;
using TestLibrary;

// The jit should null check 'this' in NextElement

Expand All @@ -16,6 +17,7 @@ public unsafe struct GitHub_23791
byte NextElement(int i) => A[1+i];

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/114908", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile))]
public static int TestEntryPoint()
{
int result = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>
</Project>
11 changes: 8 additions & 3 deletions src/tests/JIT/Regression/JitBlue/GitHub_27678/GitHub_27678.il
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
.assembly extern System.Diagnostics.Debug {}
.assembly GitHub_27678 {}
.assembly extern xunit.core {}
.assembly extern Microsoft.DotNet.XUnitExtensions { .publickeytoken = (31 BF 38 56 AD 36 4E 35 ) }
.assembly extern TestLibrary { .ver 0:0:0:0 }

.class private sequential ansi sealed beforefieldinit AStruct
extends [System.Runtime]System.ValueType
Expand Down Expand Up @@ -167,9 +169,12 @@

.method public hidebysig static int32 Main() cil managed
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = {}
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {
string('https://github.com/dotnet/runtime/issues/114908')
type([TestLibrary]TestLibrary.PlatformDetection)
string[1] ('IsAppleMobile')
}
.entrypoint
// Code size 62 (0x3e)
.maxstack 3
Expand Down
11 changes: 8 additions & 3 deletions src/tests/JIT/Regression/JitBlue/GitHub_35384/GitHub_35384.il
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
.assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) }
.assembly GitHub_35384 {}
.assembly extern xunit.core {}
.assembly extern Microsoft.DotNet.XUnitExtensions { .publickeytoken = (31 BF 38 56 AD 36 4E 35 ) }
.assembly extern TestLibrary { .ver 0:0:0:0 }

.class private sequential ansi sealed beforefieldinit Struct
extends [System.Runtime]System.ValueType
Expand Down Expand Up @@ -40,9 +42,12 @@

.method public hidebysig static int32 Main() cil managed
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = {}
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {
string('https://github.com/dotnet/runtime/issues/114908')
type([TestLibrary]TestLibrary.PlatformDetection)
string[1] ('IsAppleMobile')
}
.entrypoint
.maxstack 1
call string Program::ValueTypeExplicitThisInstanceMethodCalli()
Expand Down
2 changes: 2 additions & 0 deletions src/tests/JIT/Regression/JitBlue/GitHub_4044/GitHub_4044.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
using System;
using System.Runtime.CompilerServices;
using Xunit;
using TestLibrary;

public class C
{
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/114908", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile))]
public static int TestEntryPoint()
{
int error = Test1();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/tests/JIT/opt/Structs/MemsetMemcpyNullref.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
using System;
using System.Runtime.CompilerServices;
using Xunit;
using TestLibrary;

public unsafe class MemsetMemcpyNullref
{
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/98628", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile))]
public static void MemsetMemcpyThrowNullRefonNull()
{
Assert.Throws<NullReferenceException>(() => MemoryInit(null));
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/opt/Structs/MemsetMemcpyNullref.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions src/tests/managed/Managed.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- disable building for mono until https://github.com/dotnet/xharness/pull/1416 is merged -->
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'mono' and '$(TargetsWindows)' != 'true'">true</DisableProjectBuild>
</PropertyGroup>

<ItemGroup>
<MergedWrapperProjectReference Include="*/**/*.??proj" />
</ItemGroup>
Expand Down
Loading