Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Create a runtime dedicated to coverage using IL only - #2077

Merged
pjanotti merged 3 commits into
dotnet:masterfrom
pjanotti:il.runtime.for.coverage
Jun 28, 2018
Merged

pjanotti merged 3 commits into
dotnet:masterfrom
pjanotti:il.runtime.for.coverage

Conversation

@pjanotti

Copy link
Copy Markdown

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

@pjanotti pjanotti self-assigned this Jun 22, 2018
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.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

<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.

This comment was marked as spam.

@pjanotti

Copy link
Copy Markdown
Author

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).

@tarekgh

tarekgh commented Jun 22, 2018

Copy link
Copy Markdown
Member

@pjanotti don't block on my comments if @weshaggard and @vancem are ok with the changes. thanks for fixing this :-)

@pjanotti

Copy link
Copy Markdown
Author

Dev box runs for coverage are looking good.

@pjanotti

Copy link
Copy Markdown
Author

@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.

DestinationFolder="$(CoverageDedicatedRuntimeDir)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="false" />
<Copy SourceFiles="@(RuntimeFilesAmd64)"

This comment was marked as spam.

This comment was marked as spam.

"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "10.10.10"

This comment was marked as spam.

This comment was marked as spam.

@weshaggard

Copy link
Copy Markdown
Member

I asked a couple questions but the general approach looks good.

@pjanotti

Copy link
Copy Markdown
Author

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants