Skip to content

Conversation

@trylek
Copy link
Member

@trylek trylek commented Dec 3, 2021

These three projects apparently already use the [Fact] model;
this causes trouble in the switch-over to support new-style merged
test wrappers as the system believes these are standalone tests
due to the explicit Exe output type specification and and they fail
to provide a Main method. Thanks to Jeremy's source generation
change we can now tag them as "new-style tests".

Thanks

Tomas

These three projects apparently already use the [Fact] model;
this causes trouble in the switch-over to support new-style merged
test wrappers as the system believes these are standalone tests
due to the explicit Exe output type specification and and they fail
to provide a Main method. Thanks to Jeremy's source generation
change we can now tag them as "new-style tests".

Thanks

Tomas
@ghost
Copy link

ghost commented Dec 3, 2021

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

These three projects apparently already use the [Fact] model;
this causes trouble in the switch-over to support new-style merged
test wrappers as the system believes these are standalone tests
due to the explicit Exe output type specification and and they fail
to provide a Main method. Thanks to Jeremy's source generation
change we can now tag them as "new-style tests".

Thanks

Tomas

Author: trylek
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: -

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

Isn't it the case that <OutputType>Exe</OutputType> is the default, so we could just remove it from all proj files?

@kasperk81
Copy link
Contributor

<OutputType>Library</OutputType> is the default one.

@trylek
Copy link
Member Author

trylek commented Dec 3, 2021

@BruceForstall - in fact Library is the CLI default and I have already removed it from the vast majority of instances. Or, to be more precise, the default is kinda dynamic, in some cases we end up transforming the Library default into Exe based on project characteristics and build mode, the current logic is sadly very non-trivial. I hope the refactoring will ultimately make it easier to reason about but I have no clear demonstration of the conjecture yet.

@trylek
Copy link
Member Author

trylek commented Dec 3, 2021

As of my pending WIP PR, the switch-over state machine is such as deleting the <OutputType>Exe</OutputType> clause from the project file marks the project as merged for ilproj files so that they no longer get run separately unless BuildAsStandalone is specified (we believe we still need a "legacy mode" in which the merged wrappers are ignored and tests continue getting built and executed one-by-one).

@trylek trylek merged commit db1710a into dotnet:main Dec 4, 2021
@trylek trylek deleted the PreexistingFactTests branch December 4, 2021 20:41
@ghost ghost locked as resolved and limited conversation to collaborators Jan 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants