-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add basic testing infrastructure in NativeAOT (port from dotnet/linker) #70408
Add basic testing infrastructure in NativeAOT (port from dotnet/linker) #70408
Conversation
tlakollo
commented
Jun 7, 2022
•
edited
Loading
edited
- Port the Mono.Linker.Tests* projects from dotnet/linker
- Add the new projects to .editorconfig so they remain under the dotnet/linker format instead of dotnet/runtime
- clr.toolstests subset now runs the Mono.Linker.Tests infrastructure
- Make DisplayNameHelpers a public class so it can be used by the test infrastructure
- Add a couple of simple test cases (Dataflow and Requires) along with a Repro test, just like the repro project the repro test serves prototyping purposes
- Adds ProducedBy.NativeAOT to be able to represent differences between dotnet/linker and NativeAOT (either because of a bug or because NativeAOT correctly produces additional warnings)
Add the new projects to .editorconfig so they remain under the dotnet/linker format instead of dotnet/runtime clr.toolstests subset now runs the Mono.Linker.Tests infrastructure Make DisplayNameHelpers a public class so it can be used by the test infrastructure Add couple of simple test cases
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
verifiable Remove deleted folder structures set in TestDatabase
{ | ||
private const string DefaultSystemModule = "System.Private.CoreLib"; | ||
|
||
public void Trim (ILCompilerOptions options, ILogWriter logWriter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MichalStrehovsky could you please review this method? It's basically the main part of this change - this runs enough of the ILScanner to get diagnostics.
The rest of this change is mostly making stuff work in XUnit and test adaptations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
We could potentially simplify things here:
- I don't think OS/arch matters at all - we could just say we're compiling for x64 Windows and be done with it - if we keep the logic to detect it, it will need fixes whenever a new OS/arch is adde)
- The list of InitAssemblies probably doesn't matter and we could skip that. JanK is deleting various System.Private assemblies so having this list just means more things to fix up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
src/coreclr/tools/aot/Mono.Linker.Tests/Mono.Linker.Tests.csproj
Outdated
Show resolved
Hide resolved
{ | ||
private const string DefaultSystemModule = "System.Private.CoreLib"; | ||
|
||
public void Trim (ILCompilerOptions options, ILogWriter logWriter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
We could potentially simplify things here:
- I don't think OS/arch matters at all - we could just say we're compiling for x64 Windows and be done with it - if we keep the logic to detect it, it will need fixes whenever a new OS/arch is adde)
- The list of InitAssemblies probably doesn't matter and we could skip that. JanK is deleting various System.Private assemblies so having this list just means more things to fix up.
/azp run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |