diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 7aa0b109b2a635..cd622a6b607eff 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml index 3a01170b624758..97aedc2be52ecd 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml @@ -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: diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml index 4f0c526aff1d38..e93a51a4cea1ed 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml @@ -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 @@ -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 diff --git a/eng/testing/Android/AndroidNdkCompiler.props b/eng/testing/Android/AndroidNdkCompiler.props new file mode 100644 index 00000000000000..250e0ea05f7bf1 --- /dev/null +++ b/eng/testing/Android/AndroidNdkCompiler.props @@ -0,0 +1,8 @@ + + + linux-x86_64 + darwin-x86_64 + windows-x86_64 + $(ANDROID_NDK_ROOT)\toolchains\llvm\prebuilt\$(NdkToolchainPrebuiltOS)\bin\clang + + diff --git a/eng/testing/tests.android.targets b/eng/testing/tests.android.targets index 1cc807a1e6c96d..2624ccc1c02e8e 100644 --- a/eng/testing/tests.android.targets +++ b/eng/testing/tests.android.targets @@ -12,16 +12,22 @@ AndroidBuild - + $(DefineConstants);SINGLE_FILE_TEST_RUNNER + + true + true + + true <_UseNativeLibPrefix>true + <_SuppressNativeLibEventSourceWarning>true diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index 709467b7aad17d..9a3f6175b37b8f 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -32,7 +32,7 @@ true - + $(DefineConstants);SINGLE_FILE_TEST_RUNNER @@ -44,13 +44,13 @@ - + + Condition="'$(CLRTestKind)' == '' and '$(IsFunctionalTest)' != 'true'" /> diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs index 71f7a3f7e23caa..848e0a5ae27f38 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs @@ -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"; diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostApplicationBuilderTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostApplicationBuilderTests.cs index f923221fdb7b6e..05069772ea6554 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostApplicationBuilderTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostApplicationBuilderTests.cs @@ -400,7 +400,7 @@ private static string EnsureTrailingSlash(string path) { return path + Path.DirectorySeparatorChar; } - + return path; } diff --git a/src/libraries/System.Runtime/tests/System.Reflection.Tests/AssemblyTests.cs b/src/libraries/System.Runtime/tests/System.Reflection.Tests/AssemblyTests.cs index f3bd40bff2b862..5f8e098624b15d 100644 --- a/src/libraries/System.Runtime/tests/System.Reflection.Tests/AssemblyTests.cs +++ b/src/libraries/System.Runtime/tests/System.Reflection.Tests/AssemblyTests.cs @@ -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()); diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 4e1ebbba26b793..2fe61112a5171c 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -607,6 +607,21 @@ + + + + + + + + + + + + + + + diff --git a/src/mono/msbuild/android/build/AndroidBuild.props b/src/mono/msbuild/android/build/AndroidBuild.props index 6abfd8adfba125..ec3cd4c5a7c4f3 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.props +++ b/src/mono/msbuild/android/build/AndroidBuild.props @@ -20,8 +20,6 @@ linux-x86_64 darwin-x86_64 windows-x86_64 - $(ANDROID_NDK_ROOT)\toolchains\llvm\prebuilt\$(NdkToolchainPrebuiltOS)\bin\clang - Publish @@ -51,6 +49,7 @@ <_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common')) + diff --git a/src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs b/src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs index 8e7ca31bf6cdfe..963c1bef392caa 100644 --- a/src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs +++ b/src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs @@ -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) @@ -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 } @@ -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); diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 2d896fe0342d47..fa4ecc1faf92e4 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -490,12 +490,14 @@ <_MergedPayloadGroups Include="$(_MergedWrapperName)"> $(_MergedApkName) - <_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')" /> @@ -1007,6 +1009,10 @@ $([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes))) + + $([System.IO.File]::ReadAllText('%(PayloadDirectory)/ExpectedExitCode.txt').Trim()) + + $(AppleTestTarget) $([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes))) diff --git a/src/tests/Common/mergedrunner.targets b/src/tests/Common/mergedrunner.targets index 72ae7aeef1f190..50fc1ee151a6b0 100644 --- a/src/tests/Common/mergedrunner.targets +++ b/src/tests/Common/mergedrunner.targets @@ -18,5 +18,5 @@ - + diff --git a/src/tests/Common/mergedrunnermobile.targets b/src/tests/Common/mergedrunnermobile.targets index 187120666f49f8..2ae7a095d9fbbf 100644 --- a/src/tests/Common/mergedrunnermobile.targets +++ b/src/tests/Common/mergedrunnermobile.targets @@ -2,7 +2,7 @@ true - $(AssemblyName).dll + $(AssemblyName).dll $(AssemblyName).dll GeneratedRunner @@ -39,6 +39,16 @@ Lines="" Overwrite="true" WriteOnlyWhenDifferent="true" /> + + + <_ExpectedExitCodeFile Include="$(IntermediateOutputPath)/ExpectedExitCode.txt" /> + + + diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index cbef36e272f40c..1822cbe9f31195 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -215,7 +215,7 @@ false - + true true true @@ -235,6 +235,21 @@ true + + shared + true + + + + + + false + + true + true + 100 + + diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 7ab3c7304398b9..e2f97f7f0c5f94 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -12,6 +12,7 @@ true + true Exe BuildAndRun @@ -420,7 +421,7 @@ - + MergedTestAssembly @@ -456,7 +457,7 @@ - true + true diff --git a/src/tests/build.proj b/src/tests/build.proj index ca195bf8041862..b27f831cc4fc9c 100644 --- a/src/tests/build.proj +++ b/src/tests/build.proj @@ -1,5 +1,6 @@ + @@ -260,7 +261,15 @@ SourceFiles="@(TestTargetingPathLibs)" DestinationFolder="$(BuildDir)" /> + + + <_RuntimeFlavor>Mono + <_RuntimeFlavor Condition="'$(UseMonoRuntime)' == 'false' and '$(TestBuildMode)' != 'nativeaot'">CoreCLR + <_RuntimeFlavor Condition="'$(TestBuildMode)' == 'nativeaot'">nativeaot + + $(GroupBuildCmd) "/p:DevTeamProvisioning=-" $(GroupBuildCmd) /bl:$(ArtifactsDir)/log/$(Configuration)/InnerManagedTestBuild.$(__TestGroupToBuild).binlog $(GroupBuildCmd) "/p:CrossBuild=true" + $(GroupBuildCmd) "/p:CppCompilerAndLinker=$(CppCompilerAndLinker)" $(GroupBuildCmd) "/p:DefaultBuildAllTarget=BuildNativeAot" $(GroupBuildCmd) "/p:IlcMultiModule=true" $(GroupBuildCmd) "/p:IlcUseServerGc=false" @@ -570,7 +580,7 @@ + Condition="'$(__BuildTestWrappersOnly)' != '1' and '$(__GenerateLayoutOnly)' != '1' and '$(__CopyNativeTestBinaries)' != '1' and $(RunWithAndroid) and '$(TestBuildMode)' != 'nativeaot'" /> 0 true - true + true true false diff --git a/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs b/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs index 3fac6aa67daf8f..338cfb2c4cc960 100644 --- a/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs +++ b/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs @@ -26,9 +26,14 @@ public BringUpTest() public static int Main() { - // This test also doubles as server GC test - if (!System.Runtime.GCSettings.IsServerGC) - return 42; + if (!OperatingSystem.IsAndroid()) + { + // Disabled on Android due to https://github.com/dotnet/runtime/issues/121353 + + // This test also doubles as server GC test + if (!System.Runtime.GCSettings.IsServerGC) + return 42; + } if (string.Empty.Length > 0) { @@ -163,9 +168,17 @@ public static int Main() TestUnwindInFunclet(); - throw new Exception("UnhandledException"); + if (!OperatingSystem.IsAndroid()) + { + // Environment.Exit doesn't propagate to MonoRunner.java + throw new Exception("UnhandledException"); - return Fail; + return Fail; + } + else + { + return Pass; + } } static void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e) diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs index 2c82ac22950674..a48638260279bd 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs @@ -14,23 +14,27 @@ static int Main() s_success = true; #if !DEBUG - Console.WriteLine("****************************************************"); - Console.WriteLine("* Size test *"); - long fileSize = new System.IO.FileInfo(Environment.ProcessPath).Length; - Console.WriteLine($"* Size of the executable is {fileSize / 1024,7:n0} kB *"); - Console.WriteLine("****************************************************"); - - long lowerBound, upperBound; - lowerBound = 1090 * 1024; // ~1.09 MB - upperBound = 1500 * 1024; // ~1.5 MB - - if (fileSize < lowerBound || fileSize > upperBound) + if (!OperatingSystem.IsAndroid()) { - Console.WriteLine($"BUG: File size is not in the expected range ({lowerBound} to {upperBound} bytes). Did a libraries change regress size of Hello World?"); - return 1; - } + // Environment.ProcessPath is app_process64 on Android + Console.WriteLine("****************************************************"); + Console.WriteLine("* Size test *"); + long fileSize = new System.IO.FileInfo(Environment.ProcessPath).Length; + Console.WriteLine($"* Size of the executable is {fileSize / 1024,7:n0} kB *"); + Console.WriteLine("****************************************************"); + + long lowerBound, upperBound; + lowerBound = 1090 * 1024; // ~1.09 MB + upperBound = 1500 * 1024; // ~1.5 MB + + if (fileSize < lowerBound || fileSize > upperBound) + { + Console.WriteLine($"BUG: File size is not in the expected range ({lowerBound} to {upperBound} bytes). Did a libraries change regress size of Hello World?"); + return 1; + } - Console.WriteLine(); + Console.WriteLine(); + } #endif // We expect the AOT compiler generated HW intrinsics with the following characteristics: diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj index 6c2af81dd8c9d6..999d0683992997 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj @@ -7,6 +7,8 @@ true true + + true true $(DefineConstants);AVX2_INTRINSICS;VECTORT256_INTRINSICS true diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj index 8b51024bb0795d..0df8ed309efcde 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512.csproj @@ -7,6 +7,8 @@ true true + + true true $(DefineConstants);AVX512_INTRINSICS;VECTORT256_INTRINSICS true diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512_VectorT512.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512_VectorT512.csproj index 3e11069a32662f..37c53b054755cf 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512_VectorT512.csproj +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx512_VectorT512.csproj @@ -7,6 +7,8 @@ true true + + true true $(DefineConstants);AVX512_INTRINSICS;VECTORT512_INTRINSICS true diff --git a/src/tests/nativeaot/SmokeTests/MultiModule/MultiModule.csproj b/src/tests/nativeaot/SmokeTests/MultiModule/MultiModule.csproj index e2b7e9f808c82d..55e3eb6d1531ce 100644 --- a/src/tests/nativeaot/SmokeTests/MultiModule/MultiModule.csproj +++ b/src/tests/nativeaot/SmokeTests/MultiModule/MultiModule.csproj @@ -6,6 +6,7 @@ true + true true true false diff --git a/src/tests/nativeaot/SmokeTests/PInvoke/PInvoke.csproj b/src/tests/nativeaot/SmokeTests/PInvoke/PInvoke.csproj index 0116c8e88609bc..47a8a7217c7187 100644 --- a/src/tests/nativeaot/SmokeTests/PInvoke/PInvoke.csproj +++ b/src/tests/nativeaot/SmokeTests/PInvoke/PInvoke.csproj @@ -10,6 +10,8 @@ true true + + true true false diff --git a/src/tests/nativeaot/SmokeTests/Preinitialization/Preinitialization.csproj b/src/tests/nativeaot/SmokeTests/Preinitialization/Preinitialization.csproj index 546f757d42f9e7..cea19688f2c4c0 100644 --- a/src/tests/nativeaot/SmokeTests/Preinitialization/Preinitialization.csproj +++ b/src/tests/nativeaot/SmokeTests/Preinitialization/Preinitialization.csproj @@ -14,8 +14,11 @@ - true + true true false diff --git a/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj b/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj index d2944ec5a2a4d9..26e9e0bc0b6c31 100644 --- a/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj +++ b/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj @@ -8,7 +8,9 @@ false true - + + true false diff --git a/src/tests/nativeaot/SmokeTests/UnitTests/BasicThreading.cs b/src/tests/nativeaot/SmokeTests/UnitTests/BasicThreading.cs index 2c826e37e12919..de443d24ba7171 100644 --- a/src/tests/nativeaot/SmokeTests/UnitTests/BasicThreading.cs +++ b/src/tests/nativeaot/SmokeTests/UnitTests/BasicThreading.cs @@ -22,8 +22,13 @@ internal static int Run() if (ThreadStaticAlignmentTest.Run() != Pass) return Fail; - if (ThreadTest.Run() != Pass) - return Fail; + if (!OperatingSystem.IsAndroid()) + { + // Disabled on Android: https://github.com/dotnet/runtime/issues/121451 + + if (ThreadTest.Run() != Pass) + return Fail; + } if (TimerTest.Run() != Pass) return Fail; diff --git a/src/tests/nativeaot/SmokeTests/UnitTests/Threading.cs b/src/tests/nativeaot/SmokeTests/UnitTests/Threading.cs index b20f9556a40354..d3588ef0715d23 100644 --- a/src/tests/nativeaot/SmokeTests/UnitTests/Threading.cs +++ b/src/tests/nativeaot/SmokeTests/UnitTests/Threading.cs @@ -46,11 +46,15 @@ public static int Run() Console.WriteLine(" ThreadPoolTests.RunMoreThanMaxJobsMakesOneJobWaitForStarvationDetection"); ThreadPoolTests.RunMoreThanMaxJobsMakesOneJobWaitForStarvationDetection(); - Console.WriteLine(" ThreadPoolTests.ThreadPoolCanPickUpOneJobWhenThreadIsAvailable"); - ThreadPoolTests.ThreadPoolCanPickUpOneJobWhenThreadIsAvailable(); + if (!OperatingSystem.IsAndroid()) + { + // Disabled on Android due to https://github.com/dotnet/runtime/issues/121216 + Console.WriteLine(" ThreadPoolTests.ThreadPoolCanPickUpOneJobWhenThreadIsAvailable"); + ThreadPoolTests.ThreadPoolCanPickUpOneJobWhenThreadIsAvailable(); - Console.WriteLine(" ThreadPoolTests.ThreadPoolCanPickUpMultipleJobsWhenThreadsAreAvailable"); - ThreadPoolTests.ThreadPoolCanPickUpMultipleJobsWhenThreadsAreAvailable(); + Console.WriteLine(" ThreadPoolTests.ThreadPoolCanPickUpMultipleJobsWhenThreadsAreAvailable"); + ThreadPoolTests.ThreadPoolCanPickUpMultipleJobsWhenThreadsAreAvailable(); + } Console.WriteLine(" ThreadPoolTests.ThreadPoolCanProcessManyWorkItemsInParallelWithoutDeadlocking"); ThreadPoolTests.ThreadPoolCanProcessManyWorkItemsInParallelWithoutDeadlocking();