Skip to content

Commit 2929449

Browse files
committed
Merge pull request dotnet/corefx#6840 from stephentoub/interprocess_tests
Remove InterprocessTests project Commit migrated from dotnet/corefx@0f9c6c2
2 parents cbfad3c + eb0d6b6 commit 2929449

File tree

16 files changed

+140
-274
lines changed

16 files changed

+140
-274
lines changed

src/libraries/Scenarios/InterProcessCommunication.sln

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/libraries/Scenarios/tests/InterProcessCommunication/EventWaitHandleTests.cs

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/libraries/Scenarios/tests/InterProcessCommunication/InterProcessCommunication.Tests.csproj

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/libraries/Scenarios/tests/InterProcessCommunication/SemaphoreTests.cs

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/libraries/Scenarios/tests/InterProcessCommunication/project.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/libraries/Scenarios/tests/InterProcessCommunication/MemoryMappedFilesTests.cs renamed to src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Diagnostics;
6-
using System.IO;
7-
using System.IO.MemoryMappedFiles;
86
using Xunit;
97

10-
namespace InterProcessCommunication.Tests
8+
namespace System.IO.MemoryMappedFiles.Tests
119
{
12-
public class MemoryMappedFilesTests : RemoteExecutorTestBase
10+
public class CrossProcessTests : RemoteExecutorTestBase
1311
{
1412
[Fact]
1513
public void DataShared()

src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition="'$(Configuration)'==''">Windows_Debug</Configuration>
@@ -22,6 +22,7 @@
2222
<Compile Include="MemoryMappedFile.CreateOrOpen.Tests.cs" />
2323
<Compile Include="MemoryMappedFile.OpenExisting.Tests.cs" />
2424
<Compile Include="MemoryMappedFile.CreateNew.Tests.cs" />
25+
<Compile Include="MemoryMappedFile.CrossProcess.cs" />
2526
<Compile Include="MemoryMappedViewStream.Tests.cs" />
2627
<Compile Include="MemoryMappedViewAccessor.Tests.cs" />
2728
<Compile Include="MemoryMappedFilesTestsBase.cs" />
@@ -31,6 +32,9 @@
3132
<Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
3233
<Link>Common\System\IO\TempFile.cs</Link>
3334
</Compile>
35+
<Compile Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorTestBase.cs">
36+
<Link>Common\System\Diagnostics\RemoteExecutorTestBase.cs</Link>
37+
</Compile>
3438
<Compile Include="$(CommonTestPath)\System\IO\FileCleanupTestBase.cs">
3539
<Link>Common\System\IO\FileCleanupTestBase.cs</Link>
3640
</Compile>
@@ -51,6 +55,10 @@
5155
<Project>{16EE5522-F387-4C9E-9EF2-B5134B043F37}</Project>
5256
<Name>System.IO.MemoryMappedFiles</Name>
5357
</ProjectReference>
58+
<ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
59+
<Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
60+
<Name>RemoteExecutorConsoleApp</Name>
61+
</ProjectReference>
5462
</ItemGroup>
5563
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
5664
</Project>

src/libraries/System.IO.MemoryMappedFiles/tests/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"dependencies": {
33
"Microsoft.DotNet.xunit.performance": "1.0.0-alpha-build0029",
44
"Microsoft.NETCore.Platforms": "1.0.1-rc3-23910",
5+
"System.Diagnostics.Process": "4.1.0-rc3-23910",
56
"System.IO": "4.0.10",
67
"System.IO.FileSystem": "4.0.0",
78
"System.IO.FileSystem.Primitives": "4.0.0",

src/libraries/Scenarios/tests/InterProcessCommunication/AnonymousPipesTests.cs renamed to src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Diagnostics;
6-
using System.IO;
7-
using System.IO.Pipes;
86
using Xunit;
97

10-
namespace InterProcessCommunication.Tests
8+
namespace System.IO.Pipes.Tests
119
{
12-
public class AnonymousPipesTests : RemoteExecutorTestBase
10+
public class AnonymousPipeTest_CrossProcess : RemoteExecutorTestBase
1311
{
1412
[Fact]
1513
public void PingPong()

src/libraries/Scenarios/tests/InterProcessCommunication/NamedPipesTests.cs renamed to src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System;
65
using System.Diagnostics;
7-
using System.IO.Pipes;
86
using System.Threading.Tasks;
97
using Xunit;
108

11-
namespace InterProcessCommunication.Tests
9+
namespace System.IO.Pipes.Tests
1210
{
13-
public class NamedPipesTests : RemoteExecutorTestBase
11+
public sealed class NamedPipeTest_CrossProcess : RemoteExecutorTestBase
1412
{
15-
[Fact]
16-
public void PingPong()
13+
[Theory]
14+
[InlineData(PipeDirection.Out, PipeDirection.In)]
15+
public void PingPong(PipeDirection outboundDirection, PipeDirection inboundDirection)
1716
{
1817
// Create names for two pipes
1918
string outName = Guid.NewGuid().ToString("N");
2019
string inName = Guid.NewGuid().ToString("N");
2120

2221
// Create the two named pipes, one for each direction, then create
2322
// another process with which to communicate
24-
using (var outbound = new NamedPipeServerStream(outName, PipeDirection.Out))
25-
using (var inbound = new NamedPipeClientStream(".", inName, PipeDirection.In))
23+
using (var outbound = new NamedPipeServerStream(outName, outboundDirection))
24+
using (var inbound = new NamedPipeClientStream(".", inName, inboundDirection))
2625
using (var remote = RemoteInvoke(PingPong_OtherProcess, outName, inName))
2726
{
2827
// Wait for both pipes to be connected

0 commit comments

Comments
 (0)