From cd655d4d41beac9c2fd07828aedc58fda37f08a6 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Wed, 28 Oct 2020 09:21:34 -0700 Subject: [PATCH 01/57] Try running the existing runtime test stuff on iOS_x64 and see what breaks --- eng/pipelines/runtime.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 2ae339930ef6bb..4e6a7533e556de 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -749,6 +749,7 @@ jobs: platforms: - Linux_x64 - Linux_arm64 + - iOS_x64 jobParameters: runtimeVariant: llvmaot condition: >- @@ -1056,6 +1057,7 @@ jobs: platforms: - Linux_x64 - Linux_arm64 + - iOS_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: From bcf2194c34ee29a78369e1d3343187bfdd4cd6f8 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Wed, 28 Oct 2020 12:13:11 -0700 Subject: [PATCH 02/57] Build libraries for iOS x64 --- eng/pipelines/runtime.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 4e6a7533e556de..d84834764cfbee 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -790,6 +790,7 @@ jobs: - OSX_x64 - windows_x64 - FreeBSD_x64 + - iOS_x64 jobParameters: testScope: innerloop testBuildPlatforms: From f5407b7e22960c749a1084ff14675a8ad38e6da9 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 22 Dec 2020 09:24:39 -0800 Subject: [PATCH 03/57] Checkpoint --- src/tests/Directory.Build.targets | 2 +- src/tests/Interop/ICastable/Castable.csproj | 2 +- src/tests/build.sh | 4 +- src/tests/run.proj | 74 +++++++++++++++++++++ 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 6a361c68483e74..635692f056f6f4 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -173,7 +173,7 @@ + Condition="'@(NativeProjectBinaries)' == '' And '$(TargetOS)' != 'Browser' And '$(TargetOS)' != 'Android' And '$(TargetOS)' != 'iOS'"/> Exe true - true + true diff --git a/src/tests/build.sh b/src/tests/build.sh index 7bd0ca06d85d67..c12b92f237ae83 100755 --- a/src/tests/build.sh +++ b/src/tests/build.sh @@ -256,7 +256,7 @@ build_Tests() fi fi - if [[ "$__SkipNative" != 1 && "$__TargetOS" != "Browser" && "$__TargetOS" != "Android" ]]; then + if [[ "$__SkipNative" != 1 && "$__TargetOS" != "Browser" && "$__TargetOS" != "Android" && "$__TargetOS" != "iOS" ]]; then build_native "$__TargetOS" "$__BuildArch" "$__TestDir" "$__NativeTestIntermediatesDir" "install" "CoreCLR test component" if [[ "$?" -ne 0 ]]; then @@ -624,6 +624,8 @@ echo "${__MsgPrefix}Test binaries are available at ${__TestBinDir}" if [ "$__TargetOS" == "Android" ]; then build_MSBuild_projects "Create_Android_App" "$__RepoRootDir/src/tests/run.proj" "Create Android Apps" "/t:BuildAllAndroidApp" "/p:RunWithAndroid=true" +elif [ "$__TargetOS" == "iOS" ]; then + build_MSBuild_projects "Create_iOS_App" "$__RepoRootDir/src/tests/run.proj" "Create iOS Apps" "/t:BuildAlliOSApp" fi if [[ "$__RunTests" -ne 0 ]]; then diff --git a/src/tests/run.proj b/src/tests/run.proj index 4f17417636d840..7c987c70b7c18a 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -707,6 +707,80 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). + + + + + + $([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetDirectoryName($(_CMDDIR))))) + $([System.String]::Copy('$(_CMDDIR)').Replace("$(CMDDIR_Grandparent)/","")) + $([System.String]::Copy('$(CategoryWithSlash)').Replace('/','_')) + $([System.String]::Copy('$(CategoryWithSlash)').Replace('/', '.')).XUnitWrapper.dll + $(CMDDIR_GrandParent)/$(CategoryWithSlash)/$(XUnitWrapperFileName) + $(IntermediateOutputPath)\iOSApps\$(Category) + + + + $(Category) + $(IntermediateOutputPath)/iOSApps + $(ArtifactsBinDir)microsoft.netcore.app.runtime.ios-$(TargetArchitecture)/$(Configuration)/runtimes/ios-$(TargetArchitecture) + $(MicrosoftNetCoreAppRuntimePackDir)/native + + + + + + + + + + + + $([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle')) + + + + + + + + + + + + + + + + + + + + + + + From 788c91ee0bac7594bd632c403ac38f741d470cba Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 5 Jan 2021 18:14:12 -0800 Subject: [PATCH 04/57] . --- src/tests/run.proj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tests/run.proj b/src/tests/run.proj index 7c987c70b7c18a..7790ef58a11b71 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -722,7 +722,6 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). $(Category) - $(IntermediateOutputPath)/iOSApps $(ArtifactsBinDir)microsoft.netcore.app.runtime.ios-$(TargetArchitecture)/$(Configuration)/runtimes/ios-$(TargetArchitecture) $(MicrosoftNetCoreAppRuntimePackDir)/native @@ -736,7 +735,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). - $([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle')) + $([MSBuild]::NormalizeDirectory('$(BuildDir)', 'AppBundle')) From a38489f6286aca6de1b269ca0ae1ad4959da7e78 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 15 Jan 2021 00:37:40 -0800 Subject: [PATCH 05/57] $ -> @ --- src/tests/run.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/run.proj b/src/tests/run.proj index 7790ef58a11b71..d25e1f5fd3f0f1 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -749,10 +749,10 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). SourceFiles="@(RuntimePackNativeLibs)" DestinationFolder="$(BuildDir)" /> Date: Fri, 12 Feb 2021 21:02:42 -0800 Subject: [PATCH 06/57] Allow specifying a launch assembly via an environment variable --- src/tasks/AppleAppBuilder/AppleAppBuilder.cs | 13 +++++++++---- src/tasks/AppleAppBuilder/Templates/runtime.m | 6 ++++++ src/tests/run.proj | 4 ++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/tasks/AppleAppBuilder/AppleAppBuilder.cs b/src/tasks/AppleAppBuilder/AppleAppBuilder.cs index 6183fe0442f2ae..9127192f9f6c4f 100644 --- a/src/tasks/AppleAppBuilder/AppleAppBuilder.cs +++ b/src/tasks/AppleAppBuilder/AppleAppBuilder.cs @@ -50,9 +50,11 @@ public string TargetOS public string MonoRuntimeHeaders { get; set; } = ""!; /// - /// This library will be used as an entry-point (e.g. TestRunner.dll) + /// This library will be used as an entry point (e.g. TestRunner.dll). Can + /// be empty. If empty, the entry point of the app must be specified in an + /// environment variable named "MONO_APPLE_APP_ENTRY_POINT_LIB_NAME" when + /// running the resulting app. /// - [Required] public string MainLibraryFileName { get; set; } = ""!; /// @@ -155,9 +157,12 @@ public override bool Execute() { bool isDevice = (TargetOS == TargetNames.iOS || TargetOS == TargetNames.tvOS); - if (!File.Exists(Path.Combine(AppDir, MainLibraryFileName))) + if (!string.IsNullOrEmpty(MainLibraryFileName)) { - throw new ArgumentException($"MainLibraryFileName='{MainLibraryFileName}' was not found in AppDir='{AppDir}'"); + if (!File.Exists(Path.Combine(AppDir, MainLibraryFileName))) + { + throw new ArgumentException($"MainLibraryFileName='{MainLibraryFileName}' was not found in AppDir='{AppDir}'"); + } } if (ProjectName.Contains(' ')) diff --git a/src/tasks/AppleAppBuilder/Templates/runtime.m b/src/tasks/AppleAppBuilder/Templates/runtime.m index de9ca63b868382..e55886124dd5cc 100644 --- a/src/tasks/AppleAppBuilder/Templates/runtime.m +++ b/src/tasks/AppleAppBuilder/Templates/runtime.m @@ -335,6 +335,12 @@ #endif const char* executable = "%EntryPointLibName%"; + if (executable [0] == '\0') { + executable = getenv ("MONO_APPLE_APP_ENTRY_POINT_LIB_NAME"); + } + if (executable == NULL) { + executable = ""; + } MonoAssembly *assembly = load_assembly (executable, NULL); assert (assembly); os_log_info (OS_LOG_DEFAULT, "Executable: %{public}s", executable); diff --git a/src/tests/run.proj b/src/tests/run.proj index d25e1f5fd3f0f1..c09b73d7c4635e 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -733,6 +733,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). + $([MSBuild]::NormalizeDirectory('$(BuildDir)', 'AppBundle')) @@ -752,7 +753,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). SourceFiles="@(TestDlls)" DestinationFolder="$(BuildDir)" /> Date: Fri, 9 Apr 2021 13:50:10 -0400 Subject: [PATCH 07/57] Add iOSSimulator to the native test component exclusion list --- src/tests/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/build.sh b/src/tests/build.sh index c12b92f237ae83..4e1f930b5b867a 100755 --- a/src/tests/build.sh +++ b/src/tests/build.sh @@ -256,7 +256,7 @@ build_Tests() fi fi - if [[ "$__SkipNative" != 1 && "$__TargetOS" != "Browser" && "$__TargetOS" != "Android" && "$__TargetOS" != "iOS" ]]; then + if [[ "$__SkipNative" != 1 && "$__TargetOS" != "Browser" && "$__TargetOS" != "Android" && "$__TargetOS" != "iOS" && "$__TargetOS" != "iOSSimulator" ]]; then build_native "$__TargetOS" "$__BuildArch" "$__TestDir" "$__NativeTestIntermediatesDir" "install" "CoreCLR test component" if [[ "$?" -ne 0 ]]; then From 26c6f6a2b68d8902a0ba2c6cca51c5d493b0344d Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 9 Apr 2021 15:51:01 -0400 Subject: [PATCH 08/57] iOS -> iOSSimulator --- eng/pipelines/runtime.yml | 4 ++-- src/tests/Directory.Build.targets | 2 +- src/tests/Interop/ICastable/Castable.csproj | 2 +- src/tests/build.sh | 2 +- src/tests/run.proj | 3 +++ 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index d84834764cfbee..6571b88c2adba7 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -749,7 +749,7 @@ jobs: platforms: - Linux_x64 - Linux_arm64 - - iOS_x64 + - iOSSimulator_x64 jobParameters: runtimeVariant: llvmaot condition: >- @@ -1010,6 +1010,7 @@ jobs: platforms: - OSX_x64 - Linux_arm64 + - iOSSimulator_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: @@ -1058,7 +1059,6 @@ jobs: platforms: - Linux_x64 - Linux_arm64 - - iOS_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 635692f056f6f4..4bf4c58589776c 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -173,7 +173,7 @@ + Condition="'@(NativeProjectBinaries)' == '' And '$(TargetOS)' != 'Browser' And '$(TargetOS)' != 'Android' And '$(TargetOS)' != 'iOS' And '$(TargetOS)' != 'iOSSimulator'"/> Exe true - true + true diff --git a/src/tests/build.sh b/src/tests/build.sh index 4e1f930b5b867a..a776c464002b88 100755 --- a/src/tests/build.sh +++ b/src/tests/build.sh @@ -624,7 +624,7 @@ echo "${__MsgPrefix}Test binaries are available at ${__TestBinDir}" if [ "$__TargetOS" == "Android" ]; then build_MSBuild_projects "Create_Android_App" "$__RepoRootDir/src/tests/run.proj" "Create Android Apps" "/t:BuildAllAndroidApp" "/p:RunWithAndroid=true" -elif [ "$__TargetOS" == "iOS" ]; then +elif [ "$__TargetOS" == "iOS" ] || [ "$__TargetOS" == "iOSSimulator" ]; then build_MSBuild_projects "Create_iOS_App" "$__RepoRootDir/src/tests/run.proj" "Create iOS Apps" "/t:BuildAlliOSApp" fi diff --git a/src/tests/run.proj b/src/tests/run.proj index c09b73d7c4635e..cf4a2c60fd025a 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -722,7 +722,10 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). $(Category) + + $(ArtifactsBinDir)microsoft.netcore.app.runtime.iossimulator-$(TargetArchitecture)/$(Configuration)/runtimes/iossimulator-$(TargetArchitecture) $(MicrosoftNetCoreAppRuntimePackDir)/native From 17da6b12f5cc9de4cd03af90dfe5656f8eea15cc Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 27 Apr 2021 00:16:48 -0400 Subject: [PATCH 09/57] Invoke xharness in generated runtime test execution scripts for the iOS simulator --- src/tests/Common/CLRTest.Execute.Bash.targets | 78 ++++++++++++------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 7031b45d72e95b..a249f9663141ab 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -11,7 +11,7 @@ This file contains the logic for providing Execution Script generation. WARNING: When setting properties based on their current state (for example: - - + @@ -124,11 +124,11 @@ fi if [ -z ${CLRTestExpectedExitCode+x} ]%3B then export CLRTestExpectedExitCode=$(CLRTestExitCode)%3B fi echo BEGIN EXECUTION]]> - + - + - + @@ -188,29 +188,29 @@ ReflectionRoots= shopt -s nullglob -if [ ! -z "$DoLink" ]; +if [ ! -z "$DoLink" ]; then - if [ ! -x "$ILLINK" ]; + if [ ! -x "$ILLINK" ]; then echo "Illink executable [$ILLINK] Invalid" exit 1 fi - + # Clean up old Linked binaries, if any rm -rf $LinkBin - + # Remove Native images, since the goal is to run from Linked binaries rm -f *.ni.* # Use hints for reflection roots, if provided in $(ReflectionRootsXml) - if [ -f $(ReflectionRootsXml) ]; + if [ -f $(ReflectionRootsXml) ]; then ReflectionRoots="-x $(ReflectionRootsXml)" fi # Include all .exe files in this directory as entry points (some tests had multiple .exe file modules) - for bin in *.exe *.dll; - do + for bin in *.exe *.dll; + do Assemblies="$Assemblies -a ${bin%.*}" done @@ -224,14 +224,14 @@ then if [ $ERRORLEVEL -ne 0 ] then echo ILLINK FAILED $ERRORLEVEL - if [ -z "$KeepLinkedBinaries" ]; + if [ -z "$KeepLinkedBinaries" ]; then rm -rf $LinkBin fi exit 1 fi - - # Copy CORECLR native binaries to $LinkBin, + + # Copy CORECLR native binaries to $LinkBin, # so that we can run the test based on that directory cp $CORE_ROOT/*.so $LinkBin/ cp $CORE_ROOT/corerun $LinkBin/ @@ -252,9 +252,9 @@ fi # Clean up the LinkBin directories after test execution. # Otherwise, RunTests may run out of disk space. -if [ ! -z "$DoLink" ]; +if [ ! -z "$DoLink" ]; then - if [ -z "$KeepLinkedBinaries" ]; + if [ -z "$KeepLinkedBinaries" ]; then rm -rf $LinkBin fi @@ -364,6 +364,30 @@ fi $__Command $HARNESS_RUNNER android run --instrumentation="net.dot.MonoRunner" --package-name="net.dot.$__Category" --output-directory="$__OutputDir" --arg=entrypoint:libname=$(MsBuildProjectName).dll --expected-exit-code=100 -v CLRTestExitCode=$? +# Exist code of xharness is zero when tests finished successfully +CLRTestExpectedExitCode=0 + ]]> + + + @@ -383,17 +407,17 @@ CLRTestExpectedExitCode=0 @(CLRTestBashEnvironmentVariable -> '%(Identity)', '%0a') - + - + <_RequiredProperties Include="_CLRTestRunFile"> $(_CLRTestRunFile) - + @@ -407,7 +431,7 @@ CLRTestExpectedExitCode=0 usage() { echo "Usage: $0 $(_CLRTestParamList)" - echo + echo echo "Arguments:" @(BashCLRTestExecutionScriptArgument -> ' echo "-%(Identity)=%(ParamName)" echo "%(Description)"', ' @@ -498,14 +522,14 @@ $(BashCLRTestExitCodeCheck) - + From f339a670698b90d8c843add9e8103f51b7c92fbb Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Wed, 28 Apr 2021 15:40:17 -0400 Subject: [PATCH 10/57] aaaaaa --- eng/pipelines/runtime-staging.yml | 1 + eng/pipelines/runtime.yml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 27843c8959dd42..b2d62a9cd1602e 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -270,6 +270,7 @@ jobs: runtimeFlavor: mono platforms: - Android_arm64 + - iOSSimulator_x64 variables: - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - name: _HelixSource diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 6571b88c2adba7..2ae339930ef6bb 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -749,7 +749,6 @@ jobs: platforms: - Linux_x64 - Linux_arm64 - - iOSSimulator_x64 jobParameters: runtimeVariant: llvmaot condition: >- @@ -790,7 +789,6 @@ jobs: - OSX_x64 - windows_x64 - FreeBSD_x64 - - iOS_x64 jobParameters: testScope: innerloop testBuildPlatforms: @@ -1010,7 +1008,6 @@ jobs: platforms: - OSX_x64 - Linux_arm64 - - iOSSimulator_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: From 64c62423dbea628c208e57e6f257a22f4aaee8bf Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 30 Apr 2021 08:51:47 -0400 Subject: [PATCH 11/57] Enable iOSSimulator helix queues --- eng/pipelines/coreclr/templates/helix-queues-setup.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index e6a413266ae13a..b91202f0df8a8c 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -26,18 +26,22 @@ jobs: runtimeFlavorDisplayName: ${{ parameters.runtimeFlavorDisplayName }} helixQueues: + # iOS/tvOS simulator x64/x86 + - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64') }}: + - OSX.1015.Amd64.Open + # Android arm64 - ${{ if in(parameters.platform, 'Android_arm64') }}: - Windows.10.Amd64.Android.Open - + # Android x64 - ${{ if in(parameters.platform, 'Android_x64') }}: - Ubuntu.1804.Amd64.Android.Open - + # Browser wasm - ${{ if eq(parameters.platform, 'Browser_wasm') }}: - Ubuntu.1804.Amd64.Open - + # Linux arm - ${{ if eq(parameters.platform, 'Linux_arm') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: From 6ec3caac5b503aa8997e444d340ca943c736f1d6 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 4 May 2021 12:47:14 -0400 Subject: [PATCH 12/57] ... --- src/tests/Common/helixpublishwitharcade.proj | 11 ++++++++++- src/tests/Common/tests.targets | 8 ++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index b98bd8e8289b17..58b4c3b9a79bef 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -83,6 +83,7 @@ linux-musl-$(TargetArchitecture) browser-wasm android-$(TargetArchitecture) + iossimulator-$(TargetArchitecture) @@ -107,7 +108,15 @@ win-x64 - + + sdk + $([System.IO.File]::ReadAllText('$(RepoRoot)global.json')) + $([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F<="dotnet": ").*(%3F=")')) + + osx-x64 + + + true diff --git a/src/tests/Common/tests.targets b/src/tests/Common/tests.targets index 639d08a0863d24..ba7fc37c762482 100644 --- a/src/tests/Common/tests.targets +++ b/src/tests/Common/tests.targets @@ -15,10 +15,10 @@ - + - + @@ -43,7 +43,7 @@ $(CORE_ROOT)\xunit\xunit.console.dll - -parallel none + -parallel none -parallel $(ParallelRun) $(XunitArgs) -html $(__TestRunHtmlLog) $(XunitArgs) -xml $(__TestRunXmlLog) @@ -55,7 +55,7 @@ $(CORE_ROOT)\corerun $(CORE_ROOT)\corerun.exe - $(DotnetRoot)/dotnet + $(DotnetRoot)/dotnet $(ArtifactsBinDir)microsoft.netcore.app.runtime.iossimulator-$(TargetArchitecture)/$(Configuration)/runtimes/iossimulator-$(TargetArchitecture) $(MicrosoftNetCoreAppRuntimePackDir)/native @@ -745,7 +743,6 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). - @@ -777,6 +774,17 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). + + + + + + + + + From aeecc0d0a7b122832d3afdac99e02bebcdb8d5b9 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 6 May 2021 14:48:38 -0400 Subject: [PATCH 16/57] Duplicate some script goo See https://github.com/dotnet/arcade/blob/01c1af9f5ead4962e390cfbec92396de34118492/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-helix-job.apple.sh#L13 and https://github.com/dotnet/arcade/blob/01c1af9f5ead4962e390cfbec92396de34118492/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh#L140-L141 --- src/tests/Common/CLRTest.Execute.Bash.targets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 37507561a6a2d2..005148650ba613 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -386,7 +386,11 @@ else fi mkdir -p /tmp/out -$__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="/tmp/out" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v +xcode_path="$(dirname "$(dirname "$(xcode-select -p)")")" +simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" +open -a "$simulator_app" +helix_runner_uid="$(id -u)" +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="/tmp/out" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 CLRTestExitCode=$? # Exist code of xharness is zero when tests finished successfully From cffef0baa0d5ddd7db6fd2c93a98dd3fe2afdb30 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 6 May 2021 16:14:45 -0400 Subject: [PATCH 17/57] escaping --- src/tests/Common/CLRTest.Execute.Bash.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 005148650ba613..d8850950f60cd7 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -386,10 +386,10 @@ else fi mkdir -p /tmp/out -xcode_path="$(dirname "$(dirname "$(xcode-select -p)")")" +xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" -helix_runner_uid="$(id -u)" +helix_runner_uid="%24(id -u)" sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="/tmp/out" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 CLRTestExitCode=$? From 2b252ad32da0312713f801d2198b5ee8a4f33d09 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Wed, 12 May 2021 07:37:25 -0400 Subject: [PATCH 18/57] Try resetting the simulator (slow) on each test run --- src/tests/Common/CLRTest.Execute.Bash.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index d8850950f60cd7..dbba139f8f69da 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -390,7 +390,7 @@ xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" -sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="/tmp/out" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="/tmp/out" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 --reset-simulator CLRTestExitCode=$? # Exist code of xharness is zero when tests finished successfully From 9b50976f3e38f927bb4862a71409b37185bb7807 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 13 May 2021 11:11:22 -0400 Subject: [PATCH 19/57] Try using invariant globalization for now (where is icudt.dat supposed to come from?) --- src/tests/run.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/run.proj b/src/tests/run.proj index 23613f0f3a767a..378dc671aed251 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -770,6 +770,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). DevTeamProvisioning="$(DevTeamProvisioning)" OutputDirectory="$(BundleDir)" AppDir="$(BuildDir)" + InvariantGlobalization="true" > From 9bae38faad4d7e2558af2bc8cc9e7c145e4203b9 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 14 May 2021 06:39:31 -0400 Subject: [PATCH 20/57] ... --- src/tests/Common/CLRTest.Execute.Bash.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index dbba139f8f69da..2443793c610e9f 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -390,7 +390,8 @@ xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" -sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="/tmp/out" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 --reset-simulator +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 --reset-simulator + CLRTestExitCode=$? # Exist code of xharness is zero when tests finished successfully From 771dc518939e29386f20198b87fe527d56eae3ca Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 14 May 2021 08:44:52 -0400 Subject: [PATCH 21/57] Dump the test app's stdout/stderr to stdout. Add a bunch of matching braces to enable use of vi's brace matching feature to quickly find the beginning and end of each log --- src/tests/Common/CLRTest.Execute.Bash.targets | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 2443793c610e9f..8f5094f44d6fcc 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -391,8 +391,16 @@ simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 --reset-simulator - CLRTestExitCode=$? +echo '======== STDOUT ======== ({[' +cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" +echo ']})' +echo '' +echo '======== STDERR ======== ({[' +cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" +echo ']})' +echo '' + # Exist code of xharness is zero when tests finished successfully CLRTestExpectedExitCode=0 From 6e6b0758f62f4e4e438bc08c56d9e1d2847fbf70 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 14 May 2021 10:23:41 -0400 Subject: [PATCH 22/57] Try not resetting the simulator --- src/tests/Common/CLRTest.Execute.Bash.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 8f5094f44d6fcc..45e089720cbd49 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -390,7 +390,7 @@ xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" -sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 --reset-simulator +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 CLRTestExitCode=$? echo '======== STDOUT ======== ({[' cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" From 09da8f24bc53c63af9afa0ea971e0fabb3c172fa Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 14 May 2021 10:24:07 -0400 Subject: [PATCH 23/57] ... --- src/tests/Common/CLRTest.Execute.Bash.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 45e089720cbd49..0f7a15f7cbdf1b 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -393,11 +393,11 @@ helix_runner_uid="%24(id -u)" sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run --app="$__TestBinaryBase/$__Category.app" --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName).dll" --expected-exit-code=100 -v --targets ios-simulator-64 CLRTestExitCode=$? echo '======== STDOUT ======== ({[' -cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" +cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" 2>/dev/null echo ']})' echo '' echo '======== STDERR ======== ({[' -cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" +cat "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" 2>/dev/null echo ']})' echo '' From fcfe801659feea1d360c74b73da399f71f14e83a Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 14 May 2021 12:35:23 -0400 Subject: [PATCH 24/57] Hack: for tests with a "TestGrouping" (see src/tests/Common/testgrouping.proj), unconditionally upload directories with ".app" as a suffix to helix, along with their contents --- src/tests/Common/helixpublishwitharcade.proj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 58b4c3b9a79bef..932016123a1395 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -165,6 +165,8 @@ <_PayloadFiles Include="@(_TestGroupingRelevant->WithMetadataValue('TestGroup','$(_PayloadGroup)')->DistinctWithCase())" Condition="'$(_TestGroupingExists)' == 'true'" /> <_PayloadFiles Include="$(_FileDirectory)*" Condition="'$(_TestGroupingExists)' == 'true'" /> + <_PayloadFiles Include="$(_FileDirectory)/*.app" Condition="'$(_TestGroupingExists)' == 'true'" /> + <_PayloadFiles Include="$(_FileDirectory)/*.app/**" Condition="'$(_TestGroupingExists)' == 'true'" /> <_PayloadFiles Update="@(_PayloadFiles)"> + + + + - + + + + From bf603afa1087c09823a93cf5f275f9d1b6dbbfcb Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 13 May 2021 05:18:54 -0400 Subject: [PATCH 28/57] dummy commit --- src/mono/mono.proj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 2a2b7cd920d479..876fa5fdc8198c 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -879,5 +879,4 @@ - From 91ebaa52de9864fd1bcd67606351875a149ae361 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 13 May 2021 05:19:10 -0400 Subject: [PATCH 29/57] dummy commit --- src/mono/mono.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 876fa5fdc8198c..2a2b7cd920d479 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -879,4 +879,5 @@ + From 146543afdce18cdbebc81c0de23c80ca6e732725 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Sat, 15 May 2021 11:43:10 -0400 Subject: [PATCH 30/57] Prefix test subdirectories Loader_regressions contains a test DLL named "main", which makes CMake generate an xcode project that fails to build main.m. I don't really want to spend time figuring out why CMake is doing this, so instead this adds a prefix to each test subdirectory. --- src/tests/Common/CLRTest.Execute.Bash.targets | 4 ++-- src/tests/run.proj | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index cc66c2fa3df688..5b7f3ba85a9338 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -393,8 +393,8 @@ helix_runner_uid="%24(id -u)" sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run \ --app="$__TestBinaryBase/$__Category.app" \ --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" \ - --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=$(MsBuildProjectName)/$(MsBuildProjectName).dll" \ - --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=$(MsBuildProjectName)" \ + --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" \ + --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" \ --expected-exit-code=100 \ --targets ios-simulator-64 \ -v diff --git a/src/tests/run.proj b/src/tests/run.proj index 64cd068b5a291d..bf78430b3c90f1 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -764,10 +764,12 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). --> + + + - + - @@ -776,11 +778,10 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). DestinationFolder="$(BuildDir)" /> + DestinationFolder="$(BuildDir)/testdir-%(TestDlls.Filename)" /> - + DestinationFolder="$(BuildDir)/testdir-%(ExtraDlls.TestDllFilename)" /> Date: Sat, 15 May 2021 13:36:57 -0400 Subject: [PATCH 31/57] escaping?? --- src/tests/Common/CLRTest.Execute.Bash.targets | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 5b7f3ba85a9338..1e09c2a0d722d8 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -390,13 +390,13 @@ xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" -sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run \ - --app="$__TestBinaryBase/$__Category.app" \ - --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" \ - --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" \ - --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" \ - --expected-exit-code=100 \ - --targets ios-simulator-64 \ +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run %5c + --app="$__TestBinaryBase/$__Category.app" %5c + --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" %5c + --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c + --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" %5c + --expected-exit-code=100 %5c + --targets ios-simulator-64 %5c -v CLRTestExitCode=$? stdout_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" From 9da20dde438145d93f8d3bce2294bd52bfd68ca8 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Sat, 15 May 2021 23:01:39 -0400 Subject: [PATCH 32/57] Add some interop tests to issues.targets --- src/tests/issues.targets | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 854204fd744fc9..418290adf0e3cf 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -2920,4 +2920,46 @@ https://github.com/dotnet/runtime/issues/52781 + + + + missing assembly + + + missing assembly + + + missing assembly + + + missing assembly + + + missing assembly + + + missing assembly + + + missing assembly + + + missing assembly + + + System.PlatformNotSupportedException: Operation is not supported on this platform + + + System.DllNotFoundException: DoesNotExist + + + System.DllNotFoundException: DoesNotExist + + + System.DllNotFoundException: UnmanagedCallersOnlyDll + + + System.DllNotFoundException: ObjectiveC + + From 75801dc7e17ae9a4c3bc80601859ab5abdb74f2b Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Sat, 15 May 2021 23:34:21 -0400 Subject: [PATCH 33/57] Add "PayloadGroup0" reproducible failures to issues.targets --- src/tests/issues.targets | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 418290adf0e3cf..58b6d27d2aac66 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -2961,5 +2961,36 @@ System.DllNotFoundException: ObjectiveC + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.assert, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. + + + + System.ArgumentNullException: Value cannot be null. (Parameter 'path1') + + + System.Exception: Values for 'retCode' are not equal! Left='1' Right='0' + + + + System.IO.FileNotFoundException: Could not load file or assembly '/.../Library/Developer/CoreSimulator/Devices/941235AB-7563-4D79-AC28-946B7AD2304A/data/Containers/Bundle/Application/40176A30-D8F5-4497-958A-6514E5C684FC/readytorun_multifolder.app/testdir-multifolder/../FolderA/FolderA/FolderA.dll' or one of its dependencies. + + + + Failed to catch an exception! System.DllNotFoundException: ForeignThreadExceptionsNative + + + + USAGE: MultipleWR.exe num objects [track] + + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.runner.utility.netcoreapp10, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. + + + + Environment variable is not set: 'CORE_ROOT' + From 079d7f788d34d2457f9d5b8ea99ac01df752c0b2 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Sun, 16 May 2021 09:12:43 -0400 Subject: [PATCH 34/57] Exclude more reproducibly failing tests --- src/tests/issues.targets | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 58b6d27d2aac66..c60f62d44eed65 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -2961,6 +2961,9 @@ System.DllNotFoundException: ObjectiveC + + System.DllNotFoundException: SuppressGCTransitionNative + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.assert, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. @@ -2992,5 +2995,16 @@ Environment variable is not set: 'CORE_ROOT' + + + USAGE: ThreadStartBool bool + + + USAGE: ThreadStartBool bool + + + + System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') + From 199261920f98d63cceae93f1a01b4b37e65919b0 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Sun, 16 May 2021 17:16:26 -0400 Subject: [PATCH 35/57] Exclude another reproducible issue --- src/tests/issues.targets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index c60f62d44eed65..6a05d460ed901e 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -3006,5 +3006,9 @@ System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') + + + System.DllNotFoundException: ThisCallNative + From 6f77899f0f140382054945ffc8a6a34834a09339 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 07:47:55 -0400 Subject: [PATCH 36/57] Add more reproducible failures to issues.targets --- src/tests/issues.targets | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 6a05d460ed901e..7ee8b81658bf5c 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -3010,5 +3010,12 @@ System.DllNotFoundException: ThisCallNative + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + From d6362013bb3bd306185184eacbe93629d5f5ff0c Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 10:22:05 -0400 Subject: [PATCH 37/57] Accumulate more shell script gunk --- src/tests/Common/CLRTest.Execute.Bash.targets | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 1e09c2a0d722d8..381989f1f2a0e6 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -385,7 +385,6 @@ else HARNESS_RUNNER="xharness" fi -mkdir -p /tmp/out xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" @@ -399,8 +398,11 @@ sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run % --targets ios-simulator-64 %5c -v CLRTestExitCode=$? -stdout_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" -stderr_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" + +stdout_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/$__Category-$(MsBuildProjectName).log" +stderr_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/$__Category-$(MsBuildProjectName).err.log" +mv "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" "$stdout_log_path" +mv "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" "$stderr_log_path" echo "======== STDOUT ======== $stdout_log_path ({[" cat "$stdout_log_path" 2>/dev/null echo ']})' From 0f2a31243a602078ee65c505d267f98df6860d7b Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 10:24:05 -0400 Subject: [PATCH 38/57] Try OSX.1100.Amd64.Open --- eng/pipelines/coreclr/templates/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index b91202f0df8a8c..2b0f4b69a63c32 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -28,7 +28,7 @@ jobs: # iOS/tvOS simulator x64/x86 - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64') }}: - - OSX.1015.Amd64.Open + - OSX.1100.Amd64.Open # Android arm64 - ${{ if in(parameters.platform, 'Android_arm64') }}: From 9d0bbc085ca26f22b20ed58c4e11871702662e71 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 13:50:57 -0400 Subject: [PATCH 39/57] Revert "Try OSX.1100.Amd64.Open" This reverts commit 2f0c8cab10e6157bf493a5e11ccb3ce2cdd12aa0. --- eng/pipelines/coreclr/templates/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index 2b0f4b69a63c32..b91202f0df8a8c 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -28,7 +28,7 @@ jobs: # iOS/tvOS simulator x64/x86 - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64') }}: - - OSX.1100.Amd64.Open + - OSX.1015.Amd64.Open # Android arm64 - ${{ if in(parameters.platform, 'Android_arm64') }}: From c4c8a71fa789f09aecaa0bfb0a2201d40f3a9cf5 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 18:11:19 -0400 Subject: [PATCH 40/57] . --- src/tests/Common/tests.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/tests.targets b/src/tests/Common/tests.targets index ba7fc37c762482..fa4e20e7db3e65 100644 --- a/src/tests/Common/tests.targets +++ b/src/tests/Common/tests.targets @@ -44,7 +44,7 @@ $(CORE_ROOT)\xunit\xunit.console.dll -parallel none - -parallel $(ParallelRun) + -parallel $(ParallelRun) $(XunitArgs) -html $(__TestRunHtmlLog) $(XunitArgs) -xml $(__TestRunXmlLog) $(XunitArgs) @(IncludeTraitsItems->'-trait %(Identity)', ' ') From 52680a09981ffd7d6165597318fd198f51083532 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 21:14:46 -0400 Subject: [PATCH 41/57] . --- src/tests/Common/CLRTest.Execute.Bash.targets | 4 ++-- src/tests/Common/helixpublishwitharcade.proj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 381989f1f2a0e6..9260508446a68b 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -404,11 +404,11 @@ stderr_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/$__Category-$(MsBuildProjectName).e mv "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" "$stdout_log_path" mv "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" "$stderr_log_path" echo "======== STDOUT ======== $stdout_log_path ({[" -cat "$stdout_log_path" 2>/dev/null +cat "$stdout_log_path" echo ']})' echo '' echo "======== STDERR ======== $stderr_log_path ({[" -cat "$stderr_log_path" 2>/dev/null +cat "$stderr_log_path" echo ']})' echo '' diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 932016123a1395..349530a5b22530 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -253,7 +253,7 @@ $([System.TimeSpan]::FromMinutes($(TimeoutPerTestInMinutes)).TotalMilliseconds) true <_XUnitParallelMode>collections - <_XUnitParallelMode Condition=" '$(TargetOS)' == 'Android' ">none + <_XUnitParallelMode Condition=" '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'iOSSimulator'">none <_XUnitParallelMode Condition=" '$(LongRunningGCTests)' == 'true' ">none <_XUnitParallelMode Condition=" '$(GcSimulatorTests)' == 'true' ">none -parallel $(_XUnitParallelMode) -nocolor -noshadow -xml testResults.xml From bcc2b25210a6764d718ac678f529c200af9a312a Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 21:15:10 -0400 Subject: [PATCH 42/57] Disable another reproducibly failing test --- src/tests/issues.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 7ee8b81658bf5c..ec5d61eb1b87d3 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -3010,6 +3010,9 @@ System.DllNotFoundException: ThisCallNative + + https://github.com/dotnet/runtime/issues/50440 + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. From 85e1fdcc52c42842f491d16e74f76baa35afb748 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Mon, 17 May 2021 23:29:46 -0400 Subject: [PATCH 43/57] Exclude more reproducible failing tests --- src/tests/issues.targets | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index ec5d61eb1b87d3..f4cc5890e26d4f 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -2968,6 +2968,9 @@ System.IO.FileNotFoundException: Could not load file or assembly 'xunit.assert, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. + + System.DllNotFoundException: GCPollNative + System.ArgumentNullException: Value cannot be null. (Parameter 'path1') @@ -2987,6 +2990,15 @@ USAGE: MultipleWR.exe num objects [track] + + USAGE: MultipleWR.exe num objects [track] + + + GC_API 0|1|2 + + + GC_API 0|1|2 + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.runner.utility.netcoreapp10, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. @@ -3013,6 +3025,12 @@ https://github.com/dotnet/runtime/issues/50440 + + https://github.com/dotnet/runtime/issues/50440 + + + https://github.com/dotnet/runtime/issues/50440 + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. From 333f3f401969da5a80b2f133d5da19b9af1bcc64 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 18 May 2021 00:17:11 -0400 Subject: [PATCH 44/57] Add more reproducible failures to issues.targets --- src/tests/issues.targets | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index f4cc5890e26d4f..cd4bbfaae7c83b 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -3038,5 +3038,46 @@ System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + This test requires CORE_ROOT to be set + + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.assert, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. + + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + ((null) error) * Assertion at runtime/src/mono/mono/metadata/assembly.c:2049, condition `is_ok (error)' not met, function:mono_assembly_load_friends, Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + System.IO.FileNotFoundException: Could not load file or assembly 'xunit.performance.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=67066efe964d3b03' or one of its dependencies. + + + + CORE_ROOT must be set + + + + Could not load file or assembly 'System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. + From e20e65da0b2eb779ab4bcc5dae85be8a22878e58 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 18 May 2021 08:13:15 -0400 Subject: [PATCH 45/57] Remove msbuild debug stuff --- src/tests/run.proj | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/tests/run.proj b/src/tests/run.proj index bf78430b3c90f1..f21a0bd1284065 100644 --- a/src/tests/run.proj +++ b/src/tests/run.proj @@ -749,21 +749,6 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). - - @@ -802,8 +787,6 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). - From 908cba341cc92651b36d4d9b47c531af053dfa2c Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 18 May 2021 14:11:50 -0400 Subject: [PATCH 46/57] Fix word misuse --- src/tests/Common/CLRTest.Execute.Bash.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 9260508446a68b..9bb07de26e1341 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -364,7 +364,7 @@ fi $__Command $HARNESS_RUNNER android run --instrumentation="net.dot.MonoRunner" --package-name="net.dot.$__Category" --output-directory="$__OutputDir" --arg=entrypoint:libname=$(MsBuildProjectName).dll --expected-exit-code=100 -v CLRTestExitCode=$? -# Exist code of xharness is zero when tests finished successfully +# Exit code of xharness is zero when tests finished successfully CLRTestExpectedExitCode=0 ]]> @@ -413,7 +413,7 @@ echo ']})' echo '' -# Exist code of xharness is zero when tests finished successfully +# Exit code of xharness is zero when tests finished successfully CLRTestExpectedExitCode=0 ]]> From 1ba5709dc230c706b36211062a239505524c5eb4 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 18 May 2021 14:43:03 -0400 Subject: [PATCH 47/57] Remove unusued helix pipeline spec for iOSSimulator_x86 --- eng/pipelines/coreclr/templates/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index b91202f0df8a8c..2b3a80ce94349c 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -27,7 +27,7 @@ jobs: helixQueues: # iOS/tvOS simulator x64/x86 - - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64') }}: + - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'tvOSSimulator_x64') }}: - OSX.1015.Amd64.Open # Android arm64 From bdbc13f1a09a568ff9aa2e2782c73d007b043a82 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Fri, 25 Jun 2021 15:19:24 -0400 Subject: [PATCH 48/57] Use just-run instead of run --- src/tests/Common/CLRTest.Execute.Bash.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 9bb07de26e1341..f495b411feef12 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -389,7 +389,7 @@ xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" -sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple run %5c +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple just-run %5c --app="$__TestBinaryBase/$__Category.app" %5c --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" %5c --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c From 42f50d322f9ffc0a5757e65570c91fba244acc4e Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Sat, 26 Jun 2021 18:02:39 -0400 Subject: [PATCH 49/57] Actually run tests --- eng/pipelines/runtime-staging.yml | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index b2d62a9cd1602e..1f7db17e12d086 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -259,6 +259,44 @@ jobs: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) +# +# Build the whole product using Mono and run runtime tests with the JIT. +# +- 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 + platforms: + - iOSSimulator_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_Mono_RuntimeTests + buildArgs: -s mono+libs -c $(_BuildConfig) + timeoutInMinutes: 240 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(variables['isFullMatrix'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + # # Build the whole product using Mono for Android and run runtime tests with Android devices # @@ -270,7 +308,6 @@ jobs: runtimeFlavor: mono platforms: - Android_arm64 - - iOSSimulator_x64 variables: - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - name: _HelixSource From 08bd4a41014a8b9b0f002b44b9a069cf7e98892b Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 8 Jul 2021 09:37:01 -0400 Subject: [PATCH 50/57] debug app installation failure --- src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs b/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs index f4d179ce4ce29c..94160c689cada7 100644 --- a/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs +++ b/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs @@ -97,6 +97,8 @@ private static int HandleMobileApp(string action, string platform, string catego process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; + outputWriter.WriteLine("XXXih: cmdStr = {0}", cmdStr); + errorWriter.WriteLine("XXXih: cmdStr = {0}", cmdStr); DateTime startTime = DateTime.Now; process.Start(); @@ -125,7 +127,7 @@ private static int HandleMobileApp(string action, string platform, string catego cmdStr, timeout, startTime.ToString(), endTime.ToString()); errorWriter.WriteLine("\ncmdLine:{0} Timed Out (timeout in milliseconds: {1}, start: {2}, end: {3})", cmdStr, timeout, startTime.ToString(), endTime.ToString()); - + process.Kill(entireProcessTree: true); } } @@ -152,7 +154,7 @@ private static string ConvertCmd2Arg(string cmd) { cmdPrefix = "-c"; } - + return $"{cmdPrefix} \"{cmd}\""; } } From 675c41037f9ca505dc443bc4748d0f597c360255 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 8 Jul 2021 11:46:30 -0400 Subject: [PATCH 51/57] Hard-code support for 64-bit ios simulators in MobileAppHandler.cs --- src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs b/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs index 94160c689cada7..7a58262a95420d 100644 --- a/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs +++ b/src/tests/Common/Coreclr.TestWrapper/MobileAppHandler.cs @@ -81,6 +81,11 @@ private static int HandleMobileApp(string action, string platform, string catego } } + if (platform != "android") + { + cmdStr += " --target ios-simulator-64"; + } + using (Process process = new Process()) { if (OperatingSystem.IsWindows()) From 2a02020098cfad77cc9e36a5408092137066535b Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 8 Jul 2021 18:54:28 -0400 Subject: [PATCH 52/57] Use app bundle IDs for just-run, rather than the full host paths used for run --- src/tests/Common/CLRTest.Execute.Bash.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index f495b411feef12..e28ed0db150bc4 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -390,7 +390,7 @@ simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" open -a "$simulator_app" helix_runner_uid="%24(id -u)" sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple just-run %5c - --app="$__TestBinaryBase/$__Category.app" %5c + --app="net.dot.$__Category" %5c --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" %5c --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" %5c From 8ee2314653d290b0cf088c5ab8103252c6e43bf2 Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Wed, 28 Jul 2021 10:53:58 -0400 Subject: [PATCH 53/57] add --device --- src/tests/Common/CLRTest.Execute.Bash.targets | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index e28ed0db150bc4..0cdc4e53500040 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -385,34 +385,17 @@ else HARNESS_RUNNER="xharness" fi -xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" -simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" -open -a "$simulator_app" -helix_runner_uid="%24(id -u)" -sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple just-run %5c +$__Command $HARNESS_RUNNER apple just-run %5c --app="net.dot.$__Category" %5c - --output-directory="$HELIX_WORKITEM_UPLOAD_ROOT" %5c + --output-directory="$__OutputDir" %5c --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" %5c --expected-exit-code=100 %5c --targets ios-simulator-64 %5c + --device `$__Command $HARNESS_RUNNER apple device ios-simulator-64` %5c -v CLRTestExitCode=$? -stdout_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/$__Category-$(MsBuildProjectName).log" -stderr_log_path="$HELIX_WORKITEM_UPLOAD_ROOT/$__Category-$(MsBuildProjectName).err.log" -mv "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.log" "$stdout_log_path" -mv "$HELIX_WORKITEM_UPLOAD_ROOT/net.dot.$__Category.err.log" "$stderr_log_path" -echo "======== STDOUT ======== $stdout_log_path ({[" -cat "$stdout_log_path" -echo ']})' -echo '' -echo "======== STDERR ======== $stderr_log_path ({[" -cat "$stderr_log_path" -echo ']})' -echo '' - - # Exit code of xharness is zero when tests finished successfully CLRTestExpectedExitCode=0 ]]> From ba636a6e0befcc17ccde982c8cb0accc03b4b09d Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Mon, 2 Aug 2021 14:43:19 -0400 Subject: [PATCH 54/57] Remove unnecessary swith `--device` --- src/tests/Common/CLRTest.Execute.Bash.targets | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 0cdc4e53500040..7c826d46f47ed4 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -392,7 +392,6 @@ $__Command $HARNESS_RUNNER apple just-run %5c --set-env="MONO_APPLE_APP_ASSEMBLY_LOAD_PREFIX=testdir-$(MsBuildProjectName)" %5c --expected-exit-code=100 %5c --targets ios-simulator-64 %5c - --device `$__Command $HARNESS_RUNNER apple device ios-simulator-64` %5c -v CLRTestExitCode=$? From c1eaf98489403817b8ef2cf2bc92738fa3f6c0d3 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 3 Aug 2021 00:03:51 -0400 Subject: [PATCH 55/57] For now: don't submit tests to helix --- eng/pipelines/runtime-staging.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 1f7db17e12d086..22b3719148d93f 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -292,10 +292,10 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(variables['isFullMatrix'], true)) # extra steps, run tests - extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) + # extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + # extraStepsParameters: + # creator: dotnet-bot + # testRunNamePrefixSuffix: Mono_$(_BuildConfig) # # Build the whole product using Mono for Android and run runtime tests with Android devices From ffc73209798117314787bf7192c3d4f56b459e20 Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Tue, 3 Aug 2021 10:27:55 -0400 Subject: [PATCH 56/57] Adding back the code to make tests run on ios simulator --- eng/pipelines/runtime-staging.yml | 8 ++++---- src/tests/Common/CLRTest.Execute.Bash.targets | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 22b3719148d93f..1f7db17e12d086 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -292,10 +292,10 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(variables['isFullMatrix'], true)) # extra steps, run tests - # extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - # extraStepsParameters: - # creator: dotnet-bot - # testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) # # Build the whole product using Mono for Android and run runtime tests with Android devices diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index 7c826d46f47ed4..ee375b80694172 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -385,7 +385,12 @@ else HARNESS_RUNNER="xharness" fi -$__Command $HARNESS_RUNNER apple just-run %5c +xcode_path="%24(dirname "%24(dirname "%24(xcode-select -p)")")" +simulator_app="$xcode_path/Contents/Developer/Applications/Simulator.app" +open -a "$simulator_app" +helix_runner_uid="%24(id -u)" + +sudo launchctl asuser "$helix_runner_uid" $__Command $HARNESS_RUNNER apple just-run %5c --app="net.dot.$__Category" %5c --output-directory="$__OutputDir" %5c --set-env="MONO_APPLE_APP_ENTRY_POINT_LIB_NAME=testdir-$(MsBuildProjectName)/$(MsBuildProjectName).dll" %5c From f451eb02d721ca407c41cca7c7eaf36716cf2764 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Tue, 3 Aug 2021 15:06:54 -0400 Subject: [PATCH 57/57] For now: don't submit tests to helix --- eng/pipelines/runtime-staging.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 1f7db17e12d086..92e672c5b187ca 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -291,11 +291,15 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(variables['isFullMatrix'], true)) + # Test execution is temporarily disabled because test apps no longer launch + # and the test suite times out after two hours, even if xharness cannot + # successfully launch any tests. Re-enable once these issues have been fixed. + # # extra steps, run tests - extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) + # extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml + # extraStepsParameters: + # creator: dotnet-bot + # testRunNamePrefixSuffix: Mono_$(_BuildConfig) # # Build the whole product using Mono for Android and run runtime tests with Android devices