-
Notifications
You must be signed in to change notification settings - Fork 9
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 test for source-built bundled NativeAOT. #113
Conversation
if (Commands.HasFlag(DotNetSdkActions.PublishAot)) | ||
{ | ||
// Non-portable bundled AOT Compiler. | ||
if (isNonPortable && !dotNetHelper.IsMonoRuntime) |
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.
Ideally, this would be skipped at the test level with SkippableFact
. This should be possible because, at a minimum, the SDK root location is known via environment variable. If that approach doesn't work out, it'd be good to at least write something to the output, via DotNetHelper.OutputHelper
, that this is being skipped and the reason why.
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.
Ideally, this would be skipped at the test level with SkippableFact.
The project has no reference to a library that provides SkippableFact
. What implementation should be used? Should it be a project reference, or do we want to include the sources into the project?
(isNonPortable && !dotNetHelper.IsMonoRuntime)
Currently, this check is made when the test class was instantiated.
To work nicely with SkippableFact
we probably want to have a static
check and for that ScenarioTestFixture
would be refactored into a static class
.
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.
Actually, it looks like there's already an existing pattern for skipping tests in this repo. It uses the Trait
attribute. For example, it skips tests based on platform with this:
filters.ExcludedTraits.Add("SkipIfPlatform", new List<string>() {$"{platform}"}); |
It'd be good if that pattern could be used here.
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.
ok, I'll follow that pattern. The trait would be something like: "BundledAotCompiler"
?
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.
Yeah, something like that.
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.
I hadn't used XunitFilters
before. From looking at it closer, the IncludedTraits
requires all tests to have that trait, so I instead of an included trait ("BundledAotCompiler"
), I've implemented it using excluded traits (!"Portable", !"Mono"
).
@mthalman ptal.
…res) to release/9.0. (#119)
Contributes to dotnet/source-build#1215.
cc @MichaelSimons @jkotas @omajid