Several libraries had their code coverage disabled due to unknown problems. The change to a more recent version of OpenCover appears to have addressed whatever those issues were, as the problems no longer repro. This commit just re-enables the code coverage for those libraries.
The only remaining library with its code coverage disabled is System.Diagnostics.Process.dll. It's either hanging or just taking a really long time to complete. Investigation still needed.
Commit migrated from https://github.com/dotnet/corefx/commit/01c18f27d5a6c383701e0407b55e6edfae203309
The existing "hardening tests" were duplicative of a bunch of things covered once the rest of the dataflow tests were rewritten. They also involved lots of timeouts that made them unstable, especially in a lab environment. I'm deleted the whole file and added some additional tests throughout the rest of the suite to make up for a few remaining deficiencies. I also removed a bit of dead code from the product. Code coverage is not at ~93% (after ignoring source like the copy of ConcurrentQueue that's included).
Commit migrated from https://github.com/dotnet/corefx/commit/3cdc8dd1f28807eec703993885d9f4be5e17003d
This change enables code coverage for the corefx project using OpenCover.
* When /p:Coverage=true is passed, we wrap the xunit call in the OpenCover command.
* OpenCover filters test assemblies but no other default filters.
* We disable parallel execution of tests within xunit and parallel project building when running coverage. This appears to cause issues with OpenCover (I see spurious failures in tests) and is actually slower than just running execution serially.
* A few assemblies still have issues even after this. These have coverage disabled with CoverageEnabledForProject. Will open an issue for future investigation.
* After execution is complete, we run the ReportGenerator tool over the set of generated coverage data, creating a full report in bin\tests\coverage.
Commit migrated from https://github.com/dotnet/corefx/commit/60a0bdd4125e39aa1653f2aeffc9eea02f348531
In general, code should avoid caching incomplete Tasks in statically rooted locations or else risk a potentially serious memory leak. Today in Dataflow, the Task returned by DataflowBlock.NullTarget<T>()'s Completion is a statically-cached, never-completing task, which means that any continuations created off of it will be leaked for the duration of the app. This commit changes DataflowBlock.NullTarget<T>() to return a Task specific to that block rather than one statically used across all blocks.
Commit migrated from https://github.com/dotnet/corefx/commit/031a4e1f4a2c3948eb9726b317146d2e0a2d29fa
This overhauls the System.Threading.Tasks.Dataflow test suite, rewriting most of the tests while retaining pieces here and there that made sense.
A large portion of the tests were marked as OuterLoop because they involved long and flaky timeouts, were unreliable, etc. After the rewrite, the vast majority of tests are inner loop, ~260 [Fact]s instead of ~40 (the suite previously rolled a bunch of tests into a single [Fact], tracking their success in a local Boolean), with only a handful remaining as [OuterLoop]. I've not scrubbed through the ConcurrentTests.cs and HardeningTests.cs files, which are still all outer loop and should be reviewed and updated in the future.
With this change, product source code coverage via inner inner loop tests jumps from ~60% to ~90%, while also reducing LOC by several thousand lines in the tests. Further, on my machine the inner loop tests now currently run in ~3 seconds.
Commit migrated from https://github.com/dotnet/corefx/commit/f6515a70353b5584a48fb6a698b575163ff40279
We control the targeting centrally and we shouldn't be retargeting
from VS. With the new support for running tests on F5, it is best
to be able to see and edit the command line in the property pages.
Before this, we had an arbitrary mix of the guids being present or
not anyhow. At some point, if we need to set it, we can put it back
across the board and hopefully by then we'll have proper VS test
integration anyhow.
Commit migrated from https://github.com/dotnet/corefx/commit/da9663498c4f5e6bb663e97531afc48964ffbdd0
Changed usage of 'var' in TPL Dataflow to match with .NET Core guidelines. 'var' is now only used when the right-hand side of a variable declaration is a constructor, a cast, or factory method where the resulting type is obvious.
Commit migrated from https://github.com/dotnet/corefx/commit/dca17056f7cf8a896d3d638a103dd344e4724bcd
The xunit project was forked to target .NET Core. The test
compile-time dependencies and some run-time dependencies were
forked and are planned to flow upstream to xunit in the short term.
The console runner (xunit.console.netcore) is in the
dotnet/buildtools repository because it depends on a contract
(System.Console) that is not available in a portable targeting pack.
Commit migrated from https://github.com/dotnet/corefx/commit/37f34aa3b9b281bf78a4e00ff3ebbe8da31b0f41
Added */tests/*.csproj file to dirs.proj list of projects to build.
There are some tests like the MetadataReaderTests that build against desktop
framework and so that project needed some hacking to get the correct props used,
we should fix that at another point.
Commit migrated from https://github.com/dotnet/corefx/commit/f5f9d189457df676f857c2e589a30795a6e1f8fa
This is the initial change to switch to using common targets across the repo.
This change adds a dir.props and dir.targets file that each project file will
import at the top and bottom of the project to default a lot of the common properties
and targets.
Commit migrated from https://github.com/dotnet/corefx/commit/3d95f9cf6e4532df595dd1c694079415afe7d212
Every time the Dataflow solution opens (and Test Explorer is used) VS2013 adds this tag to the project. Just concede to the IDE and allow it to be added to the project and check into SCC so that the project doesn't get constantly dirtied by the IDE.
It appears this tag already is in all the other test projects. This recently added test project had not yet been 'tainted', so this takes care of that.
Commit migrated from https://github.com/dotnet/corefx/commit/3198574cf7c7e66a1950c667301ff4feb0884c36