Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Mono iOS sample on Helix #44462

Merged
merged 16 commits into from
Dec 11, 2020

Conversation

MaximLipnin
Copy link
Contributor

@MaximLipnin MaximLipnin commented Nov 10, 2020

  • Included the ios sample project to the library test build. The sample still can be build/run locally using make file.
  • Added copying resulting HelloiOS.app to helix directory from where it can be consumed by CI.
  • Changed the sample to return 42 when building for CI, which is used as an expected exit code for xharness.
  • Xharness for iOS supports running an application on a simulator w/o test runner inside, the sample is run by this approach.
  • Checked locally that xharness can run HelloiOS.app successfully.

Related issue: #43865

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@steveisok
Copy link
Member

Might have to rebase to get CI to play nice.

@MaximLipnin
Copy link
Contributor Author

At the moment it requires arcade helix sdk bump to, at least, version=6.0.0-beta.20577.1".

@MaximLipnin MaximLipnin force-pushed the run_ios_sample_on_helix branch from baddbfb to 40e64a0 Compare December 4, 2020 07:31
@MaximLipnin
Copy link
Contributor Author

According to the CI log, the sample runs as expected:

[03:47:11] dbug: 03:47:11.4844910 Xamarin.Hosting: Launched net.dot.HelloiOS with pid 84147
[03:47:28] dbug: 03:47:28.5087870 Xamarin.Hosting: Simulated process has exited.
[03:47:28] dbug: 03:47:28.5138190 Process mlaunch exited with 0
[03:47:28] dbug: 03:47:28.5184190 App run ended with 42
[03:47:28] info: Application has finished with exit code: 42 (as expected)
XHarness exit code: 0

@MaximLipnin MaximLipnin marked this pull request as ready for review December 4, 2020 09:52
@steveisok
Copy link
Member

@akoeplinger Please give this a review.

Copy link
Member

@SamMonoRT SamMonoRT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should figure out why xharness return code is 42 and not 0 or 1 or 100. That seems strange to me. @fanyang-mono didn't you encounter something similar while bringing up the Android simulator runtime tests ?

@naricc naricc self-requested a review December 8, 2020 20:36
@steveisok
Copy link
Member

steveisok commented Dec 8, 2020

@SamMonoRT It's a made up return code. We should return 0 for correctness.

Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, left a few comments. The biggest issue for me is the Publish->Build change.

@MaximLipnin MaximLipnin force-pushed the run_ios_sample_on_helix branch 2 times, most recently from 51aa8cb to 8bdf1dc Compare December 10, 2020 09:20
@MaximLipnin
Copy link
Contributor Author

Strange error on ios lane:

2020-12-10T14:31:44.3629640Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018: The "AppleAppBuilderTask" task failed unexpectedly. [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.3734380Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'chunkLength') [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.3736450Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018:    at System.Text.StringBuilder.ToString() [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.3838790Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018:    at Utils.RunProcess(String path, String args, IDictionary`2 envVars, String workingDir, Boolean ignoreErrors) in /_/src/tasks/AppleAppBuilder/Utils.cs:line 75 [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.3941870Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018:    at Xcode..ctor(String target) in /_/src/tasks/AppleAppBuilder/Xcode.cs:line 18 [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.3958970Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018:    at AppleAppBuilderTask.Execute() in /_/src/tasks/AppleAppBuilder/AppleAppBuilder.cs:line 175 [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.4021940Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]
2020-12-10T14:31:44.4052500Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(117,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/runner/work/1/s/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj]

@MaximLipnin
Copy link
Contributor Author

The PR is completely green now.

@MaximLipnin MaximLipnin force-pushed the run_ios_sample_on_helix branch from ea67bb6 to 83e027e Compare December 11, 2020 07:03
@MaximLipnin MaximLipnin merged commit d7aca56 into dotnet:master Dec 11, 2020
@MaximLipnin MaximLipnin deleted the run_ios_sample_on_helix branch December 11, 2020 12:00
@ghost ghost locked as resolved and limited conversation to collaborators Jan 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants