Explicitly mark tests with CLRTestKind=SharedLibrary (#61235)
authorTomáš Rylek <trylek@microsoft.com>
Thu, 11 Nov 2021 00:02:28 +0000 (01:02 +0100)
committerGitHub <noreply@github.com>
Thu, 11 Nov 2021 00:02:28 +0000 (01:02 +0100)
commitfd64e64a207a99b55e90907d3fd31fff6c43d3f1
tree201ad9e50915274a8ae35754434f5c3c74cf18b3
parent9a883b5232df4a255302a758d025109c051e3692
Explicitly mark tests with CLRTestKind=SharedLibrary (#61235)

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.

Fix OutputType=exe in OpenDelegate.csproj

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
32 files changed:
src/tests/CoreMangLib/system/delegate/VSD/OpenDelegate.csproj
src/tests/Directory.Build.targets
src/tests/FunctionalTests/WebAssembly/Browser/HotReload/ApplyUpdateReferencedAssembly/ApplyUpdateReferencedAssembly.csproj
src/tests/Interop/COM/Activator/Servers/AssemblyA.csproj
src/tests/Interop/COM/Activator/Servers/AssemblyB.csproj
src/tests/Interop/COM/Activator/Servers/AssemblyC.csproj
src/tests/Interop/COM/Activator/Servers/AssemblyContracts.csproj
src/tests/Interop/COM/NETServer/NETServer.DefaultInterfaces.ilproj
src/tests/Interop/COM/NETServer/NETServer.csproj
src/tests/Interop/ICustomMarshaler/ConflictingNames/CustomMarshaler.csproj
src/tests/Interop/ICustomMarshaler/ConflictingNames/CustomMarshaler2.csproj
src/tests/Interop/NativeLibrary/AssemblyLoadContext/TestAsm/TestAsm.csproj
src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorUtil.ilproj
src/tests/Interop/PInvoke/Miscellaneous/MultipleAssembliesWithSamePInvoke/ManagedDll1/ManagedDll1.csproj
src/tests/Interop/PInvoke/Miscellaneous/MultipleAssembliesWithSamePInvoke/ManagedDll2/ManagedDll2.csproj
src/tests/Interop/SuppressGCTransition/SuppressGCTransitionUtil.ilproj
src/tests/Interop/UnmanagedCallConv/PInvokesIL.ilproj
src/tests/Interop/UnmanagedCallersOnly/InvalidCSharp.ilproj
src/tests/JIT/Regression/JitBlue/GitHub_22583/base.csproj
src/tests/JIT/Regression/JitBlue/GitHub_22583/lib.csproj
src/tests/Regressions/coreclr/22021/provider.ilproj
src/tests/baseservices/callconvs/CallFunctionPointers.ilproj
src/tests/baseservices/compilerservices/RuntimeWrappedException/StringThrower.ilproj
src/tests/baseservices/compilerservices/modulector/moduleCctor.ilproj
src/tests/baseservices/typeequivalence/contracts/TypeContracts.csproj
src/tests/baseservices/typeequivalence/impl/TypeImpl.csproj
src/tests/ilverify/ILTests/ILTests.targets
src/tests/profiler/unittest/unloadlibrary.csproj
src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapProvider.ilproj
src/tests/reflection/DefaultInterfaceMethods/InvokeProvider.ilproj
src/tests/reflection/RefEmit/Dependency.csproj
src/tests/reflection/StaticInterfaceMembers/provider.ilproj