Commit Graph
58 Commits
Author SHA1 Message Date
Matt Johnson ccd5e9e34a Fix typos in comments
Commit migrated from https://github.com/dotnet/corefx/commit/4a3d2d5b7b53a6d37fcc54553f5d0f62b2d6cff7
2015-02-18 14:37:35 -08:00
Stephen Toub 150a2f4e75 Re-enable code coverage for (most) disabled libraries
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
2015-02-17 16:44:44 -05:00
Stephen Toub 8cc26c6cc2 Scrubs [ComVisible] attribution from CoreFX library sources
Commit migrated from https://github.com/dotnet/corefx/commit/9189f0a7f60f217a8cfec2d4bdafaf7132d6d067
2015-02-16 13:20:46 -05:00
chcosta d1620100c8 Sync changes from TFS as of 2015/02/16 9:30:00 AM
[tfs-changeset: 1416076]


Commit migrated from https://github.com/dotnet/corefx/commit/67bd740c6c732e141835521ff34b2cc18591a9cc
2015-02-16 09:51:49 -08:00
Stephen Toub 214d0f8c29 Merge pull request dotnet/corefx#742 from ellismg/contract-to-debug-assert
Convert Contract.Assert to Debug.Assert.

Commit migrated from https://github.com/dotnet/corefx/commit/cb9daab7806cd906a1a0abb856e371016f2040e8
2015-02-11 18:19:34 -05:00
Nick Guerrera 9993ab6401 Merge branch 'v1.0' into merge-v1.0
Conflicts:
	src/System.Collections.NonGeneric/tests/ReadOnlyCollectionBase/ReadOnlyCollectionBaseTests.cs
	src/System.Collections.NonGeneric/tests/Stack/Stack_Clone.cs
	src/System.Collections.NonGeneric/tests/Stack/Stack_ToArray.cs
	src/System.Collections.NonGeneric/tests/Stack/Stack_get_SyncRoot.cs
	src/System.Xml.XDocument/tests/axes/Axes.Tests.csproj


Commit migrated from https://github.com/dotnet/corefx/commit/1658a59303d550dc25621bc7c2f73180b9951c6b
2015-02-11 11:55:54 -08:00
Matt Ellis 91409b75fa Replace Contract.Assert with Debug.Assert
Fixes dotnet/corefx#682


Commit migrated from https://github.com/dotnet/corefx/commit/980e41dc6beef8caf4a4369fea2028e1c7cbaf38
2015-02-11 11:55:51 -08:00
Stephen Toub a5fb44e68a Remove a faulty assert in a BufferBlock negative test
Commit migrated from https://github.com/dotnet/corefx/commit/50b881f494a3dd2b4044fbe37c8ace1feee43cb6
2015-02-10 01:20:20 -05:00
Maxwe11 2d635dae1c Replace relative path to common tests with a variable
Replace relative path "..\..\Common\tests" with $(CommonTestPath) variable.


Commit migrated from https://github.com/dotnet/corefx/commit/56dbc6abc6dcde5874c99c67f379d788c8dd4420
2015-02-08 15:05:37 +02:00
Nick Guerrera 96ee8ecc84 Merge pull request dotnet/corefx#688 from dotnet/v1.0
Merge v1.0 -> master

Commit migrated from https://github.com/dotnet/corefx/commit/bd08ac4fe67dd91dac06681a536683f1baf1dada
2015-02-07 15:05:35 -08:00
Stephen Toub e11cf0c397 Merge pull request dotnet/corefx#669 from stephentoub/more_dataflow_tests
Replace dataflow "hardening" tests

Commit migrated from https://github.com/dotnet/corefx/commit/64ac380e7775bdab24361e8da6d1c8c540fbe31d
2015-02-06 17:40:22 -05:00
Stephen Toub eb6f110122 Replace dataflow "hardening" tests
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
2015-02-06 15:24:16 -05:00
Stephen Toub 60764de510 Remove faulty assert in ActionBlock test
The test was asserting that a Post would always be succesful, but the test
was purposefully faulting the block, which could (by design) cause Posts
to fail.


Commit migrated from https://github.com/dotnet/corefx/commit/5d5e03961ab8d89f679936d93cb55b1aaebe3746
2015-02-06 09:48:08 -05:00
Matt Mitchell b2149f1c80 Enable code coverage for the corefx repo
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
2015-02-05 13:11:18 -08:00
Stephen Toub 6017874a92 Merge pull request dotnet/corefx#618 from stephentoub/null_target_task
Avoid caching incomplete task in DataflowBlock.NullTarget

Commit migrated from https://github.com/dotnet/corefx/commit/a44e90353a6dee81955f6ea98e189ce22c23168a
2015-02-04 08:42:11 -05:00
Jeremy Barton b561c6ab1b Remove "TestClosureUsage" test
The TestClosureUsage test is getting different results on the CI system
and my local system.  It has too much variability on system state, and
therefore isn't very helpful in diagnosing problems.


Commit migrated from https://github.com/dotnet/corefx/commit/73044647602098e4049d67b27d3114b4e6f80352
2015-02-03 16:51:13 -08:00
Jeremy Barton 5e346a1e6f Update the expected count of display classes in TestClosureUsage
The conditions that are being tested for do not add up to the same count that the message displays, just due to the way the test is structured.


Commit migrated from https://github.com/dotnet/corefx/commit/fe8193d3d2ed7ce8af66f839500e388d74cdf6b0
2015-02-03 16:00:24 -08:00
Jeremy Barton 716a2df6c1 Update failing [OuterLoop] tests.
One of the tests was updated to have new values, two others were tagged as known issues for https://github.com/dotnet/corefx/issues/614


Commit migrated from https://github.com/dotnet/corefx/commit/74101f6e754eebae15dc044f00622a9107eec632
2015-02-03 14:49:07 -08:00
Stephen Toub 6b992655a2 Avoid caching incomplete task in DataflowBlock.NullTarget
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
2015-02-03 15:32:42 -05:00
Stephen Toub 0b87046404 Remove faulty asserts in dataflow tests
Several ctor tests were asserting that block.Completion.IsCompleted was false, but also creating the block with a canceled cancellation token.  That's erroneous.  But this wasn't caught initially because there's a race.


Commit migrated from https://github.com/dotnet/corefx/commit/a5fe0aaa5124adffe655f3700d878c2494c01e33
2015-01-30 13:49:09 -05:00
Nick Guerrera 51211e7424 Merge pull request dotnet/corefx#550 from nguerrera/set-package-build
Bump package versions to 22512

Commit migrated from https://github.com/dotnet/corefx/commit/368628a8d851d2c1887eff49cc4070a405f9e14a
2015-01-29 10:41:51 -08:00
Stephen Toub 7a146318c5 Overhaul TPL Dataflow Tests
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
2015-01-28 22:40:04 -05:00
Nick Guerrera 1846be8d13 Bump package versions to 22512
Commit migrated from https://github.com/dotnet/corefx/commit/fa62bc6d0ab5e2b413c8930c708969029616a8e0
2015-01-28 17:46:49 -08:00
Nick Guerrera 18d59d59f1 Remove PLIB ProjectTypeGuids to allow editing debug options in VS
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
2015-01-22 16:30:00 -08:00
Matt Cohn 8866083943 Merge branch 'master' into netcore
Conflicts:
	build.proj
	dir.props
	src/Microsoft.Win32.Primitives/tests/packages.config
	src/System.Linq.Parallel/tests/packages.config
	src/System.Numerics.Vectors/tests/packages.config
	src/System.Threading.Tasks.Dataflow/tests/packages.config
	src/System.Xml.XDocument/tests/packages.config
	src/System.Xml.XPath.XDocument/tests/packages.config
	src/System.Xml.XPath.XmlDocument/tests/packages.config
	src/System.Xml.XPath/tests/packages.config
	src/System.Xml.XmlDocument/tests/packages.config


Commit migrated from https://github.com/dotnet/corefx/commit/c76ad5c37452cea0f2f02b2321e230f90c40172b
2015-01-12 19:02:36 -08:00
Stephen Toub 2c958f9c8c Explicitly type variables according to guidelines
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
2015-01-11 18:18:40 -05:00
Stephen Toub 66596c6a72 Remove defunct PRENET45 from TPL Dataflow
This compilation constant is legacy from when the library was building in CTPs for .NET 4, but it's not been used for a while and the library won't actually build as written with the flag set.


Commit migrated from https://github.com/dotnet/corefx/commit/ad16f98bdabbc7cf1097346eee590ddab4d051b5
2015-01-11 09:37:39 -05:00
Stephen Toub 9adfc54139 Fix field names in TPL Dataflow
A bunch of field instance names still had the "m_" prefix instead of just "_".  Others had been updated but were referenced in comments and those comments weren't changed to use "_" instead of "m_". Etc.


Commit migrated from https://github.com/dotnet/corefx/commit/9fd1337cd79bd00084e69a173f74d46f7de042b6
2015-01-09 23:41:59 -05:00
Matt Cohn 8be0f98ba2 Tests depend on updated versions of xunit packages.
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
2015-01-06 15:40:08 -08:00
Eric StJohn 81b8a3b8e8 Merge pull request dotnet/corefx#332 from ericstj/fileSystem
Add System.IO.FileSystem and System.IO.FileSystem.Primitives

Commit migrated from https://github.com/dotnet/corefx/commit/377dde76c5df105a7bab2c0a3002c0d835ff1b07
2015-01-05 14:43:51 -08:00
Alexander Köplinger 2d555615f5 Add XML comment for the Post() method in ActionBlock.
The method is an optimization of the one in DataflowBlock,
so the comment was copied from there.


Commit migrated from https://github.com/dotnet/corefx/commit/748d4856637a122a0c06a29119735e19a0040ded
2015-01-03 17:27:27 +01:00
Alexander Köplinger aff281469e Dataflow: Fix the XPath for some doc comment includes
The XPaths pointed to wrong (nonexisting) nodes in CommonXmlDocComments.xml


Commit migrated from https://github.com/dotnet/corefx/commit/2bf5a7185fd81949da4d47a432662d8fe80989f6
2015-01-01 15:33:12 +01:00
Eric StJohn 4869f04170 Updating all projects to latest build of contract packages.
Commit migrated from https://github.com/dotnet/corefx/commit/2bf5569e0e1f45f8e3e547689d57231d3f61e887
2014-12-23 11:25:34 -08:00
Wes Haggard 75af051114 Merge pull request dotnet/corefx#305 from akoeplinger/fix-msbuild-toolsversion
Canonicalize MSBuild ToolsVersion to 12.0

Commit migrated from https://github.com/dotnet/corefx/commit/7cd5d73516e5206ef27aecdec724e0413e8f882f
2014-12-20 10:24:28 -08:00
Wes Haggard 27cb98e29a Switch all projects to resolve references from packages.config.
Commit migrated from https://github.com/dotnet/corefx/commit/08503d51d2c61861bf11c5e36da53c69aca092e1
2014-12-19 17:44:16 -08:00
Alexander Köplinger 9718807828 Canonicalize MSBuild ToolsVersion to 12.0
Right now, there's a mix of ToolsVersion 4.0 and 12.0 in the projects.
We should make sure that it's 12.0 everywhere.


Commit migrated from https://github.com/dotnet/corefx/commit/57cffc78d6f28e760872325c37306a7cb4aa8e47
2014-12-19 22:16:24 +01:00
Wes Haggard 9e1b10e6f4 Switch to importing dir.props/dir.targets using GetDirectoryNameOfFileAbove.
This commit also updates the new System.IO.Pipes.csproj to follow the pattern.


Commit migrated from https://github.com/dotnet/corefx/commit/5d7072c5caa5cd9aef476221613c78bcc60a003b
2014-12-17 21:01:52 -08:00
Wes Haggard ba98a882d4 Add dir.props/dir.targets to all the test projects and enable building them.
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
2014-12-17 20:52:57 -08:00
Wes Haggard c143e9841f Update build to be more consistent no matter how you build it.
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
2014-12-17 20:43:38 -08:00
Matt Cohn 9b3f681d51 Merge branch 'master' into test_on_coreclr
Conflicts:
	src/System.Reflection.Metadata/tests/Resources/Interop/Interop.Designer.cs
	src/System.Reflection.Metadata/tests/Resources/Misc/Misc.Designer.cs
	src/System.Reflection.Metadata/tests/Resources/Namespace/Namespace.Designer.cs
	src/System.Reflection.Metadata/tests/Resources/NetModule/NetModule.Designer.cs


Commit migrated from https://github.com/dotnet/corefx/commit/c4b27c2e10dbb9014cd0e19b9a92759f216adea7
2014-12-17 16:33:58 -08:00
Omari Omarov 8b78aa111e Remove whitespace left after previous commit.
Commit migrated from https://github.com/dotnet/corefx/commit/ba755fe9b7f294930ad139bbefde333b8894850c
2014-12-17 23:50:31 +03:00
Matt Cohn c0da27fb38 Convert TPL tests to a portable library compiled against contracts.
Commit migrated from https://github.com/dotnet/corefx/commit/b787c2f47d636510b59686de0e44ed138250996d
2014-12-17 10:46:43 -08:00
Omari Omarov e6cba637e4 Remove TargetCore.Post method as it doesn't add to perf.
Commit migrated from https://github.com/dotnet/corefx/commit/c0238a64ea4d39c10bccff614fdc884bdadea402
2014-12-17 06:17:33 +03:00
Omari Omarov e6dc54c504 Make SpscTargetCore.OfferMessage use Post method on fast path
Commit migrated from https://github.com/dotnet/corefx/commit/6f24a50b82262940b8f5939ce8ca4fd93e3784ec
2014-12-17 06:17:33 +03:00
Omari Omarov 0c098dbf1b Improve ActionBlock.Post perf for SingleProducerConstrained
Commit migrated from https://github.com/dotnet/corefx/commit/5cddf87c6dc046e2307952c0fe999a71e6030f1d
2014-12-17 06:16:49 +03:00
Krzysztof Wicher 2011f4685f Upgrade tests to use Xunit 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/9fe538d620b67aa0dd2ba5734ec9fa34379d79e9
2014-12-12 13:36:07 -08:00
Bar Arnon ea55a0788b Enhance TestBufferBlockOutputAvailableAsyncAfterTryReceiveAll by testing multiple times concurrently
Commit migrated from https://github.com/dotnet/corefx/commit/1b36fd75cf643d4cb2b9f3dffdb55b76e673e9bc
2014-12-07 23:44:18 +02:00
Bar Arnon 217cea0b2a Set _enableOffering unconditionaly
Commit migrated from https://github.com/dotnet/corefx/commit/eb9d68941c6aa811cc3f9ad26b5f526449af31c0
2014-12-07 23:13:49 +02:00
Bar Arnon 3357abd4f0 Merge branch 'master' into BufferBlockBug
Commit migrated from https://github.com/dotnet/corefx/commit/c81209ded9e7dec8396e8242b69d74870a59576c
2014-12-07 22:51:49 +02:00
Andrew Arnott c919cc8da4 Add Test Explorer VS package Service guid.
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
2014-12-07 08:59:05 -08:00