forked from dotnet/performance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[perf][nativeaot] Add Native AOT performance measurements for iOS (#3145
- Loading branch information
1 parent
a3cea63
commit e5ca99f
Showing
10 changed files
with
147 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
''' | ||
post cleanup script | ||
''' | ||
|
||
from shared.postcommands import clean_directories | ||
|
||
clean_directories() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
''' | ||
pre-command | ||
''' | ||
import shutil | ||
import sys | ||
import subprocess | ||
from performance.logger import setup_loggers, getLogger | ||
from shared import const | ||
from shared.mauisharedpython import remove_aab_files, install_versioned_maui | ||
from shared.precommands import PreCommands | ||
from shared.versionmanager import versions_write_json, get_version_from_dll_powershell_ios | ||
from test import EXENAME | ||
|
||
setup_loggers(True) | ||
|
||
precommands = PreCommands() | ||
install_versioned_maui(precommands) | ||
|
||
# Setup the Xamarin folder | ||
precommands.new(template='ios', | ||
output_dir=const.APPDIR, | ||
bin_dir=const.BINDIR, | ||
exename=EXENAME, | ||
working_directory=sys.path[0], | ||
no_restore=False) | ||
|
||
# Build the APK | ||
shutil.copy('./MauiNuGet.config', './app/Nuget.config') | ||
precommands.execute(['/p:_RequireCodeSigning=false', '/p:ApplicationId=net.dot.xamarintesting']) | ||
|
||
# Remove the aab files as we don't need them, this saves space | ||
output_dir = const.PUBDIR | ||
if precommands.output: | ||
output_dir = precommands.output | ||
remove_aab_files(output_dir) | ||
|
||
# Copy the XamarinVersion to a file so we have it on the machine | ||
xamarin_version = get_version_from_dll_powershell_ios(rf"./{const.APPDIR}/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.iOS.dll") | ||
version_dict = { "xamarinVersion": xamarin_version } | ||
versions_write_json(version_dict, rf"{output_dir}/versions.json") | ||
print(f"Versions: {version_dict} from location " + rf"./{const.APPDIR}/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.iOS.dll") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
''' | ||
Mobile Xamarin App | ||
''' | ||
from shared.const import PUBDIR | ||
from shared.runner import TestTraits, Runner | ||
from shared.versionmanager import versions_read_json_file_save_env | ||
|
||
EXENAME = 'XamariniOSDefault' | ||
|
||
if __name__ == "__main__": | ||
versions_read_json_file_save_env(rf"./{PUBDIR}/versions.json") | ||
|
||
traits = TestTraits(exename=EXENAME, | ||
guiapp='false', | ||
) | ||
Runner(traits).run() |