Skip to content

Add DependencyAnalysisFramework tests from CoreRT repo#130849

Open
MichalStrehovsky wants to merge 2 commits into
dotnet:mainfrom
MichalStrehovsky:daftests
Open

Add DependencyAnalysisFramework tests from CoreRT repo#130849
MichalStrehovsky wants to merge 2 commits into
dotnet:mainfrom
MichalStrehovsky:daftests

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

We forgot these in the CoreRT repo. DependencyAnalysisFramework originally moved here with crossgen2, but without the testing. First commit just copies file over, second commit hooks them up to the build.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the missing ILCompiler.DependencyAnalysisFramework unit test project to the runtime repo and wires it into the CoreCLR tools test subset so it participates in CI/tool test runs.

Changes:

  • Adds TestGraph test infrastructure for exercising static, conditional, and dynamic dependency marking.
  • Adds xUnit tests validating dependency marking behavior across logging strategies and validating DGML output shape.
  • Hooks the new test project into the +clr.toolstests+ subset build/test list.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework.Tests/TestGraph.cs Adds a small test graph/node model used by the unit tests to drive the dependency analyzer.
src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework.Tests/DependencyAnalysisFrameworkTests.cs Adds xUnit tests for dependency marking and DGML output across different log strategies.
src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework.Tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj Introduces the new test project and references the DependencyAnalysisFramework project + xUnit extensions.
eng/Subsets.props Ensures the new test project runs as part of the clr.toolstests subset.

Comment on lines +6 to +8
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Comment on lines +108 to +111
public void AddRoot(string nodeNode, string reason)
{
_analyzer.AddRoot(this.GetNode(nodeNode), reason);
}
Comment on lines +3 to +6
<AssemblyName>ILCompiler.DependencyAnalysisFramework.Tests</AssemblyName>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<Configurations>Debug;Release;Checked</Configurations>
<TestRunnerAdditionalArguments>-notrait category=failing</TestRunnerAdditionalArguments>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants