Skip to content

Commit

Permalink
Run NativeAOT tests when ILLink changes (#88934)
Browse files Browse the repository at this point in the history
NativeAOT uses code from ILLinker - specifically we share lot of tests. So if these change we want to make sure it didn't break their usage in NativeAOT.

The comment change in the tests is to trigger this new rule in the CI - but we can keep the comment regardless.
  • Loading branch information
vitek-karas committed Jul 17, 2023
1 parent 6bd93db commit 2fc318d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,11 @@ extends:
buildArgs: -s clr.aot+clr.iltools+libs+clr.toolstests -c $(_BuildConfig) -test
enablePublishTestResults: true
testResultsFormat: 'xunit'
# We want to run AOT tests when illink changes because there's share code and tests from illink which are used by AOT
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
eq(variables['isRollingBuild'], true))
# Build Mono AOT offset headers once, for consumption elsewhere
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void TestArrayWithInitializerMultipleElementsStaticType ()
Type[] arr = new Type[] { typeof (TestType), typeof (TProperties), typeAll };
arr[0].RequiresAll ();
arr[1].RequiresPublicProperties ();
arr[1].RequiresPublicFields (); // Should warn
arr[1].RequiresPublicFields (); // Should warn - member types mismatch
arr[2].RequiresAll ();
arr[3].RequiresPublicMethods (); // Should warn - unknown value at this index
}
Expand Down

0 comments on commit 2fc318d

Please sign in to comment.