Skip to content

Explicitly mark tests with CLRTestKind=SharedLibrary - #61235

Merged
trylek merged 3 commits into
dotnet:mainfrom
trylek:SharedLibraryTestKind
Nov 11, 2021
Merged

Explicitly mark tests with CLRTestKind=SharedLibrary#61235
trylek merged 3 commits into
dotnet:mainfrom
trylek:SharedLibraryTestKind

Conversation

@trylek

Copy link
Copy Markdown
Member

Previously the Directory.Build.targets script used to automatically
infer that OutputType=Library without a CLRTestKind implies
SharedLibrary. This is however hard to consolidate with the planned
test merging - as the SDK scripts set OutputType=Library by default,
we need the combination Library+(implicit)BuildAndRun to indicate
the "new-style" [Fact]-based tests. For this reason I propose to
remove this automatic inference and manually fix the handful of tests
that are missing an explicit CLRTestKind=SharedLibrary property.

In light of this description we can theoretically remove the
OutputType=Library specification from all test projects but even if
we decide to do that, I believe it will be easier to do it as a
separate mechanical change, not as part of this relatively small
change that has a different purpose. Additionally in the one case
of the GitHub_22583 regression test, I removed the explicit setting
of GenerateRunScript=false because that's the default.

Thanks

Tomas

Contributes to: #54512

/cc @dotnet/runtime-infrastructure

@trylektrylek added the area-Infrastructure-coreclr Only use for closed issues label Nov 5, 2021
@ghost

ghost commented Nov 5, 2021

Copy link
Copy Markdown

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

Issue Details

Previously the Directory.Build.targets script used to automatically
infer that OutputType=Library without a CLRTestKind implies
SharedLibrary. This is however hard to consolidate with the planned
test merging - as the SDK scripts set OutputType=Library by default,
we need the combination Library+(implicit)BuildAndRun to indicate
the "new-style" [Fact]-based tests. For this reason I propose to
remove this automatic inference and manually fix the handful of tests
that are missing an explicit CLRTestKind=SharedLibrary property.

In light of this description we can theoretically remove the
OutputType=Library specification from all test projects but even if
we decide to do that, I believe it will be easier to do it as a
separate mechanical change, not as part of this relatively small
change that has a different purpose. Additionally in the one case
of the GitHub_22583 regression test, I removed the explicit setting
of GenerateRunScript=false because that's the default.

Thanks

Tomas

Contributes to: #54512

/cc @dotnet/runtime-infrastructure

Author:trylek
Assignees:-
Labels:

area-Infrastructure-coreclr

Milestone:-

@trylek
trylekforce-pushed the SharedLibraryTestKind branch from ccfc3c6 to 0961d58CompareNovember 8, 2021 20:10
@trylek

Copy link
Copy Markdown
MemberAuthor

OK, I believe I'm finally out of the woods w.r.t. this change, the formatting failure on Windows x64 seems infrastructural and the GC hole in test45929 is known, I sent out a PR yesterday to temporarily block the test out in issues.targets to stop it from plaguing our outerloop runs; I'm retrying both legs now, please review when you have a chance.

Thanks

Tomas

@trylektrylek closed this Nov 9, 2021
@trylektrylek reopened this Nov 9, 2021
@trylek

Copy link
Copy Markdown
MemberAuthor

Apparently the latest runs have hit #57621. I'm going to push another commit adding it to the issues.targets file and re-run the outerloop unless @kouvel has other suggestions.

@kouvel

Copy link
Copy Markdown
Contributor

Sounds good to me @trylek, I haven't looked at that test yet

Previously the Directory.Build.targets script used to automatically
infer that OutputType=Library without a CLRTestKind implies
SharedLibrary. This is however hard to consolidate with the planned
test merging - as the SDK script set OutputType=Library by default,
we need the combination Library+(implicit)BuildAndRun to indicate
the "new-style" [Fact]-based tests. For this reason I propose to
remove this automatic inference and manually fix the handful of tests
that are missing an explicit CLRTestKind=SharedLibrary property.
In light of this description we can theoretically remove the
OutputType=Library specification from all test projects but even if
we decide to do that, I believe it will be easier to do that as a
separate mechanical change, not as part of this relatively small
change that has a different purpose. Additionally in the one case
of the GitHub_22583 regression test, I removed the explicit setting
of GenerateRunScript=false because that's the default.
Thanks
Tomas
I believe this was a pre-existing bug - previously, with the
special clause regarding SharedLibrary, the test just got silently
skipped because it was considered to be a shared library.
Thanks
Tomas
@trylek
trylekforce-pushed the SharedLibraryTestKind branch from 0961d58 to aac6425CompareNovember 10, 2021 20:52
@trylek

Copy link
Copy Markdown
MemberAuthor

The outerloop and PR run have passed, I don't see how library test runs could be affected by my change only targeting CoreCLR tests and I believe the one Mono failure to be unrelated to my change, merging in.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure-coreclrOnly use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@trylek@kouvel@jkoritzinsky