-
Notifications
You must be signed in to change notification settings - Fork 285
Add Maui Mobile Testing to the perf repo (port from release/7.0 Test) #2813
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 Maui Mobile Testing to the perf repo (port from release/7.0 Test) #2813
Conversation
21a8c58 to
7b55f8f
Compare
cdbe01f to
7c90323
Compare
|
Test run with the Maui run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2083511&view=results |
5f8024f to
f398728
Compare
…ng). Move maui android scenario yml template to the correct place. (Private runs) specify that it is the dotnet packs we are removing from the correlation staging Testing the passing of links for the dotnet version. Add rollback file for installing the maui workload on .Net versions 8 and up, and update output dir functionality to work when it is not included.
0915880 to
0ef1134
Compare
…and, and strip the getActivity output to fix error with the activity name.
cincuranet
left a comment
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.
LGTM. Only minor observations, I'll leave that to your discretion.
|
|
||
| setup_loggers(True) | ||
| precommands = PreCommands() | ||
| target_framework_wo_platform = precommands.framework.split('-')[0] |
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.
Could this be, maybe, extracted and reused? Just in case we ever need to change the logic.
| workload_install_args += ['--from-rollback-file', f'https://aka.ms/dotnet/maui/{target_framework_wo_platform}.json'] | ||
|
|
||
| precommands.install_workload('maui', workload_install_args) | ||
| precommands.existing(projectdir='./dotnet-podcasts',projectfile='./src/Mobile/Microsoft.NetConf2021.Maui.csproj') |
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.
nit: Missing space before projectfile.
|
|
||
| # Download what we need | ||
| with open ("MauiNuGet.config", "wb") as f: | ||
| f.write(requests.get(f'https://raw.githubusercontent.com/dotnet/maui/{target_framework_wo_platform}/NuGet.config', allow_redirects=True).content) |
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.
Maybe this could be "maui" helper as well...
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.
Combined this with the target_framework_wo_platform line making a single install_versioned_maui method.
src/scenarios/mauiandroid/test.py
Outdated
|
|
||
| if __name__ == "__main__": | ||
| if __name__ == "__main__": | ||
| versionsreadjsonfilesaveenv(rf".\{PUBDIR}\versions.json") |
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.
Probably better to follow "standard" naming conventions and use _ in the method name.
| if "PERFLAB_INLAB" in os.environ and os.environ["PERFLAB_INLAB"] == "1": | ||
| os.remove(inputfile) | ||
|
|
||
| def GetVersionFromDllPowershell(dll_path: str): |
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.
Name should be Python-like. You probably had brain in PS mode. :)
| { | ||
| build.AdditionalData["mauiVersion"] = environment.GetEnvironmentVariable("MAUI_VERSION"); | ||
| } | ||
| foreach (DictionaryEntry entry in environment.GetEnvironmentVariables()){ |
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.
Formatting.
…sc spacing, and consolidating reused maui methods into mauisharedpython. Also moved mauisharedpython from its own folder to the general shared folder since it was the only file in the maui specific shared folder.
This enables android mobile testing for Maui in the performance pipeline. This includes adding the scenarios for the Maui runs, adding some version passing capabilities, and a working queue for the runs. The first version of this is #2789, with some main branch specific changes made.
This also includes the updates made to dotnet.py to make getting the commit datetime more resilient, and changes to how _Version environment variables are saved such that they are added dynamically.