-
Notifications
You must be signed in to change notification settings - Fork 241
Create a runtime dedicated to coverage using IL only #2077
Conversation
DependsOnTargets="GenerateWindowsPdbsForAssemblyBeingTested" | ||
Condition="'$(CodeCoverageEnabled)'=='true' and '$(UseCoverageDedicatedRuntime)'=='true'"> | ||
<PropertyGroup> | ||
<CoverageDedicatedRuntimeDir>$(TestHostRootPath)shared/Microsoft.NETCore.App/10.10.10</CoverageDedicatedRuntimeDir> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -16,7 +16,7 @@ | |||
<CodeCoverageEnabled Condition="'$(SkipTests)' != 'true' and '$(RunningOnUnix)' != 'true' and '$(Coverage)' == 'true' and '$(Performance)' != 'true'">true</CodeCoverageEnabled> | |||
<CoverageReportDir Condition="'$(CoverageReportDir)' == ''">$(TestWorkingDir)coverage\</CoverageReportDir> | |||
|
|||
<RestoreIlPdbsWithHardlinks Condition="'$(RestoreIlPdbsWithHardlinks)' == ''">true</RestoreIlPdbsWithHardlinks> | |||
<UseCoverageDedicatedRuntime Condition="'$(UseCoverageDedicatedRuntime)' == ''">true</UseCoverageDedicatedRuntime> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
FYI: Even after reviewed I will hold off merge until I'm able to fully test this in CoreFx (it takes a bit of time to run it when coverage is enabled). |
@pjanotti don't block on my comments if @weshaggard and @vancem are ok with the changes. thanks for fixing this :-) |
Dev box runs for coverage are looking good. |
@weshaggard, please, take a look when you have a chance. |
<RuntimeFiles Include="$(NETCoreAppTestSharedFrameworkPath)il/*.*" /> | ||
<RuntimeFilesAmd64 Include="$(NETCoreAppTestSharedFrameworkPath)amd64/*.*" /> | ||
<RuntimeFilesx86 Include="$(NETCoreAppTestSharedFrameworkPath)x86/*.*" /> | ||
<RuntimeWindowsPdbs Include="$(NETCoreAppTestSharedFrameworkPath)WindowsPDB/*.*" /> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
DestinationFolder="$(CoverageDedicatedRuntimeDir)" | ||
SkipUnchangedFiles="true" | ||
UseHardlinksIfPossible="false" /> | ||
<Copy SourceFiles="@(RuntimeFilesAmd64)" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
"runtimeOptions": { | ||
"framework": { | ||
"name": "Microsoft.NETCore.App", | ||
"version": "10.10.10" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I asked a couple questions but the general approach looks good. |
I had to add some explicit copying/deleting for the runtimeconfig.json since SupplementalTestData by default use hard links (we don't want to overwrite the one using the "default" shared test runtime). Planning to merge as soon as tests are passing. |
This reverts commit 807e269.
This allows OpenCover to get source information for CoreLib (perhaps an issue to be investigated separately, since in theory it should have worked with the ni image and respective PDB). It also makes easier to experiment with tools that perform IL rewrite instead of relying on Profiler API.
Related to https://github.com/dotnet/corefx/issues/23588