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 Android sample on Helix #45109

Merged
merged 9 commits into from
Dec 11, 2020

Conversation

MaximLipnin
Copy link
Contributor

@MaximLipnin MaximLipnin commented Nov 23, 2020

  • Included the android sample project to the library test build.
  • Added copying resulting HelloAndroid.apk to helix test directory from where it can be consumed by CI.
  • Set up the return value (42) as an expected exit code for xharness.
  • Xharness for android doesn't support running an application w/o test runner yet

Related issue: #43865

@MaximLipnin
Copy link
Contributor Author

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

@MaximLipnin MaximLipnin force-pushed the run_android_sample_on_helix branch from 698473f to 82bea5f Compare December 4, 2020 07:25
@MaximLipnin
Copy link
Contributor Author

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

[09:04:12] info: Starting instrumentation class 'net.dot.MonoRunner' on net.dot.HelloAndroid
[09:04:12] dbug: Raw command: 'shell am instrument  -w net.dot.HelloAndroid/net.dot.MonoRunner'
[09:04:12] dbug: Executing command: '/home/helixbot/work/AD54095B/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20602.1/runtimes/any/native/adb/linux/adb -s emulator-5556 shell am instrument  -w net.dot.HelloAndroid/net.dot.MonoRunner'
[09:04:14] info: Running instrumentation class net.dot.MonoRunner took 1.9247861 seconds
[09:04:14] dbug: Exit code: 0
                 Standard Output:
                 INSTRUMENTATION_RESULT: return-code=42
                 INSTRUMENTATION_CODE: 42
                 
                 
[09:04:14] info: Instrumentation finished normally with exit code 42
[09:04:17] dbug: Executing command: '/home/helixbot/work/AD54095B/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20602.1/runtimes/any/native/adb/linux/adb -s emulator-5556 logcat -d '
[09:04:22] info: Wrote current ADB log to /home/helixbot/work/AD54095B/w/AD740982/uploads/adb-logcat-net.dot.HelloAndroid.log
[09:04:22] info: Attempting to remove apk 'net.dot.HelloAndroid': 
[09:04:22] dbug: Executing command: '/home/helixbot/work/AD54095B/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20602.1/runtimes/any/native/adb/linux/adb -s emulator-5556 uninstall net.dot.HelloAndroid'
[09:04:22] info: Successfully uninstalled net.dot.HelloAndroid.
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

@MaximLipnin MaximLipnin force-pushed the run_android_sample_on_helix branch from 564a68e to 6864d16 Compare December 11, 2020 07:23
@MaximLipnin
Copy link
Contributor Author

runtime-staging (Build Android x64 Release AllSubsets_Mono) looks good now.

@MaximLipnin MaximLipnin merged commit d662abb into dotnet:master Dec 11, 2020
@MaximLipnin MaximLipnin deleted the run_android_sample_on_helix branch December 11, 2020 17:43
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants