Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3bf76d6
Add more native AOT on android ci test coverage
sbomer Oct 14, 2025
432572c
Remove --cross argument, fix and disable some libs tests
sbomer Oct 14, 2025
214d1f9
Remove --cross argument, fix and disable some libs tests
sbomer Oct 14, 2025
a9eeff0
Set runtimeFlavor to coreclr
sbomer Oct 14, 2025
5253ab2
Parameterize runtimeFlavor in Android job definitions
sbomer Oct 14, 2025
9d8577b
Remove runtimeFlavor: coreclr from Android emulator pipeline
sbomer Oct 14, 2025
fef0415
Fix typo in runtimeFlavor parameter name
sbomer Oct 15, 2025
c509f51
Add 'nativeaot' arg to testBuildArgs for Android emulator
sbomer Oct 15, 2025
4cbbff5
Increase timeout to 180
sbomer Oct 15, 2025
c1292f1
Refactor Android NDK compiler selection for test builds
sbomer Oct 15, 2025
dfbf8ea
Increase timeout to 240
sbomer Oct 16, 2025
b8abeba
Pass RuntimeFlavor to AndroidAppBuilderTask
sbomer Oct 16, 2025
cc1d5c3
Check TestBuildMode instead
sbomer Oct 16, 2025
2b7f252
Fix a few test failures
sbomer Oct 21, 2025
1ee5f13
Set Environment.CurrentDirectory to app files directory
sbomer Oct 21, 2025
cce4d9a
Exclude tests failing due to missing calli marshalling support
sbomer Oct 21, 2025
e6338fb
Exclude tests failing due to missing crypto shim export
sbomer Oct 21, 2025
5c723f5
Enable building smoke tests as apks
sbomer Oct 23, 2025
d0d7bc3
Fix smoke test build for android
sbomer Oct 26, 2025
eec6deb
Disable directory apk build for smoke tests
sbomer Oct 27, 2025
4ed06ec
Try using merged test runners
sbomer Oct 27, 2025
cbcca7d
Revert "Try using merged test runners"
sbomer Oct 27, 2025
37b7b4e
Add Merged marker for smoke tests
sbomer Oct 27, 2025
9e89dda
Try merged wrappers again
sbomer Oct 28, 2025
3a266b8
Revert "Add Merged marker for smoke tests"
sbomer Oct 28, 2025
a0c0cd6
Fix some issues with non-standalone build
sbomer Oct 28, 2025
55b18f5
Remove buildAllTestsAsStandalone
sbomer Oct 28, 2025
8e60575
Set expected exit code
sbomer Oct 28, 2025
9f6e630
Remove redundant import
sbomer Oct 28, 2025
d4d4ad3
Fix mono test build
sbomer Oct 28, 2025
92eb56d
Set exit code as metadata for helix
sbomer Oct 28, 2025
7d7322b
Write ExpectedExitCode.txt
sbomer Oct 28, 2025
66edced
Remove condition on monodroid-nativeaot.cs
sbomer Oct 29, 2025
d5e5497
Disable some failing tests
sbomer Oct 30, 2025
dce1301
Use __managed__Main, move suppession to common targets
sbomer Oct 31, 2025
64ec45a
Merge remote-tracking branch 'origin/main' into naot-android-coverage
sbomer Oct 31, 2025
18b1964
Clean up disabled tests
sbomer Oct 31, 2025
d0edc55
Revert SmokeTest entry point code changes
sbomer Oct 31, 2025
52b22d5
Skip/enable some more tests
sbomer Oct 31, 2025
aabde97
Fix non-android build, disable test
sbomer Oct 31, 2025
d08f20b
Re-enable passing tests
sbomer Oct 31, 2025
6ea7cb9
PR feedback
sbomer Nov 3, 2025
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
10 changes: 5 additions & 5 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: android
jobParameters:
runtimeFlavor: mono
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
Expand All @@ -593,7 +593,7 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: android_docker
jobParameters:
runtimeFlavor: mono
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
Expand All @@ -613,7 +613,7 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: android
jobParameters:
runtimeFlavor: mono
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
Expand All @@ -633,7 +633,7 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: android
jobParameters:
runtimeFlavor: mono
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
Expand All @@ -653,7 +653,7 @@ jobs:
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
container: android
jobParameters:
runtimeFlavor: mono
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
testGroup: innerloop
nameSuffix: NativeAOT
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:UseNativeAOTRuntime=true /p:RuntimeFlavor=coreclr /p:TestNativeAOT=true
buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:UseNativeAOTRuntime=true /p:RuntimeFlavor=coreclr /p:TestNativeAOT=true
timeoutInMinutes: 120
# extra steps, run tests
postBuildSteps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,46 @@ jobs:
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml


#
# Build the whole product using NativeAOT 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: coreclr
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isAndroidEmulatorOnlyBuild: ${{ parameters.isAndroidEmulatorOnlyBuild }}
platforms:
- android_x64
variables:
- ${{ 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_NativeAOT_RuntimeTests
buildArgs: -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
testBuildArgs: nativeaot tree nativeaot/SmokeTests /p:BuildNativeAOTRuntimePack=true
testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Android emulators
# Build the whole product using Mono and run libraries tests
Expand Down Expand Up @@ -174,8 +214,8 @@ jobs:
testGroup: innerloop
nameSuffix: NativeAOT
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:UseNativeAOTRuntime=true /p:RuntimeFlavor=coreclr /p:TestNativeAOT=true
timeoutInMinutes: 120
buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:UseNativeAOTRuntime=true /p:RuntimeFlavor=coreclr /p:TestNativeAOT=true
timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
Expand Down
8 changes: 8 additions & 0 deletions eng/testing/Android/AndroidNdkCompiler.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<PropertyGroup Condition="'$(TargetOS)' == 'android'">
<NdkToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux-x86_64</NdkToolchainPrebuiltOS>
<NdkToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">darwin-x86_64</NdkToolchainPrebuiltOS>
<NdkToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('Windows'))">windows-x86_64</NdkToolchainPrebuiltOS>
<CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">$(ANDROID_NDK_ROOT)\toolchains\llvm\prebuilt\$(NdkToolchainPrebuiltOS)\bin\clang</CppCompilerAndLinker>
</PropertyGroup>
</Project>
8 changes: 7 additions & 1 deletion eng/testing/tests.android.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@
<BundleTestAndroidAppDependsOn>AndroidBuild</BundleTestAndroidAppDependsOn>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(IsFunctionalTest)' != 'true'">
<PropertyGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(ReferenceXUnitWrapperGenerator)' != 'false'">
<DefineConstants>$(DefineConstants);SINGLE_FILE_TEST_RUNNER</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TestBuildMode)' == 'nativeaot'">
<TestNativeAOT Condition="'$(TestNativeAOT)' == ''">true</TestNativeAOT>
<UseNativeAOTRuntime Condition="'$(UseNativeAOTRuntime)' == ''">true</UseNativeAOTRuntime>
</PropertyGroup>

<ItemGroup Condition="'$(TestNativeAOT)' == 'true'">
<Compile Include="$(RepoTasksDir)AndroidAppBuilder\Templates\monodroid-nativeaot.cs" />
</ItemGroup>
<PropertyGroup Condition="'$(TestNativeAOT)' == 'true'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<_UseNativeLibPrefix>true</_UseNativeLibPrefix>
<_SuppressNativeLibEventSourceWarning>true</_SuppressNativeLibEventSourceWarning>
</PropertyGroup>

<!-- Target that kicks off the whole test build and run flow -->
Expand Down
6 changes: 3 additions & 3 deletions eng/testing/tests.singlefile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<SelfContained>true</SelfContained>
</PropertyGroup>

<PropertyGroup Condition="('$(PublishSingleFile)' == 'true' or '$(TestNativeAot)' == 'true') and '$(IsFunctionalTest)' != 'true'">
<PropertyGroup Condition="('$(PublishSingleFile)' == 'true' or '$(TestNativeAot)' == 'true') and '$(ReferenceXUnitWrapperGenerator)' != 'false'">
<DefineConstants>$(DefineConstants);SINGLE_FILE_TEST_RUNNER</DefineConstants>
</PropertyGroup>

Expand All @@ -44,13 +44,13 @@

<ItemGroup Condition="'$(TestNativeAot)' == 'true'">
<RdXmlFile Include="$(MSBuildThisFileDirectory)default.rd.xml" />
<TrimmerRootAssembly Include="TestUtilities" />
<TrimmerRootAssembly Include="TestUtilities" Condition="'$(SkipTestUtilitiesReference)' != 'true'" />
</ItemGroup>

<ItemGroup>
<Compile Include="$(CommonTestPath)SingleFileTestRunner\SingleFileTestRunner.cs"
Link="Common\SingleFileTestRunner\SingleFileTestRunner.cs"
Condition="'$(IsFunctionalTest)' != 'true'" />
Condition="'$(ReferenceXUnitWrapperGenerator)' != 'false'" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class DependencyContextLoaderTests
{
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetEntryAssembly() returns null")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/121209", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsAndroid))]
public void LoadLoadsExtraPaths()
{
string appDepsPath = "appPath.deps.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private static string EnsureTrailingSlash(string path)
{
return path + Path.DirectorySeparatorChar;
}

return path;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void ExportedTypes(Type type, bool expected)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/121209", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsAndroid))]
public void GetEntryAssembly()
{
Assert.NotNull(Assembly.GetEntryAssembly());
Expand Down
15 changes: 15 additions & 0 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,21 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetOS)' == 'android' and '$(TestNativeAOT)' == 'true'">
<!-- https://github.com/dotnet/runtime/issues/120725 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Formats.Tar\tests\System.Formats.Tar.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.Compression.ZipFile\tests\System.IO.Compression.ZipFile.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.FileSystem.Watcher\tests\System.IO.FileSystem.Watcher.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.MemoryMappedFiles\tests\System.IO.MemoryMappedFiles.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Mail\tests\Unit\System.Net.Mail.Unit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Ping\tests\FunctionalTests\System.Net.Ping.Functional.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Security\tests\UnitTests\System.Net.Security.Unit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.IO.FileSystem.Tests\DisabledFileLockingTests\System.IO.FileSystem.DisabledFileLocking.Tests.csproj" />

<!-- https://github.com/dotnet/runtime/issues/120959 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Requests\tests\System.Net.Requests.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />

<SmokeTestProject Include="$(RepoRoot)src\tests\FunctionalTests\Android\Device_Emulator\NativeAOT\*.Test.csproj"/>
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Globalization.Tests\System.Globalization.Tests.csproj" />
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Security.Cryptography\tests\System.Security.Cryptography.Tests.csproj" />
Expand Down
3 changes: 1 addition & 2 deletions src/mono/msbuild/android/build/AndroidBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<NdkToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux-x86_64</NdkToolchainPrebuiltOS>
<NdkToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">darwin-x86_64</NdkToolchainPrebuiltOS>
<NdkToolchainPrebuiltOS Condition="'$(HostOS)' == 'windows'">windows-x86_64</NdkToolchainPrebuiltOS>
<CppCompilerAndLinker>$(ANDROID_NDK_ROOT)\toolchains\llvm\prebuilt\$(NdkToolchainPrebuiltOS)\bin\clang</CppCompilerAndLinker>

<AndroidBuildAfterThisTarget Condition="'$(AndroidBuildAfterThisTarget)' == ''">Publish</AndroidBuildAfterThisTarget>

<AndroidBuildDependsOn Condition="'$(UseMonoRuntime)' == 'true'">
Expand Down Expand Up @@ -51,6 +49,7 @@
<!-- When building on Helix $(_CommonTargetsDir) will be properly set, otherwise we have to set it to a in-tree location -->
<_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common'))</_CommonTargetsDir>
</PropertyGroup>
<Import Project="$(RepoRoot)/eng/testing/Android/AndroidNdkCompiler.props" />

<Import Condition="'$(UseNativeAOTRuntime)' != 'true' and '$(UseMonoRuntime)' == 'true'" Project="$(_CommonTargetsDir)CommonMobileBuild.props" />
<Import Condition="'$(UseNativeAOTRuntime)' != 'true' and '$(UseMonoRuntime)' == 'true'" Project="$(_CommonTargetsDir)RuntimeComponentManifest.targets" />
Expand Down
45 changes: 38 additions & 7 deletions src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,21 @@ public static int InitRuntime(JNIEnv* env, JObject thiz, JString j_files_dir, JS
// The NativeAOT runtime does not need to be initialized, but the crypto library does.
JavaVM* javaVM = env->GetJavaVM();
AndroidCryptoNative_InitLibraryOnLoad(javaVM, null);

var filesDir = env->GetStringUTFChars(j_files_dir) ?? string.Empty;
AppContext.SetData("APP_CONTEXT_BASE_DIRECTORY", filesDir);
Environment.CurrentDirectory = filesDir;
return 0;
}

[LibraryImport("System.Security.Cryptography.Native.Android")]
internal static partial int AndroidCryptoNative_InitLibraryOnLoad(JavaVM* vm, void* reserved);

#if !SINGLE_FILE_TEST_RUNNER
[DllImport("*", EntryPoint = "__managed__Main")]
static extern int ManagedMain(int argc, void** argv);
#endif

// int Java_net_dot_MonoRunner_execEntryPoint (JNIEnv* env, jobject thiz, jstring j_entryPointLibName, jobjectArray j_args);
[UnmanagedCallersOnly(EntryPoint = "Java_net_dot_MonoRunner_execEntryPoint", CallConvs = [typeof(CallConvCdecl)])]
public static int ExecEntryPoint(JNIEnv* env, JObject thiz, JString j_entryPointLibName, JObjectArray j_args)
Expand All @@ -54,20 +63,42 @@ public static int ExecEntryPoint(JNIEnv* env, JObject thiz, JString j_entryPoint
for (int i = 0; i < argc; i++)
{
JObject j_arg = env->GetObjectArrayElement(j_args, i);
args[i] = env->GetStringUTFChars((JString)j_arg);
args[i] = env->GetStringUTFChars((JString)j_arg)!;
}

#if SINGLE_FILE_TEST_RUNNER
string excludesFile = Path.Combine(Environment.GetEnvironmentVariable("HOME"), "xunit-excludes.txt");
if (File.Exists(excludesFile))
if (Environment.GetEnvironmentVariable("HOME") is string homeDir)
{
args = args.Concat(File.ReadAllLines(excludesFile).SelectMany(trait => new string[]{"-notrait", trait})).ToArray();
string excludesFile = Path.Combine(homeDir, "xunit-excludes.txt");
if (File.Exists(excludesFile))
{
args = args.Concat(File.ReadAllLines(excludesFile).SelectMany(trait => new string[]{"-notrait", trait})).ToArray();
}
}
// SingleFile unit tests
return SingleFileTestRunner.Main(args);
#else
// Functional tests
return Program.Main(args);
string entryPointName = env->GetStringUTFChars(j_entryPointLibName);
IntPtr[] managedMainArgs = new IntPtr[argc + 1];
managedMainArgs[0] = Marshal.StringToCoTaskMemUTF8(entryPointName);
for (int i = 0; i < argc; i++)
{
managedMainArgs[i + 1] = Marshal.StringToCoTaskMemUTF8(args[i]);
}

int ret;
fixed (IntPtr* argvPtrs = managedMainArgs)
{
void** argv = (void**)argvPtrs;
ret = ManagedMain(argc + 1, argv);
}

for (int i = 0; i < managedMainArgs.Length; i++)
{
Marshal.FreeCoTaskMem(managedMainArgs[i]);
}

return ret;
#endif
}

Expand All @@ -93,7 +124,7 @@ internal unsafe struct JNIEnv
if (chars is null)
return null;

string result = Marshal.PtrToStringUTF8((nint)chars);
string result = Marshal.PtrToStringUTF8((nint)chars)!;
if (isCopy != 0)
NativeInterface->ReleaseStringUTFChars(thisptr, str, chars);

Expand Down
10 changes: 8 additions & 2 deletions src/tests/Common/helixpublishwitharcade.proj
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,14 @@
<_MergedPayloadGroups Include="$(_MergedWrapperName)">
<ApkPackageName>$(_MergedApkName)</ApkPackageName>
</_MergedPayloadGroups>
<_MergedPayloadFiles Include="@(_MergedPayloadGroups->'$(_MergedWrapperDirectory)AppBundle/bin/%(ApkPackageName).apk')" />
<_MergedPayloadApkFiles Include="@(_MergedPayloadGroups->'$(_MergedWrapperDirectory)AppBundle/bin/%(ApkPackageName).apk')" />
<_MergedPayloadFiles Include="@(_MergedPayloadApkFiles)" />
<_MergedPayloadFiles Include="$(_MergedWrapperDirectory)ExpectedExitCode.txt" Condition="Exists('$(_MergedWrapperDirectory)ExpectedExitCode.txt')" />
</ItemGroup>

<Copy SourceFiles="@(_MergedPayloadFiles)" DestinationFiles="@(_MergedPayloadFiles->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileName)%(Extension)')" />
<PatchExclusionListInApks
ApkPaths="@(_MergedPayloadFiles->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileName)%(Extension)')"
ApkPaths="@(_MergedPayloadApkFiles->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileName)%(Extension)')"
ExcludedTests="@(FilteredTestExclusionList)" />
</Target>

Expand Down Expand Up @@ -1007,6 +1009,10 @@
<TestTimeout Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</TestTimeout>
</XHarnessApkToTest>

<XHarnessApkToTest Update="@(XHarnessApkToTest)" Condition="'$(TargetsAndroid)' == 'true'">
<ExpectedExitCode Condition="Exists('%(PayloadDirectory)/ExpectedExitCode.txt')">$([System.IO.File]::ReadAllText('%(PayloadDirectory)/ExpectedExitCode.txt').Trim())</ExpectedExitCode>
</XHarnessApkToTest>

<XHarnessAppBundleToTest Include="@(LegacyPayloads->Metadata('PayloadZipFile'))" Condition="'$(TargetsAppleMobile)' == 'true'">
<TestTarget>$(AppleTestTarget)</TestTarget>
<TestTimeout Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</TestTimeout>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Common/mergedrunner.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
<Error Text="@(_ProjectReferencesRemovedDueToConflictResolution->'This project has an assembly name identical to another project, if this CoreCLRTestLibrary, you should reference %24(TestLibraryProjectPath) instead of constructing the path yourself: %(FullPath)', '&#010;')" Condition="'@(_ProjectReferencesRemovedDueToConflictResolution)' != ''" />
</Target>

<Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true'" />
<Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true' and '$(CLRTestKind)' != 'SharedLibrary'" />
</Project>
Loading
Loading