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 native aot runtime tests on cet compatible machines #105288

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion eng/pipelines/coreclr/runtime-nativeaot-outerloop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ extends:

#
# CoreCLR NativeAOT checked build and Pri0 tests
# Only when CoreCLR is changed
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down Expand Up @@ -189,3 +188,37 @@ extends:
parameters:
testGroup: innerloop
liveLibrariesBuildConfig: Release

#
# CoreCLR NativeAOT checked build and Pri0 tests
# Test windows_x64 with CET and CFG
#
- 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
helixQueueGroup: cet
buildConfig: Checked
platforms:
- windows_x64
variables:
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
timeoutInMinutes: 300 # doesn't normally take this long, but we have had Helix queues backed up for over an hour
nameSuffix: NativeAOT_Pri0_CET_CFG
buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false
postBuildSteps:
- template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
parameters:
creator: dotnet-bot
testBuildArgs: 'nativeaot /p:IlcUseServerGc=false /p:ControlFlowGuard=Guard'
liveLibrariesBuildConfig: Release
testRunNamePrefixSuffix: NativeAOT_Pri0_CET_CFG_$(_BuildConfig)
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
parameters:
testGroup: innerloop
liveLibrariesBuildConfig: Release
1 change: 1 addition & 0 deletions src/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
<GroupBuildCmd Condition="'$(ServerGarbageCollection)' != ''">$(GroupBuildCmd) "/p:ServerGarbageCollection=$(ServerGarbageCollection)"</GroupBuildCmd>
<GroupBuildCmd>$(GroupBuildCmd) "/p:CLRTestBuildAllTargets=$(CLRTestBuildAllTargets)"</GroupBuildCmd>
<GroupBuildCmd>$(GroupBuildCmd) "/p:UseCodeFlowEnforcement=$(UseCodeFlowEnforcement)"</GroupBuildCmd>
<GroupBuildCmd Condition="'$(ControlFlowGuard)' != ''">$(GroupBuildCmd) "/p:ControlFlowGuard=$(ControlFlowGuard)"</GroupBuildCmd>
<GroupBuildCmd>$(GroupBuildCmd) "/p:__TestGroupToBuild=$(__TestGroupToBuild)"</GroupBuildCmd>
<GroupBuildCmd>$(GroupBuildCmd) "/p:__SkipRestorePackages=1"</GroupBuildCmd>
<GroupBuildCmd>$(GroupBuildCmd) /nodeReuse:false</GroupBuildCmd>
Expand All @@ -625,7 +626,7 @@
<Target Name="CheckTestBuildStep"
DependsOnTargets="CheckTestBuild"
Condition="'$(__BuildTestWrappersOnly)' != '1' and '$(__GenerateLayoutOnly)' != '1' and '$(__CopyNativeTestBinaries)' != '1' and !$(MonoAot) and !$(MonoFullAot)" />

Check failure on line 629 in src/tests/build.proj

View check run for this annotation

Azure Pipelines / runtime-nativeaot-outerloop (Build linux-x64 Checked NativeAOT_Pri0)

src/tests/build.proj#L629

src/tests/build.proj(629,5): error MSB3073: The command ""/__w/1/s/dotnet.sh" msbuild /__w/1/s/src/tests/build.proj /t:Build "/p:TargetArchitecture=x64" "/p:Configuration=Checked" "/p:LibrariesConfiguration=Release" "/p:TasksConfiguration=Checked" "/p:TargetOS=linux" "/p:ToolsOS=" "/p:PackageOS=" "/p:RuntimeFlavor=coreclr" "/p:RuntimeVariant=" "/p:CLRTestBuildAllTargets=" "/p:UseCodeFlowEnforcement=" "/p:__TestGroupToBuild=1" "/p:__SkipRestorePackages=1" /nodeReuse:false /maxcpucount /bl:/__w/1/s/artifacts//log/Checked/InnerManagedTestBuild.1.binlog "/p:CrossBuild=true" "/p:DefaultBuildAllTarget=BuildNativeAot" "/p:IlcUseServerGc=false"" exited with code 1.

Check failure on line 629 in src/tests/build.proj

View check run for this annotation

Azure Pipelines / runtime-nativeaot-outerloop

src/tests/build.proj#L629

src/tests/build.proj(629,5): error MSB3073: The command ""/__w/1/s/dotnet.sh" msbuild /__w/1/s/src/tests/build.proj /t:Build "/p:TargetArchitecture=x64" "/p:Configuration=Checked" "/p:LibrariesConfiguration=Release" "/p:TasksConfiguration=Checked" "/p:TargetOS=linux" "/p:ToolsOS=" "/p:PackageOS=" "/p:RuntimeFlavor=coreclr" "/p:RuntimeVariant=" "/p:CLRTestBuildAllTargets=" "/p:UseCodeFlowEnforcement=" "/p:__TestGroupToBuild=1" "/p:__SkipRestorePackages=1" /nodeReuse:false /maxcpucount /bl:/__w/1/s/artifacts//log/Checked/InnerManagedTestBuild.1.binlog "/p:CrossBuild=true" "/p:DefaultBuildAllTarget=BuildNativeAot" "/p:IlcUseServerGc=false"" exited with code 1.
<Target Name="GenerateLayout"
DependsOnTargets="CreateTestOverlay"
AfterTargets="ManagedBuild;RestorePackages"
Expand Down
7 changes: 7 additions & 0 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,13 @@
</ExcludeList>
</ItemGroup>

<!-- NativeAOT ControlFlowGuard specific -->
<ItemGroup Condition="'$(XunitTestBinBase)' != '' and '$(TestBuildMode)' == 'nativeaot' and '$(RuntimeFlavor)' == 'coreclr' and '$(ControlFlowGuard)' == 'Guard'">
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b425314/b425314/**">
<Issue>https://github.com/dotnet/runtime/issues/107418</Issue>
</ExcludeList>
</ItemGroup>

<!-- run.proj finds all the *.cmd/*.sh scripts in a test folder and creates corresponding test methods.
Exclude these scripts to avoid creating such methods for the superpmicollect dependent test projects
and running them separately from superpmicollect test. These should be excluded regardless of RuntimeFlavor/os/arch-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(CLRTestBashPreCommands)

<CLRTestBatchPreCommands><![CDATA[
$(CLRTestBatchPreCommands)
powershell -Command "(Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] public static extern int IsProcessorFeaturePresent(int ProcessorFeature);' -Name W -PassThru)::IsProcessorFeaturePresent(41)"
powershell -Command "exit (Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] public static extern int IsProcessorFeaturePresent(int ProcessorFeature)%3B' -Name W -PassThru)::IsProcessorFeaturePresent(41)"
IF %ERRORLEVEL% EQU 0 (
echo No support for AVX512, test not applicable.
exit /B 0
Expand Down
Loading