-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add Runtime portion of android startup scenario #61861
Conversation
Stop codespaces workflow
…print out stuff so run commands are printed. This is for testing to understand how this works in the pipeline.
…t timing out and thus not getting the stout of xharness.
…ailing to install in helix.
Stop codespaces workflow
…print out stuff so run commands are printed. This is for testing to understand how this works in the pipeline.
…t timing out and thus not getting the stout of xharness.
…ailing to install in helix.
…runtime into add-android-startup
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. |
<PropertyGroup> | ||
<IncludeXHarnessCli>true</IncludeXHarnessCli> | ||
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.21566.2</MicrosoftDotNetXHarnessCLIVersion> | ||
<XharnessPath>%HELIX_CORRELATION_PAYLOAD%\microsoft.dotnet.xharness.cli\$(MicrosoftDotNetXHarnessCLIVersion)\tools\net6.0\any\Microsoft.DotNet.XHarness.CLI.dll</XharnessPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path has the TFM net6.0 in it. Do we know where that information comes from, and when we will need to update it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to set this. There will be a variable %XHARNESS_CLI_PATH%
set for you with this path if you need it on the Helix machine so you can just use that one.
Once you start calling XHarness the right way (we agreed with Parker that this solution is temporary) via the XHarness Helix SDK, you can just call xharness via xharness android ...
and won't need this path in your scripts at all.
@@ -124,7 +124,7 @@ if ($RunFromPerformanceRepo) { | |||
robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git | |||
} | |||
else { | |||
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory | |||
git clone --branch add-android-startup --depth 1 --quiet https://github.com/loopedbard3/performance $PerformanceDirectory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove before final check-in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of small changes, but overall LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, this will probably work but won't be sufficient later on so I left a manual how to onboard the XHarness SDK later.
<PropertyGroup> | ||
<IncludeXHarnessCli>true</IncludeXHarnessCli> | ||
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.21566.2</MicrosoftDotNetXHarnessCLIVersion> | ||
<XharnessPath>%HELIX_CORRELATION_PAYLOAD%\microsoft.dotnet.xharness.cli\$(MicrosoftDotNetXHarnessCLIVersion)\tools\net6.0\any\Microsoft.DotNet.XHarness.CLI.dll</XharnessPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to set this. There will be a variable %XHARNESS_CLI_PATH%
set for you with this path if you need it on the Helix machine so you can just use that one.
Once you start calling XHarness the right way (we agreed with Parker that this solution is temporary) via the XHarness Helix SDK, you can just call xharness via xharness android ...
and won't need this path in your scripts at all.
@@ -1,4 +1,9 @@ | |||
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test"> | |||
<PropertyGroup> | |||
<IncludeXHarnessCli>true</IncludeXHarnessCli> | |||
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.21566.2</MicrosoftDotNetXHarnessCLIVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to set MicrosoftDotNetXHarnessCLIVersion
as it should come from https://github.com/dotnet/runtime/blob/main/eng/Versions.props
@@ -42,5 +47,11 @@ | |||
<Command>$(Python) test.py sod --scenario-name "%(Identity)"</Command> | |||
<PostCommands>$(Python) post.py</PostCommands> | |||
</HelixWorkItem> | |||
<HelixWorkItem Include="Startup - Android HelloWorld"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are nearly there with the proper way how to use the XHarness SDK.
You can go with what you have for now as we agreed but a gentle reminder that we will require you to switch later.
We can also do it inside of this PR if you want, it should be fairly straightforward:
- You need to zip the
$(WorkItemDirectory)
first - Instead of
HelixWorkItem
, you define a<XHarnessApkToTest Include="Startup - Android HelloWorld">
- Instead of
PayloadDirectory
you setApkPath
and point it to the zipped file from 1. - Instead of
PreCommands
,Command
andPostCommands
, you will specify just oneCustomCommands
with the commands inside
Altogether, something like this:
<XHarnessApkToTest Include="Startup - Android HelloWorld">
<ApkPath>$(PathToTheZippedWorkItemDirectory)</ApkPath>
<CustomCommands>
<![CDATA[
echo on
set XHARNESSPATH=$(XharnessPath) <---- this is not needed as noted above
cd $(ScenarioDirectory)helloandroid
copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroidWithDiag.apk .
$(Python) pre.py
$(Python) test.py devicestartup --device-type android --package-path pub\HelloAndroidWithDiag.apk --package-name net.dot.HelloAndroid --exit-code 42 --scenario-name "%(Identity)"
$(Python) post.py
]]>
</CustomCommands>
</XHarnessApkToTest>
(you don't even have to probably use things like "
inside CDATA)
Add runtime portion of android startup scenario. This included adding a diagnostic version of the android file, passing it through the pipeline, and making sure xharness was installed for use.