You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Attempting to run coverage tests under a path that differs from compilation fails to instrument correctly causing no coverage to be reported, even with deterministic builds.
To Reproduce
I have created a github workflow that reproduces the error in the simple case. The first test runs and provides coverage, the second test passes but no coverage is recorded (see diag log file). The only different is the path under which they execute in the test jobs.
Expected behavior
I would expect that with deterministic build the coverage report should be the same regardless of the folder in which the test was executed.
Actual behavior
Coverage for first test in same folder as compilation shows 100% coverage. Coverage for second test in a different folder to compilation shows "N/A" coverage due to failure to instrument - logs show "pdb without any local source files" for AUT.
Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? - 6.0.4
* Which version of .NET is the code running on? - 8.0.405 (latest patch)
* What OS and version, and what distro if applicable? - Ubuntu
* What is the architecture (x64, x86, ARM, ARM64)? - x64
* Do you know whether it is specific to that configuration? - I believe not as I've seen the same issue under Windows
Additional context
This is a simple reproduction of a case seen in CI where the build machine and test machine paths are completely different between building the test and running them. Generally we have separate build and test machines with different specs.
I have read through known issues and I believe this is a requested case for failure to provide coverage for deterministic builds.
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to run coverage tests under a path that differs from compilation fails to instrument correctly causing no coverage to be reported, even with deterministic builds.
To Reproduce
I have created a github workflow that reproduces the error in the simple case. The first test runs and provides coverage, the second test passes but no coverage is recorded (see diag log file). The only different is the path under which they execute in the test jobs.
See github action https://github.com/richardjm/RichardJM.Coverlet/actions
Expected behavior
I would expect that with deterministic build the coverage report should be the same regardless of the folder in which the test was executed.
Actual behavior
Coverage for first test in same folder as compilation shows 100% coverage. Coverage for second test in a different folder to compilation shows "N/A" coverage due to failure to instrument - logs show "pdb without any local source files" for AUT.
Screenshot showing deterministic pdb:
CoverletSourceRootMapping contents
Diag log from failing coverage:
Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? - 6.0.4
* Which version of .NET is the code running on? - 8.0.405 (latest patch)
* What OS and version, and what distro if applicable? - Ubuntu
* What is the architecture (x64, x86, ARM, ARM64)? - x64
* Do you know whether it is specific to that configuration? - I believe not as I've seen the same issue under Windows
Additional context
This is a simple reproduction of a case seen in CI where the build machine and test machine paths are completely different between building the test and running them. Generally we have separate build and test machines with different specs.
I have read through known issues and I believe this is a requested case for failure to provide coverage for deterministic builds.
The text was updated successfully, but these errors were encountered: