未验证 提交 213600c1 编写于 作者: F Fan Yang 提交者: GitHub

[Mono] Enable runtime tests to run on Android x64 with interpreter (#54084)

* Enable Android x64 with interpreter

* Make variable RuntimeVariant available for testenvironment

* Pass down runtimeVariant

* Verify that tests are running with interpreter

* Pass MONO_ENV_OPTIONS value to the app

* Set ForceInterpreter to true

* Change default value for interp to false

* dummy commit

* dummy commit 2

* dummy commit

* Configure interp for Android

* Pass RuntimeVariant down as a parameter

* Add issue link

* Enable Mono with interpreter on desktop

* Disable Android x64 with JIT

* Revert hacks to enable all lanes

* revert unintentional change

* Disable Vector128_1_r*
上级 2bc86980
......@@ -26,7 +26,7 @@ parameters:
steps:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -excludemonofailures os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -excludemonofailures os ${{ parameters.osGroup }} ${{ parameters.archType }} /p:RuntimeVariant=${{ parameters.runtimeVariant }} $(buildConfigUpper)
displayName: Build Tests
# Send tests to Helix
......@@ -40,6 +40,7 @@ steps:
coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr
runtimeFlavorDisplayName: ${{ parameters.runtimeFlavorDisplayName }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
runtimeVariant: ${{ parameters.runtimeVariant }}
${{ if eq(variables['System.TeamProject'], 'public') }}:
creator: $(Build.DefinitionName)
......
......@@ -298,6 +298,44 @@ jobs:
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
#
# Build the whole product using Mono for Android and run runtime tests with interpreter
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- Android_x64
variables:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: pr/dotnet/runtime/$(Build.SourceBranch)
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_RuntimeTests
buildArgs: -s mono+libs -c $(_BuildConfig)
timeoutInMinutes: 240
runtimeVariant: monointerpreter
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
#
# Build the whole product using Mono for Android and run runtime tests with Android devices
......
......@@ -3,6 +3,7 @@ MONO_ARCH?=x64
DOTNET := ../../../../dotnet.sh
USE_LLVM=true
AOT=false
INTERP=false
DEPLOY_AND_RUN?=true
#If DIAGNOSTIC_PORTS is enabled, RUNTIME_COMPONENTS must also be enabled.
......@@ -26,6 +27,7 @@ run:
/p:Configuration=$(MONO_CONFIG) \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:ForceAOT=$(AOT) \
/p:MonoForceInterpreter=$(INTERP) \
/p:UseLLVM=$(USE_LLVM) \
/p:RunActivity=false \
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \
......
......@@ -193,7 +193,7 @@
<_TestEnvFileLine Include="@(_COMPlusVariable->'set %(Identity)=%(Value)')" />
<!-- Mono interpreter -->
<_TestEnvFileLine Include="set MONO_ENV_OPTIONS=--interpreter" Condition="'$(Scenario)' == 'interpreter'" />
<_TestEnvFileLine Condition="'$(RuntimeVariant)' == 'monointerpreter'" Include="set MONO_ENV_OPTIONS=--interpreter" />
<!-- CLR interpreter -->
<_TestEnvFileLine Condition="'$(Scenario)' == 'clrinterpreter'" Include="set COMPlus_Interpret=%2A" /> <!-- %2A is asterisk / wildcard -->
......@@ -208,7 +208,7 @@
<_TestEnvFileLine Include="@(_COMPlusVariable->'export %(Identity)=%(Value)')" />
<!-- Mono interpreter -->
<_TestEnvFileLine Include="export MONO_ENV_OPTIONS=--interpreter" Condition="'$(Scenario)' == 'interpreter'" />
<_TestEnvFileLine Condition="'$(RuntimeVariant)' == 'monointerpreter'" Include="export MONO_ENV_OPTIONS=--interpreter" />
<!-- Hack: Use Mono LLVM JIT when JIT-compiling the non-AOT-compiled parts of the runtime tests -->
<_TestEnvFileLine Condition="'$(RuntimeVariant)' == 'llvmaot'" Include="export MONO_ENV_OPTIONS=--llvm" />
......
此差异已折叠。
......@@ -648,6 +648,8 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
<AndroidAbi Condition="'$(TargetArchitecture)' == 'arm'">armeabi-v7a</AndroidAbi>
<AndroidAbi Condition="'$(TargetArchitecture)' == 'x64'">x86_64</AndroidAbi>
<AndroidAbi Condition="'$(TargetArchitecture)' == 'x86'">x86</AndroidAbi>
<MonoInterp>false</MonoInterp>
<MonoInterp Condition="'$(RuntimeVariant)' == 'monointerpreter'">true</MonoInterp>
</PropertyGroup>
<RemoveDir Directories="$(AppDir)" />
......@@ -683,14 +685,16 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
ProjectName="$(Category)"
MonoRuntimeHeaders="$(MicrosoftNetCoreAppRuntimePackDir)/native/include/mono-2.0"
StripDebugSymbols="$(StripDebugSymbols)"
ForceInterpreter="$(MonoInterp)"
AppDir="$(BuildDir)"
OutputDir="$(AppDir)">
<Output TaskParameter="ApkBundlePath" PropertyName="ApkBundlePath" />
<Output TaskParameter="ApkPackageId" PropertyName="ApkPackageId" />
</AndroidAppBuilderTask>
<Move SourceFiles="$(ApkBundlePath)" DestinationFiles="$(FinalApkPath)" />
<Message Importance="High" Text="Apk: $(FinalApkPath)"/>
<Message Importance="High" Text="PackageId: $(ApkPackageId)"/>
<Message Importance="High" Text="Apk: $(FinalApkPath)"/>
<Message Importance="High" Text="PackageId: $(ApkPackageId)"/>
<Message Importance="High" Text="MonoInterp: $(MonoInterp)"/>
<!-- delete the BuildDir in CI builds to save disk space on build agents since they're no longer needed -->
<RemoveDir Condition="'$(ContinuousIntegrationBuild)' == 'true'" Directories="$(BuildDir)" />
</Target>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册