Update src folder
authorViktor <viktor.hofer@microsoft.com>
Fri, 29 Mar 2019 17:15:10 +0000 (18:15 +0100)
committerViktor Hofer <viktor.hofer@microsoft.com>
Tue, 2 Apr 2019 17:21:57 +0000 (19:21 +0200)
Commit migrated from https://github.com/dotnet/corefx/commit/817c36a05ef2d92e59ce6f5a37e2be50076361b3

221 files changed:
src/libraries/Common/tests/Common.Tests.csproj
src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/AssemblyAttributes.cs [deleted file]
src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/Configurations.props [deleted file]
src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs [deleted file]
src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj [deleted file]
src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs
src/libraries/Common/tests/Tests/System/StringTests.cs
src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj
src/libraries/Microsoft.VisualBasic.Core/tests/StringsTests.cs
src/libraries/System.Buffers/tests/ArrayPool/ArrayPoolTest.cs
src/libraries/System.Buffers/tests/ArrayPool/CollectionTests.cs
src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj
src/libraries/System.CodeDom/tests/System.CodeDom.Tests.csproj
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGenerationTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGeneratorTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/ExecutorTests.cs
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs
src/libraries/System.Collections.Concurrent/tests/EtwTests.cs
src/libraries/System.Collections.Concurrent/tests/System.Collections.Concurrent.Tests.csproj
src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs
src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs
src/libraries/System.Collections.NonGeneric/tests/ComparerTests.cs
src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs
src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs
src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj
src/libraries/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj
src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs
src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs
src/libraries/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs
src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationFinalizerTests.cs
src/libraries/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj
src/libraries/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/ConverterTestBase.cs
src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeOffsetConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/MultilineStringConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/ReferenceConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj
src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs
src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTests.cs
src/libraries/System.ComponentModel.TypeConverter/tests/TypeListConverterTests.cs
src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj
src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs
src/libraries/System.Console/tests/CancelKeyPress.Unix.cs
src/libraries/System.Console/tests/CancelKeyPress.cs
src/libraries/System.Console/tests/ConsoleEncoding.Windows.cs
src/libraries/System.Console/tests/ConsoleEncoding.cs
src/libraries/System.Console/tests/NonStandardConfiguration.Unix.cs
src/libraries/System.Console/tests/ReadKey.cs
src/libraries/System.Console/tests/RedirectedStream.cs
src/libraries/System.Console/tests/System.Console.Tests.csproj
src/libraries/System.Console/tests/WindowAndCursorProps.cs
src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj
src/libraries/System.Data.Common/tests/System/Data/DataCommonEventSourceTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataSetTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataSetTest2.cs
src/libraries/System.Data.Common/tests/System/Data/DataTableReadXmlSchemaTest.cs
src/libraries/System.Data.Common/tests/System/Data/DataTableTest.cs
src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlStringTest.cs
src/libraries/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs
src/libraries/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj
src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs
src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs
src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceDataTests.cs
src/libraries/System.Diagnostics.PerformanceCounter/tests/System.Diagnostics.PerformanceCounter.Tests.csproj
src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs
src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.NonUap.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs
src/libraries/System.Diagnostics.Process/tests/ProcessWaitingTests.cs
src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
src/libraries/System.Diagnostics.TextWriterTraceListener/tests/ConsoleTraceListenerTests.cs
src/libraries/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj
src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.cs
src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.netcoreapp.cs
src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj
src/libraries/System.Drawing.Common/tests/BitmapTests.cs
src/libraries/System.Drawing.Common/tests/IconTests.cs
src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj
src/libraries/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs
src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs
src/libraries/System.Globalization/tests/CultureInfo/CultureInfoDateTimeFormat.cs
src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrentInfo.cs
src/libraries/System.Globalization/tests/System.Globalization.Tests.csproj
src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs
src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs
src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs
src/libraries/System.IO.FileSystem/tests/Directory/SetCurrentDirectory.cs
src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs
src/libraries/System.IO.FileSystem/tests/FileStream/Dispose.cs
src/libraries/System.IO.FileSystem/tests/FileStream/LockUnlock.cs
src/libraries/System.IO.FileSystem/tests/FileStream/Name.cs
src/libraries/System.IO.FileSystem/tests/FileStream/ctor_str_fm_fa_fs.cs
src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs
src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs
src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs
src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
src/libraries/System.IO/tests/StringWriter/StringWriterTests.cs
src/libraries/System.IO/tests/System.IO.Tests.csproj
src/libraries/System.Json/tests/System.Json.Tests.csproj
src/libraries/System.Json/tests/System/Json/JsonValueTests.cs
src/libraries/System.Linq.Parallel/tests/EtwTests.cs
src/libraries/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj
src/libraries/System.Memory/tests/System.Memory.Tests.csproj
src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs
src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
src/libraries/System.Net.Http/tests/UnitTests/Headers/CacheControlHeaderValueTest.cs
src/libraries/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs
src/libraries/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs
src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj
src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs
src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs
src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj
src/libraries/System.Net.Requests/tests/AuthenticationManagerTest.cs
src/libraries/System.Net.Requests/tests/GlobalProxySelectionTest.cs
src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs
src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
src/libraries/System.Net.Requests/tests/WebRequestTest.cs
src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs
src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
src/libraries/System.Net.ServicePoint/tests/ServicePointManagerTest.cs
src/libraries/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj
src/libraries/System.Net.ServicePoint/tests/TlsSystemDefault.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs
src/libraries/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj
src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs
src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.netcoreapp.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.Exit.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.GetCommandLineArgs.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs
src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs
src/libraries/System.Runtime.Extensions/tests/System/IO/PathTestsBase.cs
src/libraries/System.Runtime.Extensions/tests/System/IO/PathTests_Unix.cs
src/libraries/System.Runtime.Extensions/tests/System/IO/PathTests_Windows.cs
src/libraries/System.Runtime.Extensions/tests/System/Runtime/ProfileOptimization.netcoreapp.cs
src/libraries/System.Runtime.Extensions/tests/System/UnloadingAndProcessExitTests.netcoreapp.cs
src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs
src/libraries/System.Runtime.Numerics/tests/BigInteger/parse.cs
src/libraries/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj
src/libraries/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs
src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
src/libraries/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/ComponentModel/DefaultValueAttributeTests.cs
src/libraries/System.Runtime/tests/System/DecimalTests.cs
src/libraries/System.Runtime/tests/System/DecimalTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/DoubleTests.cs
src/libraries/System.Runtime/tests/System/DoubleTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/ExitCodeTests.Unix.cs
src/libraries/System.Runtime/tests/System/FormattableStringTests.cs
src/libraries/System.Runtime/tests/System/FormattableStringTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/GCTests.cs
src/libraries/System.Runtime/tests/System/Reflection/IsCollectibleTests.cs
src/libraries/System.Runtime/tests/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptions.cs
src/libraries/System.Runtime/tests/System/SingleTests.cs
src/libraries/System.Runtime/tests/System/SingleTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/StringGetHashCodeTests.cs
src/libraries/System.Runtime/tests/System/StringTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/Text/StringBuilderTests.cs
src/libraries/System.Runtime/tests/System/Text/StringBuilderTests.netcoreapp.cs
src/libraries/System.Runtime/tests/System/Type/TypeTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj
src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs
src/libraries/System.Security.Principal.Windows/tests/System.Security.Principal.Windows.Tests.csproj
src/libraries/System.Text.Encoding.CodePages/tests/EncoderFallbackBufferHelper.cs
src/libraries/System.Text.Encoding.CodePages/tests/System.Text.Encoding.CodePages.Tests.csproj
src/libraries/System.Text.Encoding/tests/Encoding/EncodingGetEncodingTests.cs
src/libraries/System.Text.Encoding/tests/System.Text.Encoding.Tests.csproj
src/libraries/System.Text.RegularExpressions/tests/Regex.Cache.Tests.cs
src/libraries/System.Text.RegularExpressions/tests/Regex.Ctor.Tests.cs
src/libraries/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs
src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs
src/libraries/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj
src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/EtwTests.cs
src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj
src/libraries/System.Threading.Tasks.Parallel/tests/EtwTests.cs
src/libraries/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj
src/libraries/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.netcoreapp.cs
src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj
src/libraries/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj
src/libraries/System.Threading.Thread/tests/ThreadTests.cs
src/libraries/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj
src/libraries/System.Threading/tests/EtwTests.cs
src/libraries/System.Threading/tests/EventWaitHandleTests.cs
src/libraries/System.Threading/tests/MutexTests.cs
src/libraries/System.Threading/tests/SemaphoreTests.cs
src/libraries/System.Threading/tests/System.Threading.Tests.csproj
src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs
src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj

index 83b8b06..3a69e0c 100644 (file)
@@ -2,8 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{C72FD34C-539A-4447-9796-62A229571199}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
     <CoverageSupported>false</CoverageSupported>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
     <Folder Include="System\Net\Sockets\" />
     <Folder Include="System\Net\VirtualNetwork\" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
diff --git a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/AssemblyAttributes.cs b/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/AssemblyAttributes.cs
deleted file mode 100644 (file)
index df6c7b2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-[assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAssembly]
-[assembly: System.Runtime.Versioning.TargetFrameworkAttribute("DUMMY-TFA,Version=v0.0.1")]
diff --git a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/Configurations.props b/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/Configurations.props
deleted file mode 100644 (file)
index 581054d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<Project DefaultTargets="Build">
-  <PropertyGroup>
-    <BuildConfigurations>
-      netstandard;
-    </BuildConfigurations>
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs b/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs
deleted file mode 100644 (file)
index c4919af..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.IO;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using System.Runtime.ExceptionServices;
-using System.Runtime.InteropServices;
-
-namespace RemoteExecutorConsoleApp
-{
-    /// <summary>
-    /// Provides an entry point in a new process that will load a specified method and invoke it.
-    /// </summary>
-    internal static class Program
-    {
-        private static int Main(string[] args)
-        {
-            // The program expects to be passed the target assembly name to load, the type
-            // from that assembly to find, and the method from that assembly to invoke.
-            // Any additional arguments are passed as strings to the method.
-            if (args.Length < 4)
-            {
-                Console.Error.WriteLine("Usage: {0} assemblyName typeName methodName exceptionFile [additionalArgs]", typeof(Program).GetTypeInfo().Assembly.GetName().Name);
-                Environment.Exit(-1);
-                return -1;
-            }
-
-            string assemblyName = args[0];
-            string typeName = args[1];
-            string methodName = args[2];
-            string exceptionFile = args[3];
-            string[] additionalArgs = args.Length > 4 ? 
-                args.Subarray(4, args.Length - 4) : 
-                Array.Empty<string>();
-
-            // Load the specified assembly, type, and method, then invoke the method.
-            // The program's exit code is the return value of the invoked method.
-            Assembly a = null;
-            Type t = null;
-            MethodInfo mi = null;
-            object instance = null;
-            int exitCode = 0;
-            try
-            {
-                // Create the test class if necessary
-                a = Assembly.Load(new AssemblyName(assemblyName));
-                t = a.GetType(typeName);
-                mi = t.GetTypeInfo().GetDeclaredMethod(methodName);
-                if (!mi.IsStatic)
-                {
-                    instance = Activator.CreateInstance(t);
-                }
-
-                // Invoke the test
-                object result = mi.Invoke(instance, additionalArgs);
-
-                if (result is Task<int> task)
-                {
-                    exitCode = task.GetAwaiter().GetResult();
-                }
-                else if (result is int exit)
-                {
-                    exitCode = exit;
-                }
-            }
-            catch (Exception exc)
-            {
-                if (exc is TargetInvocationException && exc.InnerException != null)
-                    exc = exc.InnerException;
-
-                var output = new StringBuilder();
-                output.AppendLine();
-                output.AppendLine("Child exception:");
-                output.AppendLine("  " + exc);
-                output.AppendLine();
-                output.AppendLine("Child process:");
-                output.AppendLine(string.Format("  {0} {1} {2}", a, t, mi));
-                output.AppendLine();
-
-                if (additionalArgs.Length > 0)
-                {
-                    output.AppendLine("Child arguments:");
-                    output.AppendLine("  " + string.Join(", ", additionalArgs));
-                }
-
-                File.WriteAllText(exceptionFile, output.ToString());
-
-                ExceptionDispatchInfo.Capture(exc).Throw();
-            }
-            finally
-            {
-                (instance as IDisposable)?.Dispose();
-            }
-
-            // Environment.Exit not supported on .NET Native - don't even call it to avoid the nuisance exception.
-            if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase))
-            {
-                // Use Exit rather than simply returning the exit code so that we forcibly shut down
-                // the process even if there are foreground threads created by the operation that would
-                // end up keeping the process alive potentially indefinitely.
-                try
-                {
-                    Environment.Exit(exitCode);
-                }
-                catch (PlatformNotSupportedException)
-                {
-                }
-            }
-            return exitCode;
-        }
-
-        private static MethodInfo GetMethod(this Type type, string methodName)
-        {
-            Type t = type;
-            while (t != null)
-            {
-                TypeInfo ti = t.GetTypeInfo();
-                MethodInfo mi = ti.GetDeclaredMethod(methodName);
-                if (mi != null)
-                {
-                    return mi;
-                }
-                t = ti.BaseType;
-            }
-            return null;
-        }
-
-        private static T[] Subarray<T>(this T[] arr, int offset, int count)
-        {
-            var newArr = new T[count];
-            Array.Copy(arr, offset, newArr, 0, count);
-            return newArr;
-        }
-    }
-}
diff --git a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj b/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj
deleted file mode 100644 (file)
index a5d0e21..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <ProjectGuid>{8DE22889-A6CB-41EC-B807-D44A2C184719}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
-    <TargetExt>.exe</TargetExt>
-    <RootNamespace>RemoteExecutorConsoleApp</RootNamespace>
-    <AssemblyName>RemoteExecutorConsoleApp</AssemblyName>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <CopyNuGetImplementations>false</CopyNuGetImplementations>
-    <Configurations>netstandard-Debug;netstandard-Release</Configurations>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="RemoteExecutorConsoleApp.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="AssemblyAttributes.cs" />
-    <Compile Include="$(CommonPath)\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAssemblyAttribute.cs">
-      <Link>Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAssemblyAttribute.cs</Link>
-    </Compile>
-  </ItemGroup>
-</Project>
\ No newline at end of file
index 26e9fba..d573575 100644 (file)
@@ -4,6 +4,7 @@
 
 using System.Diagnostics;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tests
@@ -16,7 +17,7 @@ namespace System.Threading.Tests
         // Wait longer for a thread to time out, so that an unexpected timeout in the thread is more likely to expire first and
         // provide a better stack trace for the failure
         public const int UnexpectedThreadTimeoutMilliseconds =
-            UnexpectedTimeoutMilliseconds + RemoteExecutorTestBase.FailWaitTimeoutMilliseconds;
+            UnexpectedTimeoutMilliseconds + RemoteExecutor.FailWaitTimeoutMilliseconds;
 
         public static Thread CreateGuardedThread(out Action waitForThread, Action start)
         {
index 63698a6..2e23f79 100644 (file)
@@ -11,12 +11,13 @@ using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
     //When add new tests make sure to add checks for both string and span APIs where relevant.
-    public partial class StringTests : RemoteExecutorTestBase
+    public partial class StringTests
     {
         private const string SoftHyphen = "\u00AD";
         private static readonly char[] s_whiteSpaceCharacters = { '\u0009', '\u000a', '\u000b', '\u000c', '\u000d', '\u0020', '\u0085', '\u00a0', '\u1680' };
@@ -2549,7 +2550,7 @@ namespace System.Tests
         [MemberData(nameof(Equals_EncyclopaediaData))]
         public void Equals_Encyclopaedia_ReturnsExpected(StringComparison comparison, bool expected)
         {
-            RemoteInvoke((comparisonString, expectedString) =>
+            RemoteExecutor.Invoke((comparisonString, expectedString) =>
             {
                 string source = "encyclop\u00e6dia";
                 string target = "encyclopaedia";
@@ -2560,7 +2561,7 @@ namespace System.Tests
 
                 Assert.Equal(bool.Parse(expectedString), source.AsSpan().Equals(target.AsSpan(), comparisonType));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, comparison.ToString(), expected.ToString()).Dispose();
         }
 
@@ -2867,7 +2868,7 @@ namespace System.Tests
         [Fact]
         public static void IndexOf_TurkishI_TurkishCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
 
@@ -2896,14 +2897,14 @@ namespace System.Tests
                 Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
                 Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_TurkishI_InvariantCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -2925,14 +2926,14 @@ namespace System.Tests
                 Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_TurkishI_EnglishUSCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
@@ -2955,14 +2956,14 @@ namespace System.Tests
                 Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_HungarianDoubleCompression_HungarianCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string source = "dzsdzs";
                 string target = "ddzs";
@@ -2990,14 +2991,14 @@ namespace System.Tests
                 Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.Ordinal));
                 Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_HungarianDoubleCompression_InvariantCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string source = "dzsdzs";
                 string target = "ddzs";
@@ -3011,14 +3012,14 @@ namespace System.Tests
                 Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_EquivalentDiacritics_EnglishUSCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Exhibit a\u0300\u00C0";
                 string value = "\u00C0";
@@ -3048,14 +3049,14 @@ namespace System.Tests
                 Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
                 Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_EquivalentDiacritics_InvariantCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Exhibit a\u0300\u00C0";
                 string value = "\u00C0";
@@ -3077,14 +3078,14 @@ namespace System.Tests
                 Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_CyrillicE_EnglishUSCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Foo\u0400Bar";
                 string value = "\u0400";
@@ -3114,14 +3115,14 @@ namespace System.Tests
                 Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
                 Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_CyrillicE_InvariantCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Foo\u0400Bar";
                 string value = "\u0400";
@@ -3143,7 +3144,7 @@ namespace System.Tests
                 Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -4058,7 +4059,7 @@ namespace System.Tests
         [Fact]
         public static void LastIndexOf_TurkishI_TurkishCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
 
@@ -4087,14 +4088,14 @@ namespace System.Tests
                 Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.Ordinal));
                 Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void LastIndexOf_TurkishI_InvariantCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -4115,14 +4116,14 @@ namespace System.Tests
                 Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void LastIndexOf_TurkishI_EnglishUSCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
@@ -4143,7 +4144,7 @@ namespace System.Tests
                 Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
                 Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -5097,13 +5098,13 @@ namespace System.Tests
         [Fact]
         public static void Test_ToLower_Culture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 foreach (var testdata in ToLower_Culture_TestData())
                 {
                     ToLower_Culture((string)testdata[0], (string)testdata[1], (CultureInfo)testdata[2]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -5691,7 +5692,7 @@ namespace System.Tests
         [MemberData(nameof(ToUpper_TurkishI_TurkishCulture_MemberData))]
         public static void ToUpper_TurkishI_TurkishCulture(string s, string expected)
         {
-            RemoteInvoke((str, expectedString) =>
+            RemoteExecutor.Invoke((str, expectedString) =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
 
@@ -5701,7 +5702,7 @@ namespace System.Tests
                 Assert.Equal(str.Length, str.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
                 Assert.Equal(expectedString, destination.ToString());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, s.ToString(), expected.ToString()).Dispose();
         }
 
@@ -5715,7 +5716,7 @@ namespace System.Tests
         [MemberData(nameof(ToUpper_TurkishI_EnglishUSCulture_MemberData))]
         public static void ToUpper_TurkishI_EnglishUSCulture(string s, string expected)
         {
-            RemoteInvoke((str, expectedString) =>
+            RemoteExecutor.Invoke((str, expectedString) =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
@@ -5725,7 +5726,7 @@ namespace System.Tests
                 Assert.Equal(str.Length, str.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
                 Assert.Equal(expectedString, destination.ToString());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, s.ToString(), expected.ToString()).Dispose();
         }
 
@@ -5739,7 +5740,7 @@ namespace System.Tests
         [MemberData(nameof(ToUpper_TurkishI_InvariantCulture_MemberData))]
         public static void ToUpper_TurkishI_InvariantCulture(string s, string expected)
         {
-            RemoteInvoke((str, expectedString) =>
+            RemoteExecutor.Invoke((str, expectedString) =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -5749,7 +5750,7 @@ namespace System.Tests
                 Assert.Equal(str.Length, str.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
                 Assert.Equal(expectedString, destination.ToString());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, s.ToString(), expected.ToString()).Dispose();
         }
 
@@ -6821,7 +6822,7 @@ namespace System.Tests
         public static void CompareTest(string aS1, string aS2, string aCultureName, bool aIgnoreCase, int aExpected)
         {
             const string nullPlaceholder = "<null>";
-            RemoteInvoke((string s1, string s2, string cultureName, string bIgnoreCase, string iExpected) => {
+            RemoteExecutor.Invoke((string s1, string s2, string cultureName, string bIgnoreCase, string iExpected) => {
                 if (s1 == nullPlaceholder)
                     s1 = null;
 
@@ -6845,7 +6846,7 @@ namespace System.Tests
                 CultureInfo.CurrentCulture = ci;
                 Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ignoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, aS1 ?? nullPlaceholder, aS2 ?? nullPlaceholder, aCultureName, aIgnoreCase.ToString(), aExpected.ToString()).Dispose();
         }
 
index 5c5b091..dbb78ee 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="StringsTests.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
   </ItemGroup>
 </Project>
index ede77c8..747c9a8 100644 (file)
@@ -7,11 +7,12 @@ using System.Diagnostics;
 using System.Globalization;
 using System.Text;
 using Microsoft.VisualBasic.CompilerServices.Tests;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace Microsoft.VisualBasic.Tests
 {
-    public class StringsTests : RemoteExecutorTestBase
+    public class StringsTests
     {
         static StringsTests()
         {
@@ -78,7 +79,7 @@ namespace Microsoft.VisualBasic.Tests
         [InlineData(256)]
         public void Chr_CharCodeOutOfRange_ThrowsNotSupportedException(int charCode)
         {
-            RemoteInvoke(charCodeInner =>
+            RemoteExecutor.Invoke(charCodeInner =>
             {
                 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
                 CultureInfo.CurrentCulture = new CultureInfo("en-US"); // Strings.Chr doesn't fail on these inputs for all code pages, e.g. 949
index 8f2bd45..c9ec3e1 100644 (file)
@@ -5,10 +5,11 @@
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 
 namespace System.Buffers.ArrayPool.Tests
 {
-    public abstract class ArrayPoolTest : RemoteExecutorTestBase
+    public abstract class ArrayPoolTest
     {
         protected const string TrimSwitchName = "DOTNET_SYSTEM_BUFFERS_ARRAYPOOL_TRIMSHARED";
 
@@ -41,12 +42,12 @@ namespace System.Buffers.ArrayPool.Tests
             options.StartInfo.UseShellExecute = false;
             options.StartInfo.EnvironmentVariables.Add(TrimSwitchName, trim.ToString());
 
-            RemoteInvoke(action).Dispose();
+            RemoteExecutor.Invoke(action).Dispose();
         }
 
-        protected static void RemoteInvokeWithTrimming(Func<string, int> method, bool trim = false, int timeout = FailWaitTimeoutMilliseconds)
+        protected static void RemoteInvokeWithTrimming(Func<string, int> method, bool trim = false, int timeout = RemoteExecutor.FailWaitTimeoutMilliseconds)
         {
-            RemoteInvokeOptions options = new RemoteInvokeOptions
+            var options = new RemoteInvokeOptions
             {
                 TimeOut = timeout
             };
@@ -54,7 +55,7 @@ namespace System.Buffers.ArrayPool.Tests
             options.StartInfo.UseShellExecute = false;
             options.StartInfo.EnvironmentVariables.Add(TrimSwitchName, trim.ToString());
 
-            RemoteInvoke(method, trim.ToString(), options).Dispose();
+            RemoteExecutor.Invoke(method, trim.ToString(), options).Dispose();
         }
     }
 }
index 6cb4fa4..2427dc7 100644 (file)
@@ -8,6 +8,7 @@ using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Buffers.ArrayPool.Tests
@@ -74,7 +75,7 @@ namespace System.Buffers.ArrayPool.Tests
 
                 // Should only have found a new buffer if we're trimming
                 Assert.Equal(parsedTrim, foundNewBuffer);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, trim, 3 * 60 * 1000); // This test has to wait for the buffers to go stale (give it three minutes)
         }
 
@@ -131,7 +132,7 @@ namespace System.Buffers.ArrayPool.Tests
                     Assert.Same(buffer, pool.Rent(BufferSize));
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, trim);
         }
 
@@ -189,7 +190,7 @@ namespace System.Buffers.ArrayPool.Tests
 
                 // Polling events should only fire when trimming is enabled
                 Assert.Equal(parsedTrim, pollEventFired);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, trim);
         }
     }
index 032b92a..a5c019c 100644 (file)
@@ -2,8 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{62E2AD5F-C8D0-45FB-B6A5-AED2C77F198C}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Configurations>netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="ArrayPool\ArrayPoolTest.cs" />
     <Compile Include="ArrayPool\UnitTests.cs" />
     <Compile Include="$(CommonTestPath)\System\Diagnostics\Tracing\TestEventListener.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 6fe3a50..20459e2 100644 (file)
@@ -1,6 +1,7 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{0D1E2954-A5C7-4B8C-932A-31EB4A96A726}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
       <Link>Common\System\IO\TempFile.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
index 5ce6188..2c84bf5 100644 (file)
@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Globalization;
 using System.Reflection;
 using Microsoft.CSharp;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.CodeDom.Compiler.Tests
@@ -615,7 +616,7 @@ namespace System.CodeDom.Compiler.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void MetadataAttributes()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
@@ -1452,7 +1453,7 @@ namespace System.CodeDom.Compiler.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void RegionsSnippetsAndLinePragmas()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
@@ -2574,7 +2575,7 @@ namespace System.CodeDom.Compiler.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void ProviderSupports()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index 0a7a9fa..a0cd304 100644 (file)
@@ -8,11 +8,12 @@ using System.Diagnostics;
 using System.IO;
 using System.Reflection;
 using System.Text;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.CodeDom.Compiler.Tests
 {
-    public abstract class CodeGenerationTests : RemoteExecutorTestBase
+    public abstract class CodeGenerationTests
     {
         [Fact]
         public void Roundtrip_Extension()
index b9baabf..d80ab31 100644 (file)
@@ -11,7 +11,7 @@ using Xunit;
 
 namespace System.CodeDom.Compiler.Tests
 {
-    public class CodeGeneratorTests : RemoteExecutorTestBase
+    public class CodeGeneratorTests
     {
         public class Generator : CodeGenerator
         {
index c46fa5a..8fdafcd 100644 (file)
@@ -5,11 +5,12 @@
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.CodeDom.Compiler.Tests
 {
-    public class ExecutorTests : RemoteExecutorTestBase
+    public class ExecutorTests : FileCleanupTestBase
     {
         private static readonly string s_cmd = PlatformDetection.IsWindows ? "ipconfig" : "printenv"; // arbitrary commands to validate output
 
@@ -36,7 +37,7 @@ namespace System.CodeDom.Compiler.Tests
         [Fact]
         public void ExecWait_OutputCaptured()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var tfc = new TempFileCollection(TestDirectory))
                 {
@@ -51,7 +52,7 @@ namespace System.CodeDom.Compiler.Tests
         [Fact]
         public void ExecWaitWithCapture_NullNames_OutputCaptured()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var tfc = new TempFileCollection())
                 {
@@ -76,7 +77,7 @@ namespace System.CodeDom.Compiler.Tests
         [Fact]
         public void ExecWaitWithCapture_SpecifiedNames_OutputCaptured()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var tfc = new TempFileCollection())
                 {
@@ -96,7 +97,7 @@ namespace System.CodeDom.Compiler.Tests
         [Fact]
         public void ExecWaitWithCapture_CurrentDirectorySpecified_OutputIncludesSpecifiedDirectory()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var tfc = new TempFileCollection(TestDirectory))
                 {
@@ -113,7 +114,7 @@ namespace System.CodeDom.Compiler.Tests
         [Fact]
         public void ExecWaitWithCapture_OutputIncludesCurrentDirectory()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var tfc = new TempFileCollection(TestDirectory))
                 {
index b2ec2ab..30c515e 100644 (file)
@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Globalization;
 using System.Reflection;
 using Microsoft.VisualBasic;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.CodeDom.Compiler.Tests
@@ -581,7 +582,7 @@ namespace System.CodeDom.Compiler.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void MetadataAttributes()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
@@ -1402,7 +1403,7 @@ namespace System.CodeDom.Compiler.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void RegionsSnippetsAndLinePragmas()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
@@ -2365,7 +2366,7 @@ namespace System.CodeDom.Compiler.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void ProviderSupports()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index 4c669c3..2b09763 100644 (file)
@@ -5,16 +5,17 @@
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Collections.Concurrent.Tests
 {
-    public class EtwTests : RemoteExecutorTestBase
+    public class EtwTests
     {
         [Fact]
         public void TestEtw()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("System.Collections.Concurrent.ConcurrentCollectionsEventSource", EventLevel.Verbose))
                 {
index 73a4226..017692f 100644 (file)
@@ -1,8 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}</ProjectGuid>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetGroup)'!='netcoreapp'">
     <Compile Include="$(CommonTestPath)\System\Collections\IEnumerable.Generic.Serialization.Tests.cs">
       <Link>Common\System\Collections\IEnumerable.Generic.Serialization.Tests.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
index 4728a33..578c1fc 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Globalization;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Collections.Tests
 {
-    public class CaseInsensitiveComparerTests : RemoteExecutorTestBase
+    public class CaseInsensitiveComparerTests
     {
         [Theory]
         [InlineData("hello", "HELLO", 0)]
@@ -131,7 +132,7 @@ namespace System.Collections.Tests
         [InlineData("null", "null", 0)]
         public void DefaultInvariant_Compare(object a, object b, int expected)
         {
-            RemoteInvoke((ra, rb, rexpected) =>
+            RemoteExecutor.Invoke((ra, rb, rexpected) =>
             {
                 Func<string, object> convert = (string o) =>
                 {
@@ -174,7 +175,7 @@ namespace System.Collections.Tests
                     CaseInsensitiveComparer defaultInvComparer = CaseInsensitiveComparer.DefaultInvariant;
                     Assert.Equal(rexpected_val, Math.Sign(defaultInvComparer.Compare(ra_val, rb_val)));
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, a.ToString(), b.ToString(), expected.ToString()).Dispose();
         }
 
index e9a28fd..9e58035 100644 (file)
@@ -4,13 +4,14 @@
 
 using System.Globalization;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 #pragma warning disable 618 // obsolete types
 
 namespace System.Collections.Tests
 {
-    public class CaseInsensitiveHashCodeProviderTests : RemoteExecutorTestBase
+    public class CaseInsensitiveHashCodeProviderTests
     {
         [Theory]
         [InlineData("hello", "HELLO", true)]
@@ -38,7 +39,7 @@ namespace System.Collections.Tests
         [InlineData(5, 10, false)]
         public void Ctor_Empty_ChangeCurrentCulture_GetHashCodeCompare(object a, object b, bool expected)
         {
-            RemoteInvoke((ra, rb, rexpected) =>
+            RemoteExecutor.Invoke((ra, rb, rexpected) =>
             {
                 var cultureNames = new string[]
                 {
@@ -69,7 +70,7 @@ namespace System.Collections.Tests
                     Assert.Equal(provider.GetHashCode(rb), provider.GetHashCode(rb));
                     Assert.Equal(expectedResult, provider.GetHashCode(ra) == provider.GetHashCode(rb));
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, a.ToString(), b.ToString(), expected.ToString()).Dispose();
         }
 
@@ -178,7 +179,7 @@ namespace System.Collections.Tests
         {
             // Turkish has lower-case and upper-case version of the dotted "i", so the upper case of "i" (U+0069) isn't "I" (U+0049)
             // but rather "Ä°" (U+0130)
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
                 Assert.False(CaseInsensitiveHashCodeProvider.Default.GetHashCode("file") == CaseInsensitiveHashCodeProvider.Default.GetHashCode("FILE"));
@@ -186,7 +187,7 @@ namespace System.Collections.Tests
 
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
                 Assert.True(CaseInsensitiveHashCodeProvider.Default.GetHashCode("file") == CaseInsensitiveHashCodeProvider.Default.GetHashCode("FILE"));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 8d59c47..070289d 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Collections.Tests
 {
-    public class ComparerTests : RemoteExecutorTestBase
+    public class ComparerTests
     {
         [Theory]
         [InlineData("b", "a", 1)]
@@ -38,7 +39,7 @@ namespace System.Collections.Tests
         [Fact]
         public void DefaultInvariant_Compare()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var cultureNames = new string[]
 {
@@ -73,7 +74,7 @@ namespace System.Collections.Tests
                     Assert.Equal(1, comp.Compare(string1[0], string2[0]));
                     Assert.Equal(-1, comp.Compare(string1[1], string2[1]));
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 847022d..9d164ae 100644 (file)
@@ -6,13 +6,14 @@ using System.Diagnostics;
 using System.Reflection;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 #pragma warning disable 618 // obsolete types
 
 namespace System.Collections.Tests
 {
-    public class HashtableTests : RemoteExecutorTestBase
+    public class HashtableTests
     {
         [Fact]
         public void Ctor_Empty()
@@ -90,7 +91,7 @@ namespace System.Collections.Tests
         [Fact]
         public void Ctor_IEqualityComparer()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // Null comparer
                 var hash = new ComparableHashtable((IEqualityComparer)null);
@@ -101,7 +102,7 @@ namespace System.Collections.Tests
                 hash = new ComparableHashtable(comparer);
                 VerifyHashtable(hash, null, comparer);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -181,7 +182,7 @@ namespace System.Collections.Tests
         [Fact]
         public void Ctor_IDictionary_IEqualityComparer()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // No exception
                 var hash1 = new ComparableHashtable(new Hashtable(), null);
@@ -201,7 +202,7 @@ namespace System.Collections.Tests
                 hash1 = new ComparableHashtable(hash2, comparer);
                 VerifyHashtable(hash1, hash2, comparer);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -274,7 +275,7 @@ namespace System.Collections.Tests
         [InlineData(1000)]
         public void Ctor_Int_IEqualityComparer(int capacity)
         {
-            RemoteInvoke((rcapacity) =>
+            RemoteExecutor.Invoke((rcapacity) =>
             {
                 int.TryParse(rcapacity, out int capacityint);
 
@@ -286,7 +287,7 @@ namespace System.Collections.Tests
                 IEqualityComparer comparer = StringComparer.CurrentCulture;
                 hash = new ComparableHashtable(capacityint, comparer);
                 VerifyHashtable(hash, null, comparer);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, capacity.ToString()).Dispose();
         }
 
@@ -300,7 +301,7 @@ namespace System.Collections.Tests
         [Fact]
         public void Ctor_IDictionary_Int_IEqualityComparer()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 // No exception
                 var hash1 = new ComparableHashtable(new Hashtable(), 1f, null);
                 Assert.Equal(0, hash1.Count);
@@ -319,7 +320,7 @@ namespace System.Collections.Tests
                 IEqualityComparer comparer = StringComparer.CurrentCulture;
                 hash1 = new ComparableHashtable(hash2, 1f, comparer);
                 VerifyHashtable(hash1, hash2, comparer);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -343,7 +344,7 @@ namespace System.Collections.Tests
         [InlineData(1000, 1)]
         public void Ctor_Int_Int_IEqualityComparer(int capacity, float loadFactor)
         {
-            RemoteInvoke((rcapacity, rloadFactor) =>
+            RemoteExecutor.Invoke((rcapacity, rloadFactor) =>
             {
                 int.TryParse(rcapacity, out int capacityint);
                 float.TryParse(rloadFactor, out float loadFactorFloat);
@@ -358,7 +359,7 @@ namespace System.Collections.Tests
                 hash = new ComparableHashtable(capacityint, loadFactorFloat, comparer);
                 VerifyHashtable(hash, null, comparer);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, capacity.ToString(), loadFactor.ToString()).Dispose();
         }
 
index 164fd19..b5c725b 100644 (file)
@@ -7,11 +7,12 @@ using System.Globalization;
 using System.Linq;
 using System.Reflection;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Collections.Tests
 {
-    public class SortedListTests : RemoteExecutorTestBase
+    public class SortedListTests
     {
         [Fact]
         public void Ctor_Empty()
@@ -1339,7 +1340,7 @@ namespace System.Collections.Tests
         [Fact]
         public void Item_Get_DifferentCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var sortList = new SortedList();
 
@@ -1381,7 +1382,7 @@ namespace System.Collections.Tests
                 {
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index cb576bf..5c57658 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{EE95AE39-845A-42D3-86D0-8065DBE56612}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
       <Link>Common\System\Collections\IEnumerable.NonGeneric.Serialization.Tests.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 19df07f..6114fdb 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{6E48765E-D6AC-4A79-9C2E-B5EE67EEDECF}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System\ComponentModel\DataAnnotations\ValidationResultTests.cs" />
     <Compile Include="System\ComponentModel\DataAnnotations\ValidatorTests.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 8900349..76493af 100644 (file)
@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Globalization;
 using System.IO;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.DataAnnotations.Tests
@@ -189,7 +190,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void ParseDotSeparatorExtremaInCommaSeparatorCultures(Type type, string min, string max)
         {
-            RemoteInvoke((t, m1, m2) =>
+            RemoteExecutor.Invoke((t, m1, m2) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -207,7 +208,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void ParseDotSeparatorInvariantExtremaInCommaSeparatorCultures(Type type, string min, string max)
         {
-            RemoteInvoke((t, m1, m2) =>
+            RemoteExecutor.Invoke((t, m1, m2) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -232,7 +233,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void ParseCommaSeparatorExtremaInCommaSeparatorCultures(Type type, string min, string max)
         {
-            RemoteInvoke((t, m1, m2) =>
+            RemoteExecutor.Invoke((t, m1, m2) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -250,7 +251,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void ParseCommaSeparatorInvariantExtremaInCommaSeparatorCultures(Type type, string min, string max)
         {
-            RemoteInvoke((t, m1, m2) =>
+            RemoteExecutor.Invoke((t, m1, m2) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -267,7 +268,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndValues(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -285,7 +286,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndValuesInvariantParse(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -310,7 +311,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndValuesInvariantConvert(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -335,7 +336,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndValuesInvariantBoth(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -542,7 +543,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndInvalidValues(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -560,7 +561,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndInvalidValuesInvariantParse(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -585,7 +586,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndInvalidValuesInvariantConvert(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -610,7 +611,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void DotDecimalExtremaAndInvalidValuesInvariantBoth(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -637,7 +638,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndValues(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -655,7 +656,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndValuesInvariantParse(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -680,7 +681,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndValuesInvariantConvert(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -705,7 +706,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndValuesInvariantBoth(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -732,7 +733,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndInvalidValues(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -750,7 +751,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndInvalidValuesInvariantParse(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -775,7 +776,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndInvalidValuesInvariantConvert(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
@@ -800,7 +801,7 @@ namespace System.ComponentModel.DataAnnotations.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
         public static void CommaDecimalExtremaAndInvalidValuesInvariantBoth(Type type, string min, string max, string value)
         {
-            RemoteInvoke((t, m1, m2, v) =>
+            RemoteExecutor.Invoke((t, m1, m2, v) =>
             {
                 Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfoByIetfLanguageTag("en-US");
 
index d0717a0..1944164 100644 (file)
@@ -9,7 +9,7 @@ using Xunit;
 
 namespace System.ComponentModel.DataAnnotations.Tests
 {
-    public abstract class ValidationAttributeTestBase : RemoteExecutorTestBase
+    public abstract class ValidationAttributeTestBase
     {
         protected abstract IEnumerable<TestCase> ValidValues();
         protected abstract IEnumerable<TestCase> InvalidValues();
index b8aa7e4..0092ef9 100644 (file)
@@ -2,6 +2,7 @@
   <!-- TODO: Add netfx configuration after OOB package bug is fixed: https://github.com/dotnet/corefx/issues/23889 -->
   <PropertyGroup>
     <ProjectGuid>{59F4682D-C41D-45A7-9798-16C75525BB1D}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
       <OutputItemType>content</OutputItemType>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </ProjectReference>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
index 2f844ee..08ba948 100644 (file)
@@ -12,12 +12,13 @@ using System.IO;
 using System.Linq;
 using System.Text;
 using System.UnitTesting;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Composition
 {
     [Serializable]
-    public class CompositionExceptionTests : RemoteExecutorTestBase
+    public class CompositionExceptionTests
     {
         [Fact]
         public void Constructor1_ShouldSetMessagePropertyToDefault()
@@ -369,7 +370,7 @@ namespace System.ComponentModel.Composition
         [Fact]
         public void Message_ShouldFormatCountOfRootCausesUsingTheCurrentCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 IEnumerable<CultureInfo> cultures = Expectations.GetCulturesForFormatting();
                 foreach (CultureInfo culture in cultures)
@@ -386,7 +387,7 @@ namespace System.ComponentModel.Composition
                         AssertMessage(exception, 1, culture);
                     }
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 1a7b979..c4152b7 100644 (file)
@@ -4,23 +4,24 @@
 
 using System.Diagnostics;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public class AsyncOperationFinalizerTests : RemoteExecutorTestBase
+    public class AsyncOperationFinalizerTests
     {
         [Fact]
         public void Finalizer_OperationCompleted_DoesNotCallOperationCompleted()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Completed();
 
                 GC.Collect();
                 GC.WaitForPendingFinalizers();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -39,7 +40,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public void Finalizer_OperationNotCompleted_CompletesOperation()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var tracker = new OperationCompletedTracker();
                 NotCompleted(tracker);
@@ -49,7 +50,7 @@ namespace System.ComponentModel.Tests
 
                 Assert.True(tracker.OperationDidComplete);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 0b5d23b..9dcb29d 100644 (file)
@@ -4,6 +4,7 @@
     adding this xunit so it runs in one AppDomain -->
     <XUnitNoAppdomain>true</XUnitNoAppdomain>
     <ProjectGuid>{59E9B218-81D0-4A80-A4B7-66C716136D82}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="BackgroundWorkerTests.cs" />
     <Compile Include="TestException.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 19e9879..a1cc384 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
@@ -12,7 +13,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index 535464e..b3d6780 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
@@ -14,7 +15,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index d29f064..a41a582 100644 (file)
@@ -8,7 +8,7 @@ using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public class ConverterTestBase : RemoteExecutorTestBase
+    public class ConverterTestBase
     {
         public static void CanConvertTo_WithContext(object[,] data, TypeConverter converter)
         {
index 64e6708..1c61e2a 100644 (file)
@@ -14,11 +14,12 @@ using System.ComponentModel.Design.Serialization;
 using System.Diagnostics;
 using System.Globalization;
 using System.Runtime.InteropServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public class CultureInfoConverterTest : RemoteExecutorTestBase
+    public class CultureInfoConverterTest
     {
         private CultureInfoConverter converter => new CultureInfoConverter();
 
@@ -150,7 +151,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public void ConvertFrom_Value_Null()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index 462dde8..b7a6318 100644 (file)
@@ -5,6 +5,7 @@
 using System.ComponentModel.Design.Serialization;
 using System.Globalization;
 using System.Reflection;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
@@ -62,7 +63,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = new CultureInfo("pl-PL");
                 DateTimeFormatInfo formatInfo = (DateTimeFormatInfo)CultureInfo.CurrentCulture.GetFormat(typeof(DateTimeFormatInfo));
                 string formatWithTime = formatInfo.ShortDatePattern + " " + formatInfo.ShortTimePattern;
@@ -98,7 +99,7 @@ namespace System.ComponentModel.Tests
                 Assert.Equal(testDateAndTime, describedInstanceNoCulture);
                 Assert.Equal(testDateAndTime, describedInstanceCulture); 
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 3bea6a9..ee4136f 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
@@ -48,7 +49,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("pl-PL");
 
@@ -67,7 +68,7 @@ namespace System.ComponentModel.Tests
                     },
                     DateTimeOffsetConverterTests.s_converter);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 3f29e37..38f3175 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections;
 using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Design.Tests
 {
-    public class DesignerOptionServiceTests : RemoteExecutorTestBase
+    public class DesignerOptionServiceTests
     {
         [Fact]
         public void CreateOptionCollection_CreateMultipleTimes_ReturnsExpected()
@@ -267,7 +268,7 @@ namespace System.ComponentModel.Design.Tests
         [Fact]
         public void DesignerOptionConverter_ConvertToString_ReturnsExpected()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index a357b88..1738d28 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
@@ -12,7 +13,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index c74ed16..86d1668 100644 (file)
@@ -35,11 +35,12 @@ using System.Collections.Generic;
 using System.ComponentModel.Design;
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public class ReferenceConverterTest : RemoteExecutorTestBase
+    public class ReferenceConverterTest
     {
 
         class TestReferenceService : IReferenceService
@@ -199,7 +200,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public void ConvertTo()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index 12f2e9e..2341294 100644 (file)
@@ -2,9 +2,8 @@
   <PropertyGroup>
     <ProjectGuid>{3F0326A1-9E19-4A6C-95CE-63E65C9D2030}</ProjectGuid>
     <DefineConstants>$(DefineConstants);FUNCTIONAL_TESTS</DefineConstants>
-    <DebugEngines>{2E36F1D4-B23C-435D-AB41-18E608940038}</DebugEngines>
-    <RootNamespace>
-    </RootNamespace>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <RootNamespace />
     <AssemblyVersion>9.9.9.9</AssemblyVersion>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
     <Compile Include="XTypeDescriptionProviderTests.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <SupplementalTestData Include="$(PackagesDir)system.componentmodel.typeconverter.testdata\$(TestDataPackageVersion)\content\**\*.*">
+    <SupplementalTestData Include="$(PackagesDir)system.componentmodel.typeconverter.testdata\1.0.0\content\**\*.*">
       <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
     </SupplementalTestData>
   </ItemGroup>
index f1e4664..39ff28f 100644 (file)
@@ -9,11 +9,12 @@ using System.Linq;
 using System.IO;
 using System.Runtime.Serialization;
 using System.Runtime.Serialization.Formatters.Binary;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public abstract class TypeConverterTestBase : RemoteExecutorTestBase
+    public abstract class TypeConverterTestBase
     {
         public abstract TypeConverter Converter { get; }
         public virtual IEnumerable<ConvertTest> ConvertToTestData() => Enumerable.Empty<ConvertTest>();
@@ -46,7 +47,7 @@ namespace System.ComponentModel.Tests
                 }
                 else
                 {
-                    RemoteInvoke((typeName, testString) =>
+                    RemoteExecutor.Invoke((typeName, testString) =>
                     {
                         // Deserialize the current test.
                         TypeConverterTestBase testBase = (TypeConverterTestBase)Activator.CreateInstance(Type.GetType(typeName));
@@ -65,7 +66,7 @@ namespace System.ComponentModel.Tests
                             Assert.Throws<NotSupportedException>(() => testBase.Converter.ConvertTo(test.Context, test.Culture, test.Source, test.DestinationType));
                         }
 
-                        return SuccessExitCode;
+                        return RemoteExecutor.SuccessExitCode;
                     }, this.GetType().AssemblyQualifiedName, convertTest.GetSerializedString()).Dispose();
                 }
             });
@@ -103,7 +104,7 @@ namespace System.ComponentModel.Tests
                 }
                 else
                 {
-                    RemoteInvoke((typeName, testString) =>
+                    RemoteExecutor.Invoke((typeName, testString) =>
                     {
                         // Deserialize the current test.
                         TypeConverterTestBase testBase = (TypeConverterTestBase)Activator.CreateInstance(Type.GetType(typeName));
@@ -125,7 +126,7 @@ namespace System.ComponentModel.Tests
                             AssertExtensions.Throws(test.NetCoreExceptionType, test.NetFrameworkExceptionType, () => testBase.Converter.ConvertFrom(test.Context, test.Culture, test.Source));
                         }
 
-                        return SuccessExitCode;
+                        return RemoteExecutor.SuccessExitCode;
                     }, this.GetType().AssemblyQualifiedName, convertTest.GetSerializedString()).Dispose();
                 }
             });
index e328003..dcc48ae 100644 (file)
@@ -6,11 +6,12 @@ using System.ComponentModel.Design.Serialization;
 using System.Diagnostics;
 using System.Globalization;
 using System.Reflection;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public class TypeConverterTests : RemoteExecutorTestBase
+    public class TypeConverterTests
     {
         public static TypeConverter s_converter = new TypeConverter();
         public static ITypeDescriptorContext s_context = new MyTypeDescriptorContext();
@@ -106,7 +107,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("pl-PL");
 
@@ -131,7 +132,7 @@ namespace System.ComponentModel.Tests
                     s_context, CultureInfo.InvariantCulture, new FormattableClass(), typeof(string)) as string;
                 Assert.NotNull(s);
                 Assert.Equal(FormattableClass.Token, s);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 4940f7c..1da23a6 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
@@ -36,7 +37,7 @@ namespace System.ComponentModel.Tests
         [Fact]
         public static void ConvertTo_WithContext()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index 2087438..56b455d 100644 (file)
@@ -3,6 +3,7 @@
     <ProjectGuid>{7669C397-C21C-4C08-83F1-BE6691911E88}</ProjectGuid>
     <!-- XUnit AppDomains BaseDirectory path doesn't contain a trailing slash, which impacts our tests. -->
     <XUnitNoAppdomain>true</XUnitNoAppdomain>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <!-- Default configurations to help VS understand the options -->
     <Compile Include="System\Configuration\ValidatiorUtilsTests.cs" />
     <Compile Include="System\Drawing\Configuration\SystemDrawingSectionTests.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 89fe0e0..acbf450 100644 (file)
@@ -5,12 +5,12 @@
 using System.Configuration;
 using System.Diagnostics;
 using System.Globalization;
-
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ConfigurationTests
 {
-    public class TimeSpanValidatorAttributeTests : RemoteExecutorTestBase
+    public class TimeSpanValidatorAttributeTests
     {
         [Fact]
         public void MinValueString_GetString()
@@ -117,7 +117,7 @@ namespace System.ConfigurationTests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")]
         public void MinValueString_TooSmall()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
@@ -136,7 +136,7 @@ namespace System.ConfigurationTests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")]
         public void MaxValueString_TooBig()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index fa0fb79..e4aaa4f 100644 (file)
@@ -7,9 +7,10 @@ using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
-public partial class CancelKeyPressTests : RemoteExecutorTestBase
+public partial class CancelKeyPressTests
 {
     [PlatformSpecific(TestPlatforms.AnyUnix)]  // Uses P/Invokes
     public void HandlerInvokedForSigInt()
@@ -26,7 +27,7 @@ public partial class CancelKeyPressTests : RemoteExecutorTestBase
     [PlatformSpecific(TestPlatforms.AnyUnix)]  // events are triggered by Unix signals (SIGINT, SIGQUIT, SIGCHLD).
     public void ExitDetectionNotBlockedByHandler()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             var mre = new ManualResetEventSlim();
             var tcs = new TaskCompletionSource<object>();
@@ -45,16 +46,16 @@ public partial class CancelKeyPressTests : RemoteExecutorTestBase
             Assert.True(tcs.Task.Wait(WaitFailTestTimeoutSeconds * 1000));
 
             // Create a process and wait for it to exit.
-            using (RemoteInvokeHandle handle = RemoteInvoke(() => SuccessExitCode))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(() => RemoteExecutor.SuccessExitCode))
             {
                 // Process exit is detected on SIGCHLD
-                Assert.Equal(SuccessExitCode, handle.ExitCode);
+                Assert.Equal(RemoteExecutor.SuccessExitCode, handle.ExitCode);
             }
 
             // Release CancelKeyPress
             mre.Set();
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
@@ -68,7 +69,7 @@ public partial class CancelKeyPressTests : RemoteExecutorTestBase
 
         // This test sends a SIGINT back to itself... if run in the xunit process, this would end
         // up canceling the rest of xunit's tests.  So we run the test itself in a separate process.
-        RemoteInvoke(signalStr =>
+        RemoteExecutor.Invoke(signalStr =>
         {
             var tcs = new TaskCompletionSource<ConsoleSpecialKey>();
 
@@ -93,7 +94,7 @@ public partial class CancelKeyPressTests : RemoteExecutorTestBase
                 Console.CancelKeyPress -= handler;
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }, signalOuter.ToString()).Dispose();
     }
 
index a4197bf..a9178ba 100644 (file)
@@ -6,9 +6,10 @@ using System;
 using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
-public partial class CancelKeyPressTests : RemoteExecutorTestBase
+public partial class CancelKeyPressTests
 {
     private const int WaitFailTestTimeoutSeconds = 30;
 
@@ -30,11 +31,11 @@ public partial class CancelKeyPressTests : RemoteExecutorTestBase
     {
         // xunit registers a CancelKeyPress handler at the beginning of the test run and never 
         // unregisters it, thus we can't execute all of the removal code in the same process.
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             CanAddAndRemoveHandler();
             CanAddAndRemoveHandler(); // add and remove again
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 }
index 002cc95..041a2ed 100644 (file)
@@ -5,6 +5,7 @@
 using System;
 using System.Text;
 using System.Runtime.InteropServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 public partial class ConsoleEncoding
@@ -13,14 +14,14 @@ public partial class ConsoleEncoding
     [PlatformSpecific(TestPlatforms.Windows)]
     public void InputEncoding_SetDefaultEncoding_Success()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             Encoding encoding = Encoding.GetEncoding(0);
             Console.InputEncoding = encoding;
             Assert.Equal(encoding, Console.InputEncoding);
             Assert.Equal((uint)encoding.CodePage, GetConsoleCP());
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
@@ -28,7 +29,7 @@ public partial class ConsoleEncoding
     [PlatformSpecific(TestPlatforms.Windows)]
     public void InputEncoding_SetUnicodeEncoding_SilentlyIgnoredInternally()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             Encoding unicodeEncoding = Encoding.Unicode;
             Encoding oldEncoding = Console.InputEncoding;
@@ -38,7 +39,7 @@ public partial class ConsoleEncoding
             Assert.Equal(unicodeEncoding, Console.InputEncoding);
             Assert.Equal((uint)oldEncoding.CodePage, GetConsoleCP());
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
@@ -46,14 +47,14 @@ public partial class ConsoleEncoding
     [PlatformSpecific(TestPlatforms.Windows)]
     public void OutputEncoding_SetDefaultEncoding_Success()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             Encoding encoding = Encoding.GetEncoding(0);
             Console.OutputEncoding = encoding;
             Assert.Equal(encoding, Console.OutputEncoding);
             Assert.Equal((uint)encoding.CodePage, GetConsoleOutputCP());
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
@@ -61,7 +62,7 @@ public partial class ConsoleEncoding
     [PlatformSpecific(TestPlatforms.Windows)]
     public void OutputEncoding_SetUnicodeEncoding_SilentlyIgnoredInternally()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             Encoding unicodeEncoding = Encoding.Unicode;
             Encoding oldEncoding = Console.OutputEncoding;
@@ -71,7 +72,7 @@ public partial class ConsoleEncoding
 
             Assert.Equal((uint)oldEncoding.CodePage, GetConsoleOutputCP());
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
index 99fa225..b4bacd9 100644 (file)
@@ -7,9 +7,10 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Text;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
-public partial class ConsoleEncoding : RemoteExecutorTestBase
+public partial class ConsoleEncoding
 {
     public static IEnumerable<object[]> InputData()
     {
@@ -119,7 +120,7 @@ public partial class ConsoleEncoding : RemoteExecutorTestBase
     [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)]
     public void InputEncoding_SetWithInInitialized_ResetsIn()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             // Initialize Console.In
             TextReader inReader = Console.In;
@@ -139,7 +140,7 @@ public partial class ConsoleEncoding : RemoteExecutorTestBase
                 Assert.NotSame(inReader, Console.In);
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
@@ -162,7 +163,7 @@ public partial class ConsoleEncoding : RemoteExecutorTestBase
     [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)]
     public void OutputEncoding_SetWithErrorAndOutputInitialized_ResetsErrorAndOutput()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             // Initialize Console.Error
             TextWriter errorWriter = Console.Error;
@@ -181,7 +182,7 @@ public partial class ConsoleEncoding : RemoteExecutorTestBase
             Assert.NotSame(errorWriter, Console.Error);
             Assert.NotSame(outWriter, Console.Out);
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
index 03c681b..a705756 100644 (file)
@@ -4,17 +4,18 @@
 
 using System.Diagnostics;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class NonStandardConfigurationTests : RemoteExecutorTestBase
+    public partial class NonStandardConfigurationTests
     {
         [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes
         [Fact]
         public void NonBlockingStdout_AllDataReceived()
         {
-            RemoteInvokeHandle remote = RemoteInvoke(() =>
+            RemoteInvokeHandle remote = RemoteExecutor.Invoke(() =>
             {
                 char[] data = Enumerable.Repeat('a', 1024).ToArray();
 
@@ -26,7 +27,7 @@ namespace System.Tests
                     Console.Write(data);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, new RemoteInvokeOptions { StartInfo = new ProcessStartInfo() { RedirectStandardOutput = true } });
 
             using (remote)
index bc3d7d5..3e1445a 100644 (file)
@@ -4,9 +4,10 @@
 
 using System;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
-public class ReadKey : RemoteExecutorTestBase
+public class ReadKey
 {
     [Fact]
     public static void KeyAvailable()
@@ -59,6 +60,6 @@ public class ReadKey : RemoteExecutorTestBase
             options.StartInfo = psi;
         }
 
-        RemoteInvoke(func, options).Dispose();
+        RemoteExecutor.Invoke(func, options).Dispose();
     }
 }
index c48d19d..31db009 100644 (file)
@@ -8,9 +8,10 @@ using System.IO;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
-public class RedirectedStream : RemoteExecutorTestBase
+public class RedirectedStream
 {
     [Fact] // the CI system redirects stdout, so we can only really test the redirected behavior.
     public static void InputRedirect()
@@ -58,6 +59,6 @@ public class RedirectedStream : RemoteExecutorTestBase
             options.StartInfo = psi;
         }
 
-        RemoteInvoke(func, options).Dispose();
+        RemoteExecutor.Invoke(func, options).Dispose();
     }
 }
index c1e1811..a661cac 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{3ED7BCF1-34B9-49B7-9C25-0BC3304C0858}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <Folder Include="ncursesFormats\" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index e6e81e7..c467893 100644 (file)
@@ -6,10 +6,11 @@ using System;
 using System.Diagnostics;
 using System.IO;
 using System.Runtime.InteropServices;
-using Xunit;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.DotNet.XUnitExtensions;
+using Xunit;
 
-public class WindowAndCursorProps : RemoteExecutorTestBase
+public class WindowAndCursorProps
 {
     [Fact]
     [PlatformSpecific(TestPlatforms.AnyUnix)]  // Expected behavior specific to Unix
@@ -213,10 +214,10 @@ public class WindowAndCursorProps : RemoteExecutorTestBase
     [PlatformSpecific(TestPlatforms.AnyUnix)]  // Expected behavior specific to Unix
     public static void Title_SetUnix_Success()
     {
-        RemoteInvoke(() =>
+        RemoteExecutor.Invoke(() =>
         {
             Console.Title = "Title set by unit test";
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }).Dispose();
     }
 
@@ -253,7 +254,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase
     public static void Title_Set_Windows(int lengthOfTitle)
     {
         // Try to set the title to some other value.
-        RemoteInvoke(lengthOfTitleString =>
+        RemoteExecutor.Invoke(lengthOfTitleString =>
         {
             string newTitle = new string('a', int.Parse(lengthOfTitleString));
             Console.Title = newTitle;
@@ -267,7 +268,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase
             {
                 Assert.Equal(newTitle, Console.Title);
             }
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }, lengthOfTitle.ToString()).Dispose();
     }
 
index d286aa1..0b42549 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{B473F77D-4168-4123-932A-E88020B768FA}</ProjectGuid>
     <NoWarn>0168,0169,0414,0219,0649</NoWarn>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System\Xml\XmlDataDocumentTests.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index 9c2eddb..a546417 100644 (file)
@@ -5,17 +5,18 @@
 using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Data.Tests
 {
-    public class DataCommonEventSourceTest : RemoteExecutorTestBase
+    public class DataCommonEventSourceTest
     {
         [Fact]
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void InvokeCodeThatShouldFirEvents_EnsureEventsFired()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("System.Data.DataCommonEventSource", EventLevel.Verbose))
                 {
index 3f169b6..5cf6022 100644 (file)
@@ -29,11 +29,12 @@ using System.IO;
 using System.Diagnostics;
 using System.Globalization;
 using System.Xml;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Data.Tests
 {
-    public class DataSetReadXmlSchemaTest : RemoteExecutorTestBase
+    public class DataSetReadXmlSchemaTest
     {
         private DataSet CreateTestSet()
         {
@@ -296,7 +297,7 @@ namespace System.Data.Tests
         [Fact]
         public void LocaleOnRootWithoutIsDataSet()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("fi-FI");
                 string xs = @"<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>
@@ -320,7 +321,7 @@ namespace System.Data.Tests
                 DataSetAssertion.AssertDataColumn("col1", dt.Columns[0], "Attr", true, false, 0, 1, "Attr", MappingType.Attribute, typeof(long), DBNull.Value, string.Empty, -1, string.Empty, 0, string.Empty, false, false);
                 DataSetAssertion.AssertDataColumn("col2", dt.Columns[1], "Child", false, false, 0, 1, "Child", MappingType.Element, typeof(string), DBNull.Value, string.Empty, -1, string.Empty, 1, string.Empty, false, false);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 70fa58f..a2b5255 100644 (file)
@@ -28,8 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-
-using Xunit;
 using System.Xml;
 using System.Xml.Schema;
 using System.Xml.Serialization;
@@ -38,10 +36,12 @@ using System.Data.SqlTypes;
 using System.Globalization;
 using System.Text;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
+using Xunit;
 
 namespace System.Data.Tests
 {
-    public class DataSetTest : RemoteExecutorTestBase
+    public class DataSetTest
     {
         public DataSetTest()
         {
@@ -509,7 +509,7 @@ namespace System.Data.Tests
         [Fact]
         public void WriteXmlSchema()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("fi-FI");
 
@@ -594,7 +594,7 @@ namespace System.Data.Tests
 
                 Assert.Equal("</xs:schema>", TextString);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
 
         }
@@ -1565,7 +1565,7 @@ namespace System.Data.Tests
         [Fact]
         public void WriteXmlModeSchema1()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("fi-FI");
                 string SerializedDataTable =
@@ -1602,7 +1602,7 @@ namespace System.Data.Tests
                 string result = w.ToString();
                 Assert.Equal(expected.Replace("\r", ""), result.Replace("\r", ""));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 1dce32f..651aab3 100644 (file)
@@ -24,7 +24,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using Xunit;
 using System.Text;
 using System.IO;
 using System.Diagnostics;
@@ -32,10 +31,12 @@ using System.Xml;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Runtime.Serialization.Formatters.Tests;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
+using Xunit;
 
 namespace System.Data.Tests
 {
-    public class DataSetTest2 : RemoteExecutorTestBase
+    public class DataSetTest2
     {
         private DataSet _ds = null;
         private bool _eventRaised = false;
@@ -1007,7 +1008,7 @@ namespace System.Data.Tests
         [Fact]
         public void DataSetSpecificCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("cs-CZ");
 
@@ -1017,7 +1018,7 @@ namespace System.Data.Tests
                 dt.Locale = ds.Locale;
                 Assert.Same(dt, ds.Tables["MACHINE"]);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 2669ee9..2d1f800 100644 (file)
@@ -29,11 +29,12 @@ using System.Diagnostics;
 using System.Globalization;
 using System.Reflection;
 using System.Runtime.Serialization.Formatters.Binary;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Data.Tests
 {
-    public class DataTableReadXmlSchemaTest : RemoteExecutorTestBase
+    public class DataTableReadXmlSchemaTest
     {
         private DataSet CreateTestSet()
         {
@@ -429,7 +430,7 @@ namespace System.Data.Tests
         [Fact]
         public void XsdSchemaSerializationIgnoresLocale()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var serializer = new BinaryFormatter();
                 var table = new DataTable();
@@ -492,7 +493,7 @@ namespace System.Data.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not yet have the fix for this bug")]
         public void XsdSchemaDeserializationIgnoresLocale()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var serializer = new BinaryFormatter();
 
index dfe43c6..2aa4d13 100644 (file)
@@ -36,11 +36,12 @@ using System.Runtime.Serialization.Formatters.Binary;
 using System.Runtime.Serialization.Formatters.Tests;
 using System.Text.RegularExpressions;
 using System.Xml;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Data.Tests
 {
-    public class DataTableTest : RemoteExecutorTestBase
+    public class DataTableTest
     {
         public DataTableTest()
         {
@@ -865,7 +866,7 @@ Assert.False(true);
         [Fact]
         public void PropertyExceptions()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 DataSet set = new DataSet();
                 DataTable table = new DataTable();
@@ -915,7 +916,7 @@ Assert.False(true);
 
                 Assert.Throws<DataException>(() => table.Prefix = "Prefix#1");
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -3332,7 +3333,7 @@ Assert.False(true);
         [Fact]
         public void WriteXmlSchema()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-GB");
 
@@ -3411,7 +3412,7 @@ Assert.False(true);
 
                 Assert.Equal("</xs:schema>", TextString);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -4044,8 +4045,7 @@ Assert.False(true);
 
     [Serializable]
 
-    public class AppDomainsAndFormatInfo : RemoteExecutorTestBase
-    {
+    public class AppDomainsAndFormatInfo    {
         public void Remote()
         {
             int n = (int)Convert.ChangeType("5", typeof(int));
@@ -4081,7 +4081,7 @@ Assert.False(true);
         [Fact]
         public void Bug82109()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 DataTable tbl = new DataTable();
                 tbl.Columns.Add("data", typeof(DateTime));
@@ -4098,7 +4098,7 @@ Assert.False(true);
                 CultureInfo.CurrentCulture = new CultureInfo("fr-FR");
                 Select(tbl);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 7be8cf7..9a3db1d 100644 (file)
@@ -32,11 +32,12 @@ using System.Xml;
 using System.Xml.Serialization;
 using System.Text;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Data.Tests.SqlTypes
 {
-    public class SqlStringTest : RemoteExecutorTestBase
+    public class SqlStringTest
     {
         private SqlString _test1;
         private SqlString _test2;
@@ -172,7 +173,7 @@ namespace System.Data.Tests.SqlTypes
         [Fact]
         public void Properties()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-AU");
                 var one = new SqlString("First TestString");
@@ -196,7 +197,7 @@ namespace System.Data.Tests.SqlTypes
                 // Value
                 Assert.Equal("First TestString", one.Value);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 361836c..ae68d28 100644 (file)
@@ -5,8 +5,10 @@
 using System.Collections;
 using System.Diagnostics;
 using System.Reflection;
+using System.Runtime.CompilerServices;
 using System.Threading.Tasks;
 using System.Xml;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.SqlServer.TDS;
 using Microsoft.SqlServer.TDS.Done;
 using Microsoft.SqlServer.TDS.EndPoint;
@@ -14,11 +16,10 @@ using Microsoft.SqlServer.TDS.Error;
 using Microsoft.SqlServer.TDS.Servers;
 using Microsoft.SqlServer.TDS.SQLBatch;
 using Xunit;
-using System.Runtime.CompilerServices;
 
 namespace System.Data.SqlClient.Tests
 {
-    public class DiagnosticTest : RemoteExecutorTestBase
+    public class DiagnosticTest
     {
         private const string BadConnectionString = "data source = bad; initial catalog = bad; uid = bad; password = bad; connection timeout = 1;";
         private static readonly string s_tcpConnStr = Environment.GetEnvironmentVariable("TEST_TCP_CONN_STR") ?? string.Empty;
@@ -29,7 +30,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteScalarTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -43,7 +44,7 @@ namespace System.Data.SqlClient.Tests
                         var output = cmd.ExecuteScalar();
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -51,7 +52,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteScalarErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -67,7 +68,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -75,7 +76,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteNonQueryTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -89,7 +90,7 @@ namespace System.Data.SqlClient.Tests
                         var output = cmd.ExecuteNonQuery();
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -97,7 +98,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteNonQueryErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -127,7 +128,7 @@ namespace System.Data.SqlClient.Tests
                     }
                     Console.WriteLine("SqlClient.DiagnosticTest.ExecuteNonQueryErrorTest Connection Disposed");
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -135,7 +136,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteReaderTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -150,7 +151,7 @@ namespace System.Data.SqlClient.Tests
                         while (reader.Read()) { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -158,7 +159,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteReaderErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -176,7 +177,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -184,7 +185,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteReaderWithCommandBehaviorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -199,7 +200,7 @@ namespace System.Data.SqlClient.Tests
                         while (reader.Read()) { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -207,7 +208,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteXmlReaderTest()
         {
-            RemoteInvoke(cs =>
+            RemoteExecutor.Invoke(cs =>
             {
                 CollectStatisticsDiagnostics(_ =>
                 {
@@ -222,7 +223,7 @@ namespace System.Data.SqlClient.Tests
                         while (reader.Read()) { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, s_tcpConnStr).Dispose();
         }
 
@@ -230,7 +231,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteXmlReaderErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -248,7 +249,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -256,7 +257,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteScalarAsyncTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -270,7 +271,7 @@ namespace System.Data.SqlClient.Tests
                         var output = await cmd.ExecuteScalarAsync();
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -278,7 +279,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteScalarAsyncErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -294,7 +295,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -302,7 +303,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteNonQueryAsyncTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -316,7 +317,7 @@ namespace System.Data.SqlClient.Tests
                         var output = await cmd.ExecuteNonQueryAsync();
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -324,7 +325,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteNonQueryAsyncErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -339,7 +340,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -347,7 +348,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteReaderAsyncTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -362,7 +363,7 @@ namespace System.Data.SqlClient.Tests
                         while (reader.Read()) { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -370,7 +371,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteReaderAsyncErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -388,7 +389,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -396,7 +397,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteXmlReaderAsyncTest()
         {
-            RemoteInvoke(cs =>
+            RemoteExecutor.Invoke(cs =>
             {
                 CollectStatisticsDiagnosticsAsync(async _ =>
                 {
@@ -411,7 +412,7 @@ namespace System.Data.SqlClient.Tests
                         while (reader.Read()) { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, s_tcpConnStr).Dispose();
         }
 
@@ -419,7 +420,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ExecuteXmlReaderAsyncErrorTest()
         {
-            RemoteInvoke(cs =>
+            RemoteExecutor.Invoke(cs =>
             {
                 CollectStatisticsDiagnosticsAsync(async _ =>
                 {
@@ -437,7 +438,7 @@ namespace System.Data.SqlClient.Tests
                         catch { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, s_tcpConnStr).Dispose();
         }
 
@@ -445,7 +446,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ConnectionOpenTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(connectionString =>
                 {
@@ -458,7 +459,7 @@ namespace System.Data.SqlClient.Tests
                 }, true);
 
                 Console.WriteLine("SqlClient.DiagnosticsTest.ConnectionOpenTest:: Done with Diagnostics collection");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -466,7 +467,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ConnectionOpenErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnostics(_ =>
                 {
@@ -475,7 +476,7 @@ namespace System.Data.SqlClient.Tests
                         try { sqlConnection.Open(); } catch { }
                     }
                 });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -483,7 +484,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ConnectionOpenAsyncTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async connectionString =>
                 {
@@ -492,7 +493,7 @@ namespace System.Data.SqlClient.Tests
                         await sqlConnection.OpenAsync();
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -500,7 +501,7 @@ namespace System.Data.SqlClient.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework,  "Internals reflection not supported on UapAot | Feature not available on Framework")]
         public void ConnectionOpenAsyncErrorTest()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CollectStatisticsDiagnosticsAsync(async _ =>
                 {
@@ -509,7 +510,7 @@ namespace System.Data.SqlClient.Tests
                         try { await sqlConnection.OpenAsync(); } catch { }
                     }
                 }).GetAwaiter().GetResult();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 49d59c3..27f7640 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{F3E72F35-0351-4D67-9388-725BCAD807BA}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
@@ -44,9 +45,5 @@
     <ProjectReference Include="..\Tools\TDS\TDS\TDS.csproj">
       <Name>TDS</Name>
     </ProjectReference>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
index 80d3fa2..f9d1eb1 100644 (file)
@@ -3,18 +3,19 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
-using Xunit;
 using System.Diagnostics.Tracing;
 using System.Text;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
+using Xunit;
 
 namespace System.Diagnostics.Tests
 {
     //Complex types are not supported on EventSource for .NET 4.5
-    public class DiagnosticSourceEventSourceBridgeTests : RemoteExecutorTestBase
+    public class DiagnosticSourceEventSourceBridgeTests
     {
         // To avoid interactions between tests when they are run in parallel, we run all these tests in their 
-        // own sub-process using RemoteInvoke()  However this makes it very inconvinient to debug the test.   
+        // own sub-process using RemoteExecutor.Invoke()  However this makes it very inconvinient to debug the test.   
         // By seting this #if to true you stub out RemoteInvoke and the code will run in-proc which is useful 
         // in debugging.
 #if false    
@@ -24,7 +25,7 @@ namespace System.Diagnostics.Tests
             {
             }
         }
-        static IDisposable RemoteInvoke(Action a)
+        static IDisposable RemoteExecutor.Invoke(Action a)
         {
             a();
             return new NullDispose();
@@ -37,7 +38,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestSpecificEvents()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestSpecificEventsSource"))
@@ -122,7 +123,7 @@ namespace System.Diagnostics.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "This is linux specific test")]
         public void LinuxNewLineConventions()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("LinuxNewLineConventionsSource"))
@@ -181,7 +182,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestWildCardSourceName()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener1 = new DiagnosticListener("TestWildCardSourceName1"))
@@ -245,7 +246,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestWildCardEventName()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestWildCardEventNameSource"))
@@ -332,7 +333,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestNulls()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestNullsTestSource"))
@@ -413,7 +414,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestNoImplicitTransforms()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestNoImplicitTransformsSource"))
@@ -446,7 +447,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestBadProperties()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestBadPropertiesSource"))
@@ -478,7 +479,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestMessages()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestMessagesSource"))
@@ -511,7 +512,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestActivities()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 using (var diagnosticSourceListener = new DiagnosticListener("TestActivitiesSource"))
@@ -584,7 +585,7 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void TestShortcutKeywords()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var eventSourceListener = new TestDiagnosticSourceEventListener())
                 // These are look-alikes for the real ones.  
@@ -707,7 +708,7 @@ namespace System.Diagnostics.Tests
         public void Stress_WriteConcurrently_DoesntCrash()
         {
             const int StressTimeSeconds = 4;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (new TurnOnAllEventListener())
                 using (var source = new DiagnosticListener("testlistener"))
index 83349b2..8de2481 100644 (file)
@@ -17,7 +17,7 @@ namespace System.Diagnostics.Tests
 {
     using Configuration = System.Net.Test.Common.Configuration;
 
-    public class HttpHandlerDiagnosticListenerTests : RemoteExecutorTestBase
+    public class HttpHandlerDiagnosticListenerTests
     {
         /// <summary>
         /// A simple test to make sure the Http Diagnostic Source is added into the list of DiagnosticListeners.
index 4c2e347..132284d 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{A7922FA3-306A-41B9-B8DC-CC4DBE685A85}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;netstandard1.3-Debug;netstandard1.3-Release;netstandard1.5-Debug;netstandard1.5-Release</Configurations>
   </PropertyGroup>
   <ItemGroup Condition=" '$(TargetGroup)' != 'netfx'">
       <Link>Common\System\Net\Configuration.Http.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 9d8e821..c4a6d5c 100644 (file)
@@ -4,12 +4,13 @@
 
 using System.Diagnostics.PerformanceData;
 using System.IO;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.Tests
 {
     [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
-    public class PerformanceDataTests : RemoteExecutorTestBase, IClassFixture<PerformanceDataTestsFixture>
+    public class PerformanceDataTests : IClassFixture<PerformanceDataTestsFixture>
     {
         PerformanceDataTestsFixture _fixture = null;
 
@@ -29,7 +30,7 @@ namespace System.Diagnostics.Tests
         {
             // We run test in isolated process to avoid interferences on internal performance counter shared state with other tests.
             // These interferences could lead to fail also after retries
-            RemoteInvoke((string providerId, string typingCounterSetId) =>
+            RemoteExecutor.Invoke((string providerId, string typingCounterSetId) =>
             {
                 // Create the 'Typing' counter set.
                 using (CounterSet typingCounterSet = new CounterSet(Guid.Parse(providerId), Guid.Parse(typingCounterSetId), CounterSetInstanceType.Single))
index 2662250..b301abd 100644 (file)
@@ -1,8 +1,9 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{296074B7-1CC9-497E-8C1E-FC5C985C75C6}</ProjectGuid>
-    <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release</Configurations>
     <Win32Resource>provider.res</Win32Resource>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="PerformanceCounterTests.cs" />
     <Compile Include="PerformanceDataTests.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <None Include="provider.man">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
index 63da4ad..1c6f06f 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.Tests
@@ -33,7 +34,7 @@ namespace System.Diagnostics.Tests
         public void Modules_Get_ContainsHostFileName()
         {
             ProcessModuleCollection modules = Process.GetCurrentProcess().Modules;
-            Assert.Contains(modules.Cast<ProcessModule>(), m => m.FileName.Contains(HostRunnerName));
+            Assert.Contains(modules.Cast<ProcessModule>(), m => m.FileName.Contains(RemoteExecutor.HostRunnerName));
         }
 
         [Fact]
index e736b6b..788c824 100644 (file)
@@ -2,8 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using Microsoft.Win32;
-using Microsoft.Win32.SafeHandles;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Specialized;
@@ -11,11 +9,14 @@ using System.IO;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Security.Principal;
-using Xunit;
 using System.Text;
 using System.ComponentModel;
 using System.Security;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
+using Microsoft.Win32;
+using Microsoft.Win32.SafeHandles;
+using Xunit;
 
 namespace System.Diagnostics.Tests
 {
@@ -208,13 +209,13 @@ namespace System.Diagnostics.Tests
                 if (Environment.GetEnvironmentVariable(name) != "child-process-value") 
                     return 1;
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             });
             p.StartInfo.Environment.Add(name, "child-process-value");
             p.Start();
 
             Assert.True(p.WaitForExit(WaitInMS));
-            Assert.Equal(SuccessExitCode, p.ExitCode);
+            Assert.Equal(RemoteExecutor.SuccessExitCode, p.ExitCode);
         }
 
         [Fact]
@@ -231,7 +232,7 @@ namespace System.Diagnostics.Tests
                 Process p = CreateProcess(() =>
                 {
                     Console.Write(string.Join(ItemSeparator, Environment.GetEnvironmentVariables().Cast<DictionaryEntry>().Select(e => Convert.ToBase64String(Encoding.UTF8.GetBytes(e.Key + "=" + e.Value)))));
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 });
                 p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
                 p.StartInfo.RedirectStandardOutput = true;
@@ -378,7 +379,11 @@ namespace System.Diagnostics.Tests
             string workingDirectory = string.IsNullOrEmpty(Environment.SystemDirectory) ? TestDirectory : Environment.SystemDirectory ;
             Assert.NotEqual(workingDirectory, Directory.GetCurrentDirectory());
             var psi = new ProcessStartInfo { WorkingDirectory = workingDirectory };
-            RemoteInvoke(wd => { Assert.Equal(wd, Directory.GetCurrentDirectory()); return SuccessExitCode; }, workingDirectory, new RemoteInvokeOptions { StartInfo = psi }).Dispose();
+            RemoteExecutor.Invoke(wd =>
+            {
+                Assert.Equal(wd, Directory.GetCurrentDirectory());
+                return RemoteExecutor.SuccessExitCode;
+            }, workingDirectory, new RemoteInvokeOptions { StartInfo = psi }).Dispose();
         }
 
         [ActiveIssue(12696)]
index 86afa60..933616e 100644 (file)
@@ -9,6 +9,7 @@ using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.Tests
@@ -170,7 +171,7 @@ namespace System.Diagnostics.Tests
                 Console.WriteLine(2);
                 await pipeWrite.WriteAsync(new byte[1], 0, 1);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
 
@@ -292,7 +293,7 @@ namespace System.Diagnostics.Tests
                 Console.WriteLine(8);
                 Console.WriteLine(9);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
 
index 3ce842e..4ebc3d8 100644 (file)
@@ -11,8 +11,6 @@ namespace System.Diagnostics.Tests
 {
     partial class ProcessTestBase
     {
-        protected static readonly string RunnerName = HostRunner;
-
         protected Process CreateProcessLong()
         {
             return CreateSleepProcess(RemotelyInvokable.WaitInMS);
index 91f9ae8..8fc6801 100644 (file)
@@ -7,11 +7,12 @@ using System.IO;
 using System.Reflection;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.Tests
 {
-    public partial class ProcessTestBase : RemoteExecutorTestBase
+    public partial class ProcessTestBase : FileCleanupTestBase
     {
         protected const int WaitInMS = 30 * 1000;
         protected Process _process;
@@ -50,7 +51,7 @@ namespace System.Diagnostics.Tests
         protected Process CreateProcess(Func<int> method = null)
         {
             Process p = null;
-            using (RemoteInvokeHandle handle = RemoteInvoke(method ?? (() => SuccessExitCode), new RemoteInvokeOptions { Start = false }))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(method ?? (() => RemoteExecutor.SuccessExitCode), new RemoteInvokeOptions { Start = false }))
             {
                 p = handle.Process;
                 handle.Process = null;
@@ -62,7 +63,7 @@ namespace System.Diagnostics.Tests
         protected Process CreateProcess(Func<string, int> method, string arg, bool autoDispose = true)
         {
             Process p = null;
-            using (RemoteInvokeHandle handle = RemoteInvoke(method, arg, new RemoteInvokeOptions { Start = false }))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(method, arg, new RemoteInvokeOptions { Start = false }))
             {
                 p = handle.Process;
                 handle.Process = null;
@@ -76,7 +77,7 @@ namespace System.Diagnostics.Tests
         protected Process CreateProcess(Func<string, Task<int>> method, string arg)
         {
             Process p = null;
-            using (RemoteInvokeHandle handle = RemoteInvoke(method, arg, new RemoteInvokeOptions { Start = false }))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(method, arg, new RemoteInvokeOptions { Start = false }))
             {
                 p = handle.Process;
                 handle.Process = null;
index 73d0486..94de927 100644 (file)
@@ -13,6 +13,7 @@ using System.Threading;
 using System.Threading.Tasks;
 using System.Security;
 using Xunit;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.DotNet.XUnitExtensions;
 
 namespace System.Diagnostics.Tests
@@ -173,7 +174,7 @@ namespace System.Diagnostics.Tests
 
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.StartInfo.EnvironmentVariables["PATH"] = path;
-            RemoteInvoke(fileToOpen =>
+            RemoteExecutor.Invoke(fileToOpen =>
             {
                 using (var px = Process.Start(new ProcessStartInfo { UseShellExecute = true, FileName = fileToOpen }))
                 {
@@ -244,7 +245,7 @@ namespace System.Diagnostics.Tests
 
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.StartInfo.EnvironmentVariables["PATH"] = path;
-            RemoteInvoke((argVerb, argValid) =>
+            RemoteExecutor.Invoke((argVerb, argValid) =>
             {
                 if (argVerb == "<null>")
                 {
@@ -519,7 +520,7 @@ namespace System.Diagnostics.Tests
                 Assert.Subset(expectedGroups, GetGroups());
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
 
         [Fact]
@@ -538,7 +539,7 @@ namespace System.Diagnostics.Tests
             // Start as username
             var invokeOptions = new RemoteInvokeOptions();
             invokeOptions.StartInfo.UserName = userName;
-            using (RemoteInvokeHandle handle = RemoteInvoke(CheckUserAndGroupIds, userId, userGroupId, userGroupIds, checkGroupsExact.ToString(),
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(CheckUserAndGroupIds, userId, userGroupId, userGroupIds, checkGroupsExact.ToString(),
                                                             invokeOptions))
             { }
         }
@@ -580,15 +581,15 @@ namespace System.Diagnostics.Tests
                 // Start as username
                 var invokeOptions = new RemoteInvokeOptions();
                 invokeOptions.StartInfo.UserName = username;
-                using (RemoteInvokeHandle handle = RemoteInvoke(CheckUserAndGroupIds, userId, userGroupId, userGroupIds, checkGroupsExact.ToString(), invokeOptions))
+                using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(CheckUserAndGroupIds, userId, userGroupId, userGroupIds, checkGroupsExact.ToString(), invokeOptions))
                 { }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             };
 
             // Start as root
             string userName = GetCurrentRealUserName();
-            using (RemoteInvokeHandle handle = RemoteInvoke(runsAsRoot, userName, useRootGroups.ToString(),
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(runsAsRoot, userName, useRootGroups.ToString(),
                                                             new RemoteInvokeOptions { RunAsSudo = true }))
             { }
         }
@@ -816,9 +817,9 @@ namespace System.Diagnostics.Tests
             {
                 // Create a process that isn't a direct child.
                 int nonChildPid = -1;
-                RemoteInvokeHandle createNonChildProcess = RemoteInvoke(arg =>
+                RemoteInvokeHandle createNonChildProcess = RemoteExecutor.Invoke(arg =>
                 {
-                    RemoteInvokeHandle nonChildProcess = RemoteInvoke(
+                    RemoteInvokeHandle nonChildProcess = RemoteExecutor.Invoke(
                         // Process that lives as long as the test process.
                         testProcessPid => Process.GetProcessById(int.Parse(testProcessPid)).WaitForExit(), arg,
                         // Don't pass our standard out to the sleepProcess or the ReadToEnd below won't return.
@@ -866,7 +867,7 @@ namespace System.Diagnostics.Tests
             {
                 RunAsSudo = true
             };
-            using (RemoteInvokeHandle handle = RemoteInvoke(testMethod, arg, options))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(testMethod, arg, options))
             { }
         }
 
index 290d763..fe0897f 100644 (file)
@@ -12,6 +12,7 @@ using System.Runtime.InteropServices;
 using System.Security;
 using System.Text;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.Win32.SafeHandles;
 using Xunit;
 using Xunit.Sdk;
@@ -255,7 +256,7 @@ namespace System.Diagnostics.Tests
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.StartInfo.EnvironmentVariables["PATH"] = path;
             options.StartInfo.WorkingDirectory = wd;
-            RemoteInvoke(pathDirectory =>
+            RemoteExecutor.Invoke(pathDirectory =>
             {
                 // Create two identically named scripts, one in the working directory and one on PATH.
                 const int workingDirReturnValue = 1;
@@ -280,7 +281,7 @@ namespace System.Diagnostics.Tests
                     Assert.Equal(pathDirReturnValue, process.ExitCode);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, path, options).Dispose();
         }
 
@@ -314,7 +315,7 @@ namespace System.Diagnostics.Tests
                 Process p = CreateProcessPortable(RemotelyInvokable.Dummy);
                 p.Start();
                 Assert.True(p.WaitForExit(WaitInMS));
-                Assert.Equal(SuccessExitCode, p.ExitCode);
+                Assert.Equal(RemoteExecutor.SuccessExitCode, p.ExitCode);
             }
 
             {
@@ -375,7 +376,7 @@ namespace System.Diagnostics.Tests
             }
             else
             {
-                IEnumerable<int> testProcessIds = Process.GetProcessesByName(HostRunnerName).Select(p => p.Id);
+                IEnumerable<int> testProcessIds = Process.GetProcessesByName(RemoteExecutor.HostRunnerName).Select(p => p.Id);
                 Assert.Contains(_process.Id, testProcessIds);
             }
         }
@@ -450,9 +451,9 @@ namespace System.Diagnostics.Tests
                 (s) => s;
 
             Assert.True(p.Modules.Count > 0);
-            Assert.Equal(normalize(HostRunnerName), normalize(p.MainModule.ModuleName));
-            Assert.EndsWith(normalize(HostRunnerName), normalize(p.MainModule.FileName));
-            Assert.Equal(normalize(string.Format("System.Diagnostics.ProcessModule ({0})", HostRunnerName)), normalize(p.MainModule.ToString()));
+            Assert.Equal(normalize(RemoteExecutor.HostRunnerName), normalize(p.MainModule.ModuleName));
+            Assert.EndsWith(normalize(RemoteExecutor.HostRunnerName), normalize(p.MainModule.FileName));
+            Assert.Equal(normalize(string.Format("System.Diagnostics.ProcessModule ({0})", RemoteExecutor.HostRunnerName)), normalize(p.MainModule.ToString()));
         }
 
         [Fact]
@@ -927,8 +928,7 @@ namespace System.Diagnostics.Tests
         {
             CreateDefaultProcess();
 
-            string expected = PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative ? TestConsoleApp : HostRunner;
-            Assert.Equal(Path.GetFileNameWithoutExtension(expected), Path.GetFileNameWithoutExtension(_process.ProcessName), StringComparer.OrdinalIgnoreCase);
+            Assert.Equal(Path.GetFileNameWithoutExtension(RemoteExecutor.HostRunner), Path.GetFileNameWithoutExtension(_process.ProcessName), StringComparer.OrdinalIgnoreCase);
         }
 
         [Fact]
@@ -952,7 +952,7 @@ namespace System.Diagnostics.Tests
         [InlineData(true)]
         public void Handle_CreateEvent_BlocksUntilProcessCompleted(bool useSafeHandle)
         {
-            using (RemoteInvokeHandle h = RemoteInvoke(() => Console.ReadLine(), new RemoteInvokeOptions { StartInfo = new ProcessStartInfo() { RedirectStandardInput = true } }))
+            using (RemoteInvokeHandle h = RemoteExecutor.Invoke(() => Console.ReadLine(), new RemoteInvokeOptions { StartInfo = new ProcessStartInfo() { RedirectStandardInput = true } }))
             using (var mre = new ManualResetEvent(false))
             {
                 mre.SetSafeWaitHandle(new SafeWaitHandle(useSafeHandle ? h.Process.SafeHandle.DangerousGetHandle() : h.Process.Handle, ownsHandle: false));
@@ -961,7 +961,7 @@ namespace System.Diagnostics.Tests
 
                 h.Process.StandardInput.WriteLine(); // allow child to complete
 
-                Assert.True(mre.WaitOne(FailWaitTimeoutMilliseconds), "Event should have been set.");
+                Assert.True(mre.WaitOne(RemoteExecutor.FailWaitTimeoutMilliseconds), "Event should have been set.");
             }
         }
 
@@ -1232,7 +1232,7 @@ namespace System.Diagnostics.Tests
             process.Start();
 
             // Processes are not hosted by dotnet in the full .NET Framework.
-            string expectedFileName = PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative ? TestConsoleApp : RunnerName;
+            string expectedFileName = (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative) ? RemoteExecutor.HostRunner : RemoteExecutor.HostRunner;
             Assert.Equal(expectedFileName, process.StartInfo.FileName);
 
             process.Kill();
@@ -1267,8 +1267,8 @@ namespace System.Diagnostics.Tests
         [Fact]
         public void StartInfo_SetGet_ReturnsExpected()
         {
-            var process = new Process() { StartInfo = new ProcessStartInfo(TestConsoleApp) };
-            Assert.Equal(TestConsoleApp, process.StartInfo.FileName);
+            var process = new Process() { StartInfo = new ProcessStartInfo(RemoteExecutor.HostRunner) };
+            Assert.Equal(RemoteExecutor.HostRunner, process.StartInfo.FileName);
         }
 
         [Fact]
@@ -1323,7 +1323,7 @@ namespace System.Diagnostics.Tests
                 StartInfo = new ProcessStartInfo { RedirectStandardOutput = true }
             };
 
-            using (RemoteInvokeHandle handle = RemoteInvokeRaw((Func<string, string, string, int>)RemotelyInvokable.ConcatThreeArguments, inputArguments, options))
+            using (RemoteInvokeHandle handle = RemoteExecutor.InvokeRaw((Func<string, string, string, int>)RemotelyInvokable.ConcatThreeArguments, inputArguments, options))
             {
                 Assert.Equal(expectedArgv, handle.Process.StandardOutput.ReadToEnd());
             }
@@ -1428,7 +1428,7 @@ namespace System.Diagnostics.Tests
             using (Process process = CreateProcess(() =>
             {
                 Console.WriteLine("hello world");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }))
             {
                 process.StartInfo.RedirectStandardOutput = true;
@@ -1477,7 +1477,7 @@ namespace System.Diagnostics.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
         public void HandleCountChanges()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Process p = Process.GetCurrentProcess();
                 int handleCount = p.HandleCount;
@@ -1493,7 +1493,7 @@ namespace System.Diagnostics.Tests
                 p.Refresh();
                 int thirdHandleCount = p.HandleCount;
                 Assert.True(thirdHandleCount < handleCount);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 55fafcd..e827ddc 100644 (file)
@@ -9,6 +9,7 @@ using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.Tests
@@ -352,7 +353,7 @@ namespace System.Diagnostics.Tests
                 Thread.Sleep(Timeout.Infinite);
 
                 // never reaches here -- but necessary to satisfy method's signature
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
 
             void SendMessage(string message, string handleAsString)
index f650472..89c9843 100644 (file)
@@ -6,6 +6,7 @@ using System.IO;
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.Tests
@@ -160,7 +161,7 @@ namespace System.Diagnostics.Tests
                 Process peer = Process.GetProcessById(int.Parse(peerId));
                 Console.WriteLine("Signal");
                 Assert.True(peer.WaitForExit(WaitInMS));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, child1.Id.ToString());
             child2.StartInfo.RedirectStandardOutput = true;
             child2.Start();
@@ -172,7 +173,7 @@ namespace System.Diagnostics.Tests
             Assert.True(child1.WaitForExit(WaitInMS));
             Assert.True(child2.WaitForExit(WaitInMS));
 
-            Assert.Equal(SuccessExitCode, child2.ExitCode);
+            Assert.Equal(RemoteExecutor.SuccessExitCode, child2.ExitCode);
         }
 
         [Fact]
@@ -231,7 +232,7 @@ namespace System.Diagnostics.Tests
                 {
                     Process child2 = CreateProcess(() =>
                     {
-                        Process child3 = CreateProcess(() => SuccessExitCode);
+                        Process child3 = CreateProcess(() => RemoteExecutor.SuccessExitCode);
                         child3.Start();
                         Assert.True(child3.WaitForExit(WaitInMS));
                         return child3.ExitCode;
@@ -246,7 +247,7 @@ namespace System.Diagnostics.Tests
             });
             root.Start();
             Assert.True(root.WaitForExit(WaitInMS));
-            Assert.Equal(SuccessExitCode, root.ExitCode);
+            Assert.Equal(RemoteExecutor.SuccessExitCode, root.ExitCode);
         }
 
         [Fact]
@@ -255,7 +256,7 @@ namespace System.Diagnostics.Tests
             Process child = CreateProcessPortable(RemotelyInvokable.SelfTerminate);
             child.Start();
             Assert.True(child.WaitForExit(WaitInMS));
-            Assert.NotEqual(SuccessExitCode, child.ExitCode);
+            Assert.NotEqual(RemoteExecutor.SuccessExitCode, child.ExitCode);
         }
 
         [Fact]
index f53b3e8..c3c4e27 100644 (file)
@@ -3,6 +3,7 @@
     <ProjectGuid>{E1114510-844C-4BB2-BBAD-8595BD16E24B}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);TargetsWindows</DefineConstants>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="ProcessStreamReadTests.netcoreapp.cs" />
     <Compile Include="ProcessTests.netcoreapp.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
   <!-- WINDOWS: Shared CoreCLR and .NET Native -->
   <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
     <Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.Windows.cs">
index 7c7d507..40cbf2d 100644 (file)
@@ -3,11 +3,12 @@
 // See the LICENSE file in the project root for more information.
 
 using System.IO;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.TextWriterTraceListenerTests
 {
-    public class ConsoleTraceListenerTests : RemoteExecutorTestBase
+    public class ConsoleTraceListenerTests
     {
         [Fact]
         public static void DefaultCtorPropertiesCheck()
@@ -42,7 +43,7 @@ namespace System.Diagnostics.TextWriterTraceListenerTests
         [InlineData(true)]
         public static void WriteExpectedOutput(bool value)
         {
-            RemoteInvoke((_value) =>
+            RemoteExecutor.Invoke((_value) =>
             {
                 string message = "Write this message please";
                 bool setErrorStream = bool.Parse(_value);
@@ -62,7 +63,7 @@ namespace System.Diagnostics.TextWriterTraceListenerTests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, value.ToString()).Dispose();
         }
 
@@ -71,7 +72,7 @@ namespace System.Diagnostics.TextWriterTraceListenerTests
         [InlineData(true)]
         public static void WriteLineExpectedOutput(bool value)
         {
-            RemoteInvoke((_value) =>
+            RemoteExecutor.Invoke((_value) =>
             {
                 string message = "A new message to the listener";
                 bool setErrorStream = bool.Parse(_value);
@@ -89,7 +90,7 @@ namespace System.Diagnostics.TextWriterTraceListenerTests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, value.ToString()).Dispose();
         }
     }
index 00ad28d..5652238 100644 (file)
@@ -1,6 +1,7 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{92A9467A-9F7E-4294-A7D5-7B59F2E54ABE}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="ConsoleTraceListenerTests.cs" />
     <Compile Include="XmlWriterTraceListenerTests.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 3104592..36bc7a7 100644 (file)
@@ -8,7 +8,7 @@ using Xunit;
 
 namespace System.Diagnostics.TraceSourceTests
 {
-    public partial class DefaultTraceListenerClassTests : RemoteExecutorTestBase
+    public partial class DefaultTraceListenerClassTests : FileCleanupTestBase
     {
         private class TestDefaultTraceListener : DefaultTraceListener
         {
index 6655ce2..0dacf4e 100644 (file)
@@ -6,16 +6,17 @@ using System.IO;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Diagnostics.TraceSourceTests
 {
-    public partial class DefaultTraceListenerClassTests : RemoteExecutorTestBase
+    public partial class DefaultTraceListenerClassTests
     {
         [Fact]
         public void EntryAssemblyName_Default_IncludedInTrace()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var listener = new TestDefaultTraceListener();
                 Trace.Listeners.Add(listener);
@@ -27,7 +28,7 @@ namespace System.Diagnostics.TraceSourceTests
         [Fact]
         public void EntryAssemblyName_Null_NotIncludedInTrace()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 MakeAssemblyGetEntryAssemblyReturnNull();
 
index ff8c22b..799ca21 100644 (file)
@@ -1,8 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <RootNamespace>System.Diagnostics.TraceSourceTests</RootNamespace>
-    <AssemblyName>System.Diagnostics.TraceSource.Tests</AssemblyName>
     <ProjectGuid>{7B32D24D-969A-4F7F-8461-B43E15E5D553}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
     <Compile Include="DefaultTraceListenerClassTests.netcoreapp.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index cd396d6..af38839 100644 (file)
@@ -33,7 +33,7 @@ using Xunit;
 
 namespace System.Drawing.Tests
 {
-    public class BitmapTests : RemoteExecutorTestBase
+    public class BitmapTests : FileCleanupTestBase
     {
         public static IEnumerable<object[]> Ctor_FilePath_TestData()
         {
index 3bed03b..f01f72d 100644 (file)
@@ -30,11 +30,12 @@ using System.IO;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Runtime.Serialization.Formatters.Binary;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Drawing.Tests
 {
-    public class IconTests : RemoteExecutorTestBase
+    public class IconTests
     {
         [ConditionalTheory(Helpers.IsDrawingSupported)]
         [InlineData("48x48_multiple_entries_4bit.ico")]
@@ -619,11 +620,11 @@ namespace System.Drawing.Tests
 
             if (!AppContext.TryGetSwitch(DontSupportPngFramesInIcons, out bool isEnabled) || isEnabled)
             {
-                RemoteInvoke(() =>
+                RemoteExecutor.Invoke(() =>
                 {
                     AppContext.SetSwitch(DontSupportPngFramesInIcons, false);
                     VerifyPng();
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }).Dispose();
             }
             else
@@ -646,11 +647,11 @@ namespace System.Drawing.Tests
 
             if (!AppContext.TryGetSwitch(DontSupportPngFramesInIcons, out bool isEnabled) || !isEnabled)
             {
-                RemoteInvoke(() =>
+                RemoteExecutor.Invoke(() =>
                 {
                     AppContext.SetSwitch(DontSupportPngFramesInIcons, true);
                     VerifyPngNotSupported();
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }).Dispose();
             }
             else
index fa48906..a420ded 100644 (file)
@@ -2,8 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{4B93E684-0630-45F4-8F63-6C7788C9892F}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
     <TestDataPackageVersion>1.0.7</TestDataPackageVersion>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="BitmapTests.cs" />
     <Compile Include="Printing\PaperSourceTests.cs" />
     <Compile Include="Printing\PrinterUnitConvertTests.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 14dba56..fe1736e 100644 (file)
@@ -11,7 +11,7 @@ namespace System.Drawing.Tests
 {
     public class bitmap_173x183_indexed_8bit { }
 
-    public class ToolboxBitmapAttributeTests : RemoteExecutorTestBase
+    public class ToolboxBitmapAttributeTests
     {
         private static Size DefaultSize = new Size(16, 16);
         private void AssertDefaultSize(Image image)
index 2882ab6..86856ef 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Globalization.Tests
 {
-    public class CurrentCultureTests : RemoteExecutorTestBase
+    public class CurrentCultureTests
     {
         [Fact]
         public void CurrentCulture()
@@ -17,7 +18,7 @@ namespace System.Globalization.Tests
             if (PlatformDetection.IsNetNative && !PlatformDetection.IsInAppContainer) // Tide us over until .NET Native ILC tests run are run inside an appcontainer.
                 return;
 
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo newCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
                 CultureInfo.CurrentCulture = newCulture;
@@ -30,7 +31,7 @@ namespace System.Globalization.Tests
                 Assert.Equal(CultureInfo.CurrentCulture, newCulture);
                 Assert.Equal("de-DE_phoneb", newCulture.CompareInfo.Name);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -46,7 +47,7 @@ namespace System.Globalization.Tests
             if (PlatformDetection.IsNetNative && !PlatformDetection.IsInAppContainer) // Tide us over until .NET Native ILC tests run are run inside an appcontainer.
                 return;
 
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo newUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
                 CultureInfo.CurrentUICulture = newUICulture;
@@ -58,7 +59,7 @@ namespace System.Globalization.Tests
 
                 Assert.Equal(CultureInfo.CurrentUICulture, newUICulture);
                 Assert.Equal("de-DE_phoneb", newUICulture.CompareInfo.Name);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -66,7 +67,7 @@ namespace System.Globalization.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Thread cultures is not honored in UWP.")]
         public void DefaultThreadCurrentCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo newCulture = new CultureInfo(CultureInfo.DefaultThreadCurrentCulture == null || CultureInfo.DefaultThreadCurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
                 CultureInfo.DefaultThreadCurrentCulture = newCulture;
@@ -78,7 +79,7 @@ namespace System.Globalization.Tests
                 ((IAsyncResult)task).AsyncWaitHandle.WaitOne();
                 task.Wait();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -86,7 +87,7 @@ namespace System.Globalization.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Thread cultures is not honored in UWP.")]
         public void DefaultThreadCurrentUICulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo newUICulture = new CultureInfo(CultureInfo.DefaultThreadCurrentUICulture == null || CultureInfo.DefaultThreadCurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
                 CultureInfo.DefaultThreadCurrentUICulture = newUICulture;
@@ -98,7 +99,7 @@ namespace System.Globalization.Tests
                 ((IAsyncResult)task).AsyncWaitHandle.WaitOne();
                 task.Wait();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -124,7 +125,7 @@ namespace System.Globalization.Tests
 
             psi.Environment["LANG"] = langEnvVar;
 
-            RemoteInvoke(expected =>
+            RemoteExecutor.Invoke(expected =>
             {
                 Assert.NotNull(CultureInfo.CurrentCulture);
                 Assert.NotNull(CultureInfo.CurrentUICulture);
@@ -132,7 +133,7 @@ namespace System.Globalization.Tests
                 Assert.Equal(expected, CultureInfo.CurrentCulture.Name);
                 Assert.Equal(expected, CultureInfo.CurrentUICulture.Name);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, expectedCultureName, new RemoteInvokeOptions { StartInfo = psi }).Dispose();
         }
 
@@ -152,7 +153,7 @@ namespace System.Globalization.Tests
                psi.Environment["LANG"] = langEnvVar;
             }
 
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.NotNull(CultureInfo.CurrentCulture);
                 Assert.NotNull(CultureInfo.CurrentUICulture);
@@ -160,7 +161,7 @@ namespace System.Globalization.Tests
                 Assert.Equal("", CultureInfo.CurrentCulture.Name);
                 Assert.Equal("", CultureInfo.CurrentUICulture.Name);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, new RemoteInvokeOptions { StartInfo = psi }).Dispose();
         }
 
index c10e86d..93e7b4d 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Collections.Generic;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Globalization.Tests
 {
-    public class CultureInfoDateTimeFormat : RemoteExecutorTestBase
+    public class CultureInfoDateTimeFormat
     {
         public static IEnumerable<object[]> DateTimeFormatInfo_Set_TestData()
         {
@@ -35,14 +36,14 @@ namespace System.Globalization.Tests
         [Fact]
         public void TestSettingThreadCultures()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo culture = new CultureInfo("ja-JP");
                 CultureInfo.CurrentCulture = culture;
                 DateTime dt = new DateTime(2014, 3, 14, 3, 14, 0);
                 Assert.Equal(dt.ToString(), dt.ToString(culture));
                 Assert.Equal(dt.ToString(), dt.ToString(culture.DateTimeFormat));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 655cf93..f47ba59 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Collections.Generic;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Globalization.Tests
 {
-    public class NumberFormatInfoCurrentInfo : RemoteExecutorTestBase
+    public class NumberFormatInfoCurrentInfo
     {
         public static IEnumerable<object[]> CurrentInfo_CustomCulture_TestData()
         {
@@ -22,34 +23,34 @@ namespace System.Globalization.Tests
         [MemberData(nameof(CurrentInfo_CustomCulture_TestData))]
         public void CurrentInfo_CustomCulture(CultureInfo newCurrentCulture)
         {
-            RemoteInvoke((cultureName) =>
+            RemoteExecutor.Invoke((cultureName) =>
             {
                 CultureInfo newCulture = CultureInfo.GetCultureInfo(cultureName);
                 CultureInfo.CurrentCulture = newCulture;
                 Assert.Same(newCulture.NumberFormat, NumberFormatInfo.CurrentInfo);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, newCurrentCulture.Name).Dispose();
         }
 
         [Fact]
         public void CurrentInfo_Subclass_OverridesGetFormat()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfoSubclassOverridesGetFormat("en-US");
                 Assert.Same(CultureInfoSubclassOverridesGetFormat.CustomFormat, NumberFormatInfo.CurrentInfo);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void CurrentInfo_Subclass_OverridesNumberFormat()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfoSubclassOverridesNumberFormat("en-US");
                 Assert.Same(CultureInfoSubclassOverridesNumberFormat.CustomFormat, NumberFormatInfo.CurrentInfo);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 9261d20..dbf50eb 100644 (file)
@@ -1,9 +1,10 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <ProjectGuid>{484C92C6-6D2C-45BC-A5E2-4A12BA228E1E}</ProjectGuid>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="CompareInfo\CompareInfoTests.cs" />
     <Compile Include="$(CommonTestPath)\System\RandomDataGenerator.cs">
       <Link>Common\System\RandomDataGenerator.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup Condition="'$(TargetGroup)' != 'netfx' And '$(TargetGroup)' != 'netstandard'">
     <Compile Include="CompareInfo\CompareInfoTests.netcoreapp.cs" />
index 830b89a..9586135 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Globalization.Tests
 {
-    public class RegionInfoPropertyTests : RemoteExecutorTestBase
+    public class RegionInfoPropertyTests
     {
         [Theory]
         [InlineData("US", "US", "US")]
@@ -53,7 +54,7 @@ namespace System.Globalization.Tests
         [Fact]
         public void CurrentRegion()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
@@ -61,7 +62,7 @@ namespace System.Globalization.Tests
                 Assert.True(RegionInfo.CurrentRegion.Equals(ri) || RegionInfo.CurrentRegion.Equals(new RegionInfo(CultureInfo.CurrentCulture.Name)));
                 Assert.Same(RegionInfo.CurrentRegion, RegionInfo.CurrentRegion);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -69,12 +70,12 @@ namespace System.Globalization.Tests
         [InlineData("en-US", "United States")]
         public void DisplayName(string name, string expected)
         {
-            RemoteInvoke((string _name, string _expected) =>
+            RemoteExecutor.Invoke((string _name, string _expected) =>
             {
                 CultureInfo.CurrentUICulture = new CultureInfo(_name);
                 Assert.Equal(_expected, new RegionInfo(_name).DisplayName);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, name, expected).Dispose();
         }
 
index 0afa64c..080df4e 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -27,7 +28,7 @@ namespace System.IO.Tests
         public void FileNameIsToString_NotFullPath()
         {
             // We're checking that we're maintaining the original path
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Environment.CurrentDirectory = TestDirectory;
                 string subdir = Path.GetRandomFileName();
index 01402a2..d9b5b8e 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -333,7 +334,7 @@ namespace System.IO.Tests
         #endregion
     }
 
-    public sealed class Directory_GetEntries_CurrentDirectory : RemoteExecutorTestBase
+    public sealed class Directory_GetEntries_CurrentDirectory : FileCleanupTestBase
     {
         [Fact]
         public void CurrentDirectory()
@@ -342,7 +343,7 @@ namespace System.IO.Tests
             Directory.CreateDirectory(testDir);
             File.WriteAllText(Path.Combine(testDir, GetTestFileName()), "cat");
             Directory.CreateDirectory(Path.Combine(testDir, GetTestFileName()));
-            RemoteInvoke((testDirectory) =>
+            RemoteExecutor.Invoke((testDirectory) =>
             {
                 Directory.SetCurrentDirectory(testDirectory);
 
@@ -376,7 +377,7 @@ namespace System.IO.Tests
                 Assert.NotEmpty(Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*", SearchOption.AllDirectories));
                 Assert.NotEmpty(Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*", SearchOption.TopDirectoryOnly));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, testDir).Dispose();
         }
     }
index df3fd27..1638886 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.Runtime.InteropServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
 {
-    public sealed class Directory_SetCurrentDirectory : RemoteExecutorTestBase
+    public sealed class Directory_SetCurrentDirectory : FileCleanupTestBase
     {
         [Fact]
         public void Null_Path_Throws_ArgumentNullException()
@@ -31,7 +32,7 @@ namespace System.IO.Tests
         [Fact]
         public void SetToValidOtherDirectory()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Directory.SetCurrentDirectory(TestDirectory);
                 // On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current
@@ -41,7 +42,7 @@ namespace System.IO.Tests
                 {
                     Assert.Equal(TestDirectory, Directory.GetCurrentDirectory());
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -50,7 +51,7 @@ namespace System.IO.Tests
             [ConditionalFact(nameof(CanCreateSymbolicLinks))]
             public void SetToPathContainingSymLink()
             {
-                RemoteInvoke(() =>
+                RemoteExecutor.Invoke(() =>
                 {
                     var path = GetTestFilePath();
                     var linkPath = GetTestFilePath();
@@ -78,7 +79,7 @@ namespace System.IO.Tests
                     {
                         Assert.Equal(path, Directory.GetCurrentDirectory());
                     }
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }).Dispose();
             }
         }
index 2bc2313..046bfcc 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -137,11 +138,11 @@ namespace System.IO.Tests
             string path = GetTestFilePath();
             using (FileStream stream = new FileStream(path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
             {
-                RemoteInvoke((p) =>
+                RemoteExecutor.Invoke((p) =>
                 {
                     FileInfo info = new FileInfo(p);
                     Assert.True(info.Exists);
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, path).Dispose();
             }
         }
@@ -157,11 +158,11 @@ namespace System.IO.Tests
             {
                 stream.Lock(0, 10);
 
-                RemoteInvoke((p) =>
+                RemoteExecutor.Invoke((p) =>
                 {
                     FileInfo info = new FileInfo(p);
                     Assert.True(info.Exists);
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, path).Dispose();
 
                 stream.Unlock(0, 10);
index edee857..ba88324 100644 (file)
@@ -6,6 +6,7 @@ using Microsoft.Win32.SafeHandles;
 using System;
 using System.Diagnostics;
 using System.IO;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -68,7 +69,7 @@ namespace System.IO.Tests
         [Fact]
         public void Dispose_CallsVirtualDisposeTrueArg_ThrowsDuringFlushWriteBuffer_DisposeThrows()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string fileName = GetTestFilePath();
                 using (FileStream fscreate = new FileStream(fileName, FileMode.Create))
@@ -107,7 +108,7 @@ namespace System.IO.Tests
                     }
                     Assert.False(writeDisposeInvoked, "Expected finalizer to have been suppressed");
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -115,7 +116,7 @@ namespace System.IO.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing fix for https://github.com/dotnet/coreclr/pull/16250")]
         public void NoDispose_CallsVirtualDisposeFalseArg_ThrowsDuringFlushWriteBuffer_FinalizerWontThrow()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string fileName = GetTestFilePath();
                 using (FileStream fscreate = new FileStream(fileName, FileMode.Create))
@@ -146,7 +147,7 @@ namespace System.IO.Tests
                     }
                     Assert.True(writeDisposeInvoked, "Expected finalizer to be invoked but not throw exception");
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 68e7a56..7773169 100644 (file)
@@ -3,11 +3,12 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
 {
-    public class FileStream_LockUnlock : RemoteExecutorTestBase
+    public class FileStream_LockUnlock : FileCleanupTestBase
     {
         [Fact]
         public void InvalidArgs_Throws()
@@ -171,24 +172,24 @@ namespace System.IO.Tests
             {
                 fs1.Lock(firstPosition, firstLength);
 
-                RemoteInvoke((secondPath, secondPos, secondLen) =>
+                RemoteExecutor.Invoke((secondPath, secondPos, secondLen) =>
                 {
                     using (FileStream fs2 = File.Open(secondPath, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
                     {
                         Assert.Throws<IOException>(() => fs2.Lock(long.Parse(secondPos), long.Parse(secondLen)));
                     }
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, path, secondPosition.ToString(), secondLength.ToString()).Dispose();
 
                 fs1.Unlock(firstPosition, firstLength);
-                RemoteInvoke((secondPath, secondPos, secondLen) =>
+                RemoteExecutor.Invoke((secondPath, secondPos, secondLen) =>
                 {
                     using (FileStream fs2 = File.Open(secondPath, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
                     {
                         fs2.Lock(long.Parse(secondPos), long.Parse(secondLen));
                         fs2.Unlock(long.Parse(secondPos), long.Parse(secondLen));
                     }
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, path, secondPosition.ToString(), secondLength.ToString()).Dispose();
             }
         }
index d4dde6e..ad6c44a 100644 (file)
@@ -5,6 +5,7 @@
 using System;
 using System.Globalization;
 using System.IO;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -40,7 +41,7 @@ namespace System.IO.Tests
         [Fact]
         public void NameReturnsUnknownForHandle()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index c3e0adf..e722773 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.IO;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -61,7 +62,7 @@ namespace System.IO.Tests
         [Fact]
         public void FileShareOpen_Inheritable()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 int i = 0;
                 foreach (FileAccess access in new[] { FileAccess.ReadWrite, FileAccess.Write, FileAccess.Read })
@@ -73,7 +74,7 @@ namespace System.IO.Tests
                         CreateFileStream(fileName, FileMode.Open, access, share | FileShare.Inheritable).Dispose();
                     }
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index ff21035..1e9e23b 100644 (file)
@@ -7,7 +7,7 @@ using Xunit;
 
 namespace System.IO.Tests
 {
-    public abstract partial class FileSystemTest : RemoteExecutorTestBase
+    public abstract partial class FileSystemTest : FileCleanupTestBase
     {
         public static readonly byte[] TestBuffer = { 0xBA, 0x5E, 0xBA, 0x11, 0xF0, 0x07, 0xBA, 0x11 };
 
index 982e47c..6ee7fdc 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{F0D49126-6A1C-42D5-9428-4374C868BAF8}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonTestPath)\System\IO\PathFeatures.cs">
       <Link>Common\System\IO\PathFeatures.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup Condition="'$(TargetGroup)' == 'uapaot' or '$(TargetGroup)' == 'uap'">
     <Reference Include="mscorlib" />
index 1916d09..8ab08e3 100644 (file)
@@ -3,11 +3,12 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.MemoryMappedFiles.Tests
 {
-    public class CrossProcessTests : RemoteExecutorTestBase
+    public class CrossProcessTests : FileCleanupTestBase
     {
         [Fact]
         public void DataShared()
@@ -27,7 +28,7 @@ namespace System.IO.MemoryMappedFiles.Tests
                 acc.Flush();
 
                 // Spawn and then wait for the other process, which will verify the data and write its own known pattern
-                RemoteInvoke(new Func<string, int>(DataShared_OtherProcess), file.Path).Dispose();
+                RemoteExecutor.Invoke(new Func<string, int>(DataShared_OtherProcess), file.Path).Dispose();
 
                 // Now verify we're seeing the data from the other process
                 for (int i = 0; i < capacity; i++)
@@ -55,7 +56,7 @@ namespace System.IO.MemoryMappedFiles.Tests
                     acc.Write(i, unchecked((byte)(capacity - i - 1)));
                 }
                 acc.Flush();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
 
index 732c139..9f28726 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{9D6F6254-B5A3-40FF-8925-68AA8D1CE933}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     </Compile>
     <Compile Include="XunitAssemblyAttributes.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 25bc4bd..0b6ff5d 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Pipes.Tests
 {
-    public class AnonymousPipeTest_CrossProcess : RemoteExecutorTestBase
+    public class AnonymousPipeTest_CrossProcess
     {
         [Fact]
         public void PingPong()
@@ -17,7 +18,7 @@ namespace System.IO.Pipes.Tests
             // Then spawn another process to communicate with.
             using (var outbound = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable))
             using (var inbound = new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable))
-            using (var remote = RemoteInvoke(new Func<string, string, int>(ChildFunc), outbound.GetClientHandleAsString(), inbound.GetClientHandleAsString()))
+            using (var remote = RemoteExecutor.Invoke(new Func<string, string, int>(ChildFunc), outbound.GetClientHandleAsString(), inbound.GetClientHandleAsString()))
             {
                 // Close our local copies of the handles now that we've passed them of to the other process
                 outbound.DisposeLocalCopyOfClientHandle();
@@ -45,7 +46,7 @@ namespace System.IO.Pipes.Tests
                         outbound.WriteByte((byte)b);
                     }
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
 
@@ -53,7 +54,7 @@ namespace System.IO.Pipes.Tests
         public void ServerClosesPipe_ClientReceivesEof()
         {
             using (var pipe = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable))
-            using (var remote = RemoteInvoke(new Func<string, int>(ChildFunc), pipe.GetClientHandleAsString()))
+            using (var remote = RemoteExecutor.Invoke(new Func<string, int>(ChildFunc), pipe.GetClientHandleAsString()))
             {
                 pipe.DisposeLocalCopyOfClientHandle();
                 pipe.Write(new byte[] { 1, 2, 3, 4, 5 }, 0, 5);
@@ -73,7 +74,7 @@ namespace System.IO.Pipes.Tests
                     }
                     Assert.Equal(-1, pipe.ReadByte());
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
 
@@ -81,7 +82,7 @@ namespace System.IO.Pipes.Tests
         public void ClientClosesPipe_ServerReceivesEof()
         {
             using (var pipe = new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable))
-            using (var remote = RemoteInvoke(new Func<string, int>(ChildFunc), pipe.GetClientHandleAsString(), new RemoteInvokeOptions { CheckExitCode = false }))
+            using (var remote = RemoteExecutor.Invoke(new Func<string, int>(ChildFunc), pipe.GetClientHandleAsString(), new RemoteInvokeOptions { CheckExitCode = false }))
             {
                 pipe.DisposeLocalCopyOfClientHandle();
 
@@ -101,7 +102,7 @@ namespace System.IO.Pipes.Tests
                     pipe.Write(new byte[] { 1, 2, 3, 4, 5 }, 0, 5);
                 }
                 Thread.CurrentThread.Join();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
     }
index 929f00e..acb736a 100644 (file)
@@ -6,13 +6,14 @@ using System.Diagnostics;
 using System.Globalization;
 using System.Security.Principal;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.Win32.SafeHandles;
 using Xunit;
 
 namespace System.IO.Pipes.Tests
 {
     [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)]
-    public sealed class NamedPipeTest_CrossProcess : RemoteExecutorTestBase
+    public sealed class NamedPipeTest_CrossProcess
     {
         [Fact]
         public void InheritHandles_AvailableInChildProcess()
@@ -23,7 +24,7 @@ namespace System.IO.Pipes.Tests
             using (var client = new NamedPipeClientStream(".", pipeName, PipeDirection.Out, PipeOptions.None, TokenImpersonationLevel.None, HandleInheritability.Inheritable))
             {
                 Task.WaitAll(server.WaitForConnectionAsync(), client.ConnectAsync());
-                using (RemoteInvoke(new Func<string, int>(ChildFunc), client.SafePipeHandle.DangerousGetHandle().ToString()))
+                using (RemoteExecutor.Invoke(new Func<string, int>(ChildFunc), client.SafePipeHandle.DangerousGetHandle().ToString()))
                 {
                     client.Dispose();
                     for (int i = 0; i < 5; i++)
@@ -42,7 +43,7 @@ namespace System.IO.Pipes.Tests
                         childClient.WriteByte((byte)i);
                     }
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }
         }
 
@@ -57,7 +58,7 @@ namespace System.IO.Pipes.Tests
             // another process with which to communicate
             using (var outbound = new NamedPipeServerStream(outName, PipeDirection.Out))
             using (var inbound = new NamedPipeClientStream(".", inName, PipeDirection.In))
-            using (RemoteInvoke(new Func<string, string, int>(PingPong_OtherProcess), outName, inName))
+            using (RemoteExecutor.Invoke(new Func<string, string, int>(PingPong_OtherProcess), outName, inName))
             {
                 // Wait for both pipes to be connected
                 Task.WaitAll(outbound.WaitForConnectionAsync(), inbound.ConnectAsync());
@@ -83,7 +84,7 @@ namespace System.IO.Pipes.Tests
             // another process with which to communicate
             using (var outbound = new NamedPipeServerStream(outName, PipeDirection.Out))
             using (var inbound = new NamedPipeClientStream(".", inName, PipeDirection.In))
-            using (RemoteInvoke(new Func<string, string, int>(PingPong_OtherProcess), outName, inName))
+            using (RemoteExecutor.Invoke(new Func<string, string, int>(PingPong_OtherProcess), outName, inName))
             {
                 // Wait for both pipes to be connected
                 await Task.WhenAll(outbound.WaitForConnectionAsync(), inbound.ConnectAsync());
@@ -118,7 +119,7 @@ namespace System.IO.Pipes.Tests
                     outbound.WriteByte((byte)b);
                 }
             }
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
 
         private static string GetUniquePipeName()
index ee4d54d..f9a34c5 100644 (file)
@@ -5,15 +5,16 @@
 using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;
-using Xunit;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.DotNet.XUnitExtensions;
+using Xunit;
 
 namespace System.IO.Pipes.Tests
 {
     /// <summary>
     /// Negative tests for PipeOptions.CurrentUserOnly in Unix.
     /// </summary>
-    public class NamedPipeTest_CurrentUserOnly_Unix : RemoteExecutorTestBase
+    public class NamedPipeTest_CurrentUserOnly_Unix
     {
         [Theory]
         [OuterLoop("Needs sudo access")]
@@ -33,7 +34,7 @@ namespace System.IO.Pipes.Tests
             {
                 Task serverTask = server.WaitForConnectionAsync(CancellationToken.None);
 
-                using (RemoteInvoke(
+                using (RemoteExecutor.Invoke(
                     new Func<string, string, int>(ConnectClientFromRemoteInvoker),
                     pipeName,
                     clientPipeOptions == PipeOptions.CurrentUserOnly ? "true" : "false",
@@ -59,7 +60,7 @@ namespace System.IO.Pipes.Tests
                     client.Connect();
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
     }
 }
index fd3e9b6..6fd9943 100644 (file)
@@ -7,11 +7,12 @@ using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Security.Principal;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Pipes.Tests
 {
-    public class NamedPipeTest_RunAsClient : RemoteExecutorTestBase
+    public class NamedPipeTest_RunAsClient
     {
         [DllImport("libc", SetLastError = true)]
         internal static extern unsafe int seteuid(uint euid);
@@ -31,7 +32,7 @@ namespace System.IO.Pipes.Tests
         {
             string pipeName = Path.GetRandomFileName();
             uint pairID = (uint)(Math.Abs(new Random(5125123).Next()));
-            RemoteInvoke(new Func<string, string, int>(ServerConnectAsId), pipeName, pairID.ToString()).Dispose();
+            RemoteExecutor.Invoke(new Func<string, string, int>(ServerConnectAsId), pipeName, pairID.ToString()).Dispose();
         }
 
         private static int ServerConnectAsId(string pipeName, string pairIDString)
@@ -39,7 +40,7 @@ namespace System.IO.Pipes.Tests
             uint pairID = uint.Parse(pairIDString);
             Assert.NotEqual(-1, seteuid(pairID));
             using (var outbound = new NamedPipeServerStream(pipeName, PipeDirection.Out))
-            using (var handle = RemoteInvoke(new Func<string, string, int>(ClientConnectAsID), pipeName, pairIDString))
+            using (var handle = RemoteExecutor.Invoke(new Func<string, string, int>(ClientConnectAsID), pipeName, pairIDString))
             {
                 // Connect as the unpriveleged user, but RunAsClient as the superuser
                 outbound.WaitForConnection();
@@ -54,7 +55,7 @@ namespace System.IO.Pipes.Tests
                 Assert.True(ran, "Expected delegate to have been invoked");
                 Assert.Equal(pairID, ranAs);
             }
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
 
         private static int ClientConnectAsID(string pipeName, string pairIDString)
@@ -65,7 +66,7 @@ namespace System.IO.Pipes.Tests
                 Assert.NotEqual(-1, seteuid(pairID));
                 inbound.Connect();
             }
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
     }
 }
index 479b01c..4bf966c 100644 (file)
@@ -11,7 +11,7 @@ using Xunit;
 
 namespace System.IO.Pipes.Tests
 {
-    public partial class NamedPipeTest_RunAsClient : RemoteExecutorTestBase
+    public partial class NamedPipeTest_RunAsClient
     {
         [Theory]
         [InlineData(TokenImpersonationLevel.None)]
index 78276e7..ab1ee92 100644 (file)
@@ -2,9 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{142469EC-D665-4FE2-845A-FDA69F9CC557}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
-  <!-- Compiled Source Files -->
   <ItemGroup>
     <Compile Include="AnonymousPipeTests\AnonymousPipeTest.CreateServer.cs" />
     <Compile Include="AnonymousPipeTests\AnonymousPipeTest.CreateClient.cs" />
     <Compile Include="NamedPipeTests\NamedPipeTest.RunAsClient.Unix.cs" />
     <Compile Include="NativeOverlapped.unix.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 4c05030..0d7daa9 100644 (file)
@@ -2,17 +2,18 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using Xunit;
 using System;
 using System.Diagnostics;
 using System.Globalization;
 using System.IO;
 using System.Text;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
+using Xunit;
 
 namespace System.IO.Tests
 {
-    public partial class StringWriterTests : RemoteExecutorTestBase
+    public partial class StringWriterTests
     {
         static int[] iArrInvalidValues = new int[] { -1, -2, -100, -1000, -10000, -100000, -1000000, -10000000, -100000000, -1000000000, int.MinValue, short.MinValue };
         static int[] iArrLargeValues = new int[] { int.MaxValue, int.MaxValue - 1, int.MaxValue / 2, int.MaxValue / 10, int.MaxValue / 100 };
@@ -293,7 +294,7 @@ namespace System.IO.Tests
         [Fact]
         public static void TestWriteMisc()
         {
-            RemoteInvoke(() => 
+            RemoteExecutor.Invoke(() => 
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US"); // floating-point formatting comparison depends on culture
                 var sw = new StringWriter();
@@ -323,7 +324,7 @@ namespace System.IO.Tests
         [Fact]
         public static void TestWriteLineMisc()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US"); // floating-point formatting comparison depends on culture
                 var sw = new StringWriter();
index dec2d2d..af89d8e 100644 (file)
@@ -1,11 +1,11 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <RootNamespace>System.IO</RootNamespace>
-    <AssemblyName>System.IO.Tests</AssemblyName>
     <ProjectGuid>{492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02}</ProjectGuid>
+    <RootNamespace>System.IO</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="BinaryReader\BinaryReaderTests.netcoreapp.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
     <Compile Include="TextWriter\TextWriterTests.netcoreapp.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index ed168cb..3fec442 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{DC683D60-34EC-4D85-B6E0-E97FDB37A583}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
@@ -9,9 +10,5 @@
     <Compile Include="System\Json\JsonObjectTests.cs" />
     <Compile Include="System\Json\JsonPrimitiveTests.cs" />
     <Compile Include="System\Json\JsonValueTests.cs" />
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
index fe3460b..f9f2947 100644 (file)
@@ -5,13 +5,14 @@ using System.Diagnostics;
 using System.IO;
 using System.Text;
 using System.Globalization;
-using Xunit;
 using System.Collections;
 using System.Collections.Generic;
+using Microsoft.DotNet.RemoteExecutor;
+using Xunit;
 
 namespace System.Json.Tests
 {
-    public class JsonValueTests : RemoteExecutorTestBase
+    public class JsonValueTests
     {
         [Fact]
         public void JsonValue_Load_LoadWithTrailingCommaInDictionary()
@@ -273,7 +274,7 @@ namespace System.Json.Tests
         [InlineData("0.000000000000000000000000000011", 1.1E-29)]
         public void JsonValue_Parse_Double(string json, double expected)
         {
-            RemoteInvoke((jsonInner, expectedInner) =>
+            RemoteExecutor.Invoke((jsonInner, expectedInner) =>
             {
                 foreach (string culture in new[] { "en", "fr", "de" })
                 {
@@ -319,7 +320,7 @@ namespace System.Json.Tests
         [InlineData(1.123456789e-28)] // Values around the smallest positive decimal value
         public void JsonValue_Parse_Double_ViaJsonPrimitive(double number)
         {
-            RemoteInvoke(numberText =>
+            RemoteExecutor.Invoke(numberText =>
             {
                 double numberInner = double.Parse(numberText, CultureInfo.InvariantCulture);
                 foreach (string culture in new[] { "en", "fr", "de" })
index 80e7a31..3656c76 100644 (file)
@@ -5,16 +5,17 @@
 using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Linq.Parallel.Tests
 {
-    public class EtwTests : RemoteExecutorTestBase
+    public class EtwTests
     {
         [Fact]
         public static void TestEtw()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener(new Guid("159eeeec-4a14-4418-a8fe-faabcd987887"), EventLevel.Verbose))
                 {
index 943546d..b4f438f 100644 (file)
@@ -1,11 +1,11 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{A7074928-82C3-4739-88FE-9B528977950C}</ProjectGuid>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
     <!-- Avoid extreme slowness when running NETFX tests (ie with xunit.console.exe) -->
     <XUnitNoAppdomain>true</XUnitNoAppdomain>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
-  <!-- Compiled Source Files -->
   <ItemGroup>
     <Compile Include="$(CommonTestPath)\System\Diagnostics\Tracing\TestEventListener.cs">
       <Link>Common\System\Diagnostics\Tracing\TestEventListener.cs</Link>
@@ -79,9 +79,5 @@
     <Compile Include="PlinqModesTests.cs" />
     <Compile Include="WithCancellationTests.cs" />
     <Compile Include="XunitAssemblyAttributes.cs" />
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
index f535f50..213fa81 100644 (file)
@@ -3,8 +3,9 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <ProjectGuid>{15DB0DCC-68B4-4CFB-8BD2-F26BCCAF5A3F}</ProjectGuid>
     <IncludePartialFacadeTests Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'">true</IncludePartialFacadeTests>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
   <ItemGroup Condition="'$(IncludePartialFacadeTests)' == 'true'">
     <!-- Tests specific to netcoreapp and uap -->
   <ItemGroup>
     <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
index 1a7e0ef..2b07e41 100644 (file)
@@ -12,6 +12,7 @@ using System.Net.Test.Common;
 using System.Reflection;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Http.Functional.Tests
@@ -48,7 +49,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool requestLogged = false;
                 Guid requestGuid = Guid.Empty;
@@ -106,7 +107,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -118,7 +119,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceNoLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool requestLogged = false;
                 bool responseLogged = false;
@@ -167,7 +168,7 @@ namespace System.Net.Http.Functional.Tests
                     Assert.False(activityStopLogged, "HttpRequestOut.Stop was logged while logging disabled.");
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -178,7 +179,7 @@ namespace System.Net.Http.Functional.Tests
         [InlineData(true)]
         public void SendAsync_HttpTracingEnabled_Succeeds(bool useSsl)
         {
-            RemoteInvoke(async (useSocketsHttpHandlerString, useSslString) =>
+            RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useSslString) =>
             {
                 using (var listener = new TestEventListener("Microsoft-System-Net-Http", EventLevel.Verbose))
                 {
@@ -218,7 +219,7 @@ namespace System.Net.Http.Functional.Tests
                     Assert.InRange(events.Count, 1, int.MaxValue);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString(), useSsl.ToString()).Dispose();
         }
 
@@ -226,7 +227,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticExceptionLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool exceptionLogged = false;
                 bool responseLogged = false;
@@ -266,7 +267,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -275,7 +276,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticCancelledLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool cancelLogged = false;
                 var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp =>
@@ -315,14 +316,14 @@ namespace System.Net.Http.Functional.Tests
                     "Cancellation was not logged within 1 second timeout.");
                 diagnosticListenerObserver.Disable();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceActivityLoggingRequestId()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool requestLogged = false;
                 bool responseLogged = false;
@@ -401,14 +402,14 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool requestLogged = false;
                 bool responseLogged = false;
@@ -486,7 +487,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -494,7 +495,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceActivityLogging_InvalidBaggage()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool activityStopLogged = false;
                 bool exceptionLogged = false;
@@ -546,7 +547,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -554,7 +555,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteHeader()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool activityStartLogged = false;
                 bool activityStopLogged = false;
@@ -603,7 +604,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -611,7 +612,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteW3CTraceParentHeader()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool activityStartLogged = false;
                 bool activityStopLogged = false;
@@ -660,7 +661,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -668,7 +669,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool activityStartLogged = false;
                 bool activityStopLogged = false;
@@ -709,7 +710,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -717,7 +718,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticExceptionActivityLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool exceptionLogged = false;
                 bool activityStopLogged = false;
@@ -758,7 +759,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -775,7 +776,7 @@ namespace System.Net.Http.Functional.Tests
                 return;
             }
 
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool exceptionLogged = false;
                 bool activityStopLogged = false;
@@ -849,7 +850,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -857,7 +858,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool requestLogged = false;
                 bool responseLogged = false;
@@ -901,7 +902,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -909,7 +910,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool exceptionLogged = false;
                 bool activityLogged = false;
@@ -944,7 +945,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -952,7 +953,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool activityStartLogged = false;
                 bool activityStopLogged = false;
@@ -986,7 +987,7 @@ namespace System.Net.Http.Functional.Tests
                     diagnosticListenerObserver.Disable();
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
@@ -995,7 +996,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void SendAsync_ExpectedDiagnosticCancelledActivityLogging()
         {
-            RemoteInvoke(useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(useSocketsHttpHandlerString =>
             {
                 bool cancelLogged = false;
                 var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp =>
@@ -1036,14 +1037,14 @@ namespace System.Net.Http.Functional.Tests
                     "Cancellation was not logged within 1 second timeout.");
                 diagnosticListenerObserver.Disable();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void SendAsync_NullRequest_ThrowsArgumentNullException()
         {
-            RemoteInvoke(async () =>
+            RemoteExecutor.Invoke(async () =>
             {
                 var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(null);
                 using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver))
@@ -1067,7 +1068,7 @@ namespace System.Net.Http.Functional.Tests
                 }
 
                 diagnosticListenerObserver.Disable();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 080b25b..312d8bd 100644 (file)
@@ -9,6 +9,7 @@ using System.Net.Test.Common;
 using System.Runtime.InteropServices;
 using System.Security.Cryptography.X509Certificates;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
@@ -129,7 +130,7 @@ namespace System.Net.Http.Functional.Tests
             // UAP HTTP stack caches connections per-process. This causes interference when these tests run in
             // the same process as the other tests. Each test needs to be isolated to its own process.
             // See dicussion: https://github.com/dotnet/corefx/issues/21945
-            RemoteInvoke(async (certIndexString, expectedStatusCodeString, useSocketsHttpHandlerString) =>
+            RemoteExecutor.Invoke(async (certIndexString, expectedStatusCodeString, useSocketsHttpHandlerString) =>
             {
                 X509Certificate2 clientCert = null;
 
@@ -174,7 +175,7 @@ namespace System.Net.Http.Functional.Tests
                         Assert.Equal(clientCert, receivedCert);
                     }
 
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }
             }, certIndex.ToString(), expectedStatusCode.ToString(), UseSocketsHttpHandler.ToString()).Dispose();
         }
index c6f0416..e9326bd 100644 (file)
@@ -8,6 +8,7 @@ using System.Net.Test.Common;
 using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Http.Functional.Tests
@@ -102,7 +103,7 @@ namespace System.Net.Http.Functional.Tests
                     psi.Environment.Add("http_proxy", $"http://{proxyUri.Host}:{proxyUri.Port}");
                 }
 
-                RemoteInvoke(async (useProxyString, useSocketsHttpHandlerString) =>
+                RemoteExecutor.Invoke(async (useProxyString, useSocketsHttpHandlerString) =>
                 {
                     using (HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString))
                     using (var client = new HttpClient(handler))
@@ -115,7 +116,7 @@ namespace System.Net.Http.Functional.Tests
                         // Correctness of user and password is done in server part.
                         Assert.True(response.StatusCode ==  HttpStatusCode.OK);
                     }
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, useProxy.ToString(), UseSocketsHttpHandler.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose();
                 if (useProxy)
                 {
index eb38f93..5eaa250 100644 (file)
@@ -11,6 +11,7 @@ using System.Runtime.InteropServices;
 using System.Security.Authentication.ExtendedProtection;
 using System.Security.Cryptography.X509Certificates;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Http.Functional.Tests
@@ -78,7 +79,7 @@ namespace System.Net.Http.Functional.Tests
             File.WriteAllText(sslCertFile, "");
             psi.Environment.Add("SSL_CERT_FILE", sslCertFile);
 
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 const string Url = "https://www.microsoft.com";
 
@@ -86,7 +87,7 @@ namespace System.Net.Http.Functional.Tests
                 {
                     await Assert.ThrowsAsync<HttpRequestException>(() => client.GetAsync(Url));
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose();
         }
     }
index f92740d..2216045 100644 (file)
@@ -10,6 +10,7 @@ using System.Runtime.InteropServices;
 using System.Security.Authentication.ExtendedProtection;
 using System.Security.Cryptography.X509Certificates;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Http.Functional.Tests
@@ -406,14 +407,14 @@ namespace System.Net.Http.Functional.Tests
                     // UAP HTTP stack caches connections per-process. This causes interference when these tests run in
                     // the same process as the other tests. Each test needs to be isolated to its own process.
                     // See dicussion: https://github.com/dotnet/corefx/issues/21945
-                    RemoteInvoke((remoteUrl, remoteExpectedErrors, useSocketsHttpHandlerString) =>
+                    RemoteExecutor.Invoke((remoteUrl, remoteExpectedErrors, useSocketsHttpHandlerString) =>
                     {
                         UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(
                             remoteUrl,
                             bool.Parse(useSocketsHttpHandlerString),
                             (SslPolicyErrors)Enum.Parse(typeof(SslPolicyErrors), remoteExpectedErrors)).Wait();
 
-                        return SuccessExitCode;
+                        return RemoteExecutor.SuccessExitCode;
                     }, url, expectedErrors.ToString(), UseSocketsHttpHandler.ToString()).Dispose();
                 }
                 else
index 0fa242d..63a68da 100644 (file)
@@ -16,9 +16,8 @@ using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;
 using System.Threading.Tasks;
-
 using Microsoft.DotNet.XUnitExtensions;
-
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
@@ -593,7 +592,7 @@ namespace System.Net.Http.Functional.Tests
             // UAP HTTP stack caches connections per-process. This causes interference when these tests run in
             // the same process as the other tests. Each test needs to be isolated to its own process.
             // See dicussion: https://github.com/dotnet/corefx/issues/21945
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 using (var client = CreateHttpClient(useSocketsHttpHandlerString))
                 {
@@ -603,7 +602,7 @@ namespace System.Net.Http.Functional.Tests
                         Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
                     }
 
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
index a50f627..27639e8 100644 (file)
@@ -3,12 +3,13 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using System.IO;
 using System.Reflection;
 using System.Net.Test.Common;
 
 namespace System.Net.Http.Functional.Tests
 {
-    public abstract class HttpClientHandlerTestBase : RemoteExecutorTestBase
+    public abstract class HttpClientHandlerTestBase : FileCleanupTestBase
     {
         protected virtual bool UseSocketsHttpHandler => true;
         protected virtual bool UseHttp2LoopbackServer => false;
index a7f5de0..9e76fc2 100644 (file)
@@ -8,6 +8,7 @@ using System.IO;
 using System.Net.Http;
 using System.Text;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
@@ -27,7 +28,7 @@ namespace System.Net.Http.Functional.Tests
         [Fact]
         public void Authentication_UseStreamContent_Throws()
         {
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 // This test validates the current limitation of CoreFx's NetFxToWinRtStreamAdapter
                 // which throws exceptions when trying to rewind a .NET Stream when it needs to be
@@ -47,14 +48,14 @@ namespace System.Net.Http.Functional.Tests
                     await Assert.ThrowsAsync<HttpRequestException>(() => client.PostAsync(uri, content));
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void Authentication_UseMultiInterfaceNonRewindableStreamContent_Throws()
         {
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 string username = "testuser";
                 string password = "password";
@@ -71,14 +72,14 @@ namespace System.Net.Http.Functional.Tests
                     await Assert.ThrowsAsync<HttpRequestException>(() => client.PostAsync(uri, content));
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void Authentication_UseMultiInterfaceStreamContent_Success()
         {
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 string username = "testuser";
                 string password = "password";
@@ -99,14 +100,14 @@ namespace System.Net.Http.Functional.Tests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void Authentication_UseMemoryStreamVisibleBufferContent_Success()
         {
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 string username = "testuser";
                 string password = "password";
@@ -127,14 +128,14 @@ namespace System.Net.Http.Functional.Tests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void Authentication_UseMemoryStreamNotVisibleBufferContent_Success()
         {
-            RemoteInvoke(async useSocketsHttpHandlerString =>
+            RemoteExecutor.Invoke(async useSocketsHttpHandlerString =>
             {
                 string username = "testuser";
                 string password = "password";
@@ -155,7 +156,7 @@ namespace System.Net.Http.Functional.Tests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, UseSocketsHttpHandler.ToString()).Dispose();
         }
     }
index fc134b6..c11693c 100644 (file)
@@ -15,6 +15,7 @@ using System.Security.Cryptography.X509Certificates;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
@@ -1116,7 +1117,7 @@ namespace System.Net.Http.Functional.Tests
         [InlineData(true)]
         public void ConnectionsPooledThenDisposed_NoUnobservedTaskExceptions(bool secure)
         {
-            RemoteInvoke(async secureString =>
+            RemoteExecutor.Invoke(async secureString =>
             {
                 var releaseServer = new TaskCompletionSource<bool>();
                 await LoopbackServer.CreateClientAndServerAsync(async uri =>
@@ -1150,7 +1151,7 @@ namespace System.Net.Http.Functional.Tests
                     await releaseServer.Task;
                 }),
                 new LoopbackServer.Options { UseSsl = bool.Parse(secureString) });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, secure.ToString()).Dispose();
         }
 
@@ -1583,21 +1584,21 @@ namespace System.Net.Http.Functional.Tests
         [InlineData("", true)]
         public void HttpClientHandler_SettingEnvironmentVariableChangesDefault(string envVarValue, bool expectedUseSocketsHandler)
         {
-            RemoteInvoke((innerEnvVarValue, innerExpectedUseSocketsHandler) =>
+            RemoteExecutor.Invoke((innerEnvVarValue, innerExpectedUseSocketsHandler) =>
             {
                 Environment.SetEnvironmentVariable(EnvironmentVariableSettingName, innerEnvVarValue);
                 using (var handler = new HttpClientHandler())
                 {
                     Assert.Equal(bool.Parse(innerExpectedUseSocketsHandler), IsSocketsHttpHandler(handler));
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, envVarValue, expectedUseSocketsHandler.ToString()).Dispose();
         }
 
         [Fact]
         public void HttpClientHandler_SettingAppContextChangesDefault()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppContext.SetSwitch(AppContextSettingName, isEnabled: true);
                 using (var handler = new HttpClientHandler())
@@ -1611,14 +1612,14 @@ namespace System.Net.Http.Functional.Tests
                     Assert.False(IsSocketsHttpHandler(handler));
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void HttpClientHandler_AppContextOverridesEnvironmentVariable()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Environment.SetEnvironmentVariable(EnvironmentVariableSettingName, "true");
                 using (var handler = new HttpClientHandler())
@@ -1639,7 +1640,7 @@ namespace System.Net.Http.Functional.Tests
                     Assert.True(IsSocketsHttpHandler(handler));
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 9d3a466..8f4ce48 100644 (file)
@@ -4,6 +4,7 @@
     <DefineConstants Condition="'$(TargetsWindows)'=='true'">$(DefineConstants);TargetsWindows</DefineConstants>
     <DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="XUnitAssemblyAttributes.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <SupplementalTestData Include="$(PackagesDir)system.net.testdata\1.0.1-prerelease\content\**\*.*" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetsOSX)'=='true'">
index af7443d..37cb432 100644 (file)
@@ -6,12 +6,12 @@ using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
 using System.Net.Http.Headers;
-
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Http.Tests
 {
-    public class CacheControlHeaderValueTest : RemoteExecutorTestBase
+    public class CacheControlHeaderValueTest
     {
         [Fact]
         public void Properties_SetAndGetAllProperties_SetValueReturnedInGetter()
@@ -139,7 +139,7 @@ namespace System.Net.Http.Tests
         [Fact]
         public void ToString_NegativeValues_UsesMinusSignRegardlessOfCurrentCulture()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var cacheControl = new CacheControlHeaderValue()
                 {
index 34a555f..7cdbddf 100644 (file)
@@ -3,14 +3,15 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Net.Http;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
-using System.Diagnostics;
 
 namespace System.Net.Http.Tests
 {
-    public class HttpEnvironmentProxyTest : RemoteExecutorTestBase
+    public class HttpEnvironmentProxyTest
     {
         private readonly ITestOutputHelper _output;
         private static readonly Uri fooHttp = new Uri("http://foo.com");
@@ -38,7 +39,7 @@ namespace System.Net.Http.Tests
         [Fact]
         public void HttpProxy_EnvironmentProxy_Loaded()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
 
                 IWebProxy p;
@@ -97,7 +98,7 @@ namespace System.Net.Http.Tests
                 u = p.GetProxy(fooHttps);
                 Assert.True(u != null && u.Host == "1.1.1.5" && u.Port == 3005);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -116,7 +117,7 @@ namespace System.Net.Http.Tests
         [InlineData("http://1.2.3.4:8888/foo", "1.2.3.4", "8888", null, null)]
         public void HttpProxy_Uri_Parsing(string _input, string _host, string _port, string _user , string _password)
         {
-            RemoteInvoke((input, host, port, user, password) =>
+            RemoteExecutor.Invoke((input, host, port, user, password) =>
             {
                 // Remote exec does not allow to pass null at this moment.
                 if (user == "null")
@@ -147,14 +148,14 @@ namespace System.Net.Http.Tests
                     Assert.Equal(password, nc.Password);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, _input, _host, _port, _user ?? "null" , _password ?? "null").Dispose();
         }
 
         [Fact]
         public void HttpProxy_CredentialParsing_Basic()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 IWebProxy p;
 
@@ -181,14 +182,14 @@ namespace System.Net.Http.Tests
                 Assert.Null(p.Credentials.GetCredential(fooHttp, "Basic"));
                 Assert.Null(p.Credentials.GetCredential(null, null));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void HttpProxy_Exceptions_Match()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 IWebProxy p;
 
@@ -203,7 +204,7 @@ namespace System.Net.Http.Tests
                 Assert.False(p.IsBypassed(new Uri("http://1test.com")));
                 Assert.True(p.IsBypassed(new Uri("http://www.test.com")));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
            }).Dispose();
         }
     }
index 74e995e..2ee7c63 100644 (file)
@@ -3,15 +3,16 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Net.Http;
+using System.Net.Http.WinHttpHandlerUnitTests;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
-using System.Diagnostics;
-using System.Net.Http.WinHttpHandlerUnitTests;
 
 namespace System.Net.Http.Tests
 {
-    public class HttpSystemProxyTest : RemoteExecutorTestBase
+    public class HttpSystemProxyTest
     {
         private readonly ITestOutputHelper _output;
         private const string FakeProxyString = "http://proxy.contoso.com";
@@ -43,7 +44,7 @@ namespace System.Net.Http.Tests
         [InlineData("https=https://proxy.secure.com", false, true)]
         public void HttpProxy_SystemProxy_Loaded(string rawProxyString, bool hasInsecureProxy, bool hasSecureProxy)
         {
-            RemoteInvoke((proxyString, insecureProxy, secureProxy) =>
+            RemoteExecutor.Invoke((proxyString, insecureProxy, secureProxy) =>
             {
                 IWebProxy p;
 
@@ -60,7 +61,7 @@ namespace System.Net.Http.Tests
                 Assert.Equal(Boolean.Parse(secureProxy) ? new Uri(secureProxyUri) : null, p.GetProxy(new Uri(fooHttps)));
                 Assert.Equal(Boolean.Parse(insecureProxy) ? new Uri(insecureProxyUri) : null, p.GetProxy(new Uri(fooWs)));
                 Assert.Equal(Boolean.Parse(secureProxy) ? new Uri(secureProxyUri) : null, p.GetProxy(new Uri(fooWss)));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, rawProxyString, hasInsecureProxy.ToString(), hasSecureProxy.ToString()).Dispose();
         }
 
@@ -69,7 +70,7 @@ namespace System.Net.Http.Tests
         [InlineData("123.123.123.123", "http://123.123.123.123/")]
         public void HttpProxy_SystemProxy_Loaded(string rawProxyString, string expectedUri)
         {
-            RemoteInvoke((proxyString, expectedString) =>
+            RemoteExecutor.Invoke((proxyString, expectedString) =>
             {
                 IWebProxy p;
 
@@ -83,7 +84,7 @@ namespace System.Net.Http.Tests
                 Assert.Equal(expectedString, p.GetProxy(new Uri(fooHttp)).ToString());
                 Assert.Equal(expectedString, p.GetProxy(new Uri(fooHttps)).ToString());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, rawProxyString, expectedUri).Dispose();
         }
 
@@ -107,7 +108,7 @@ namespace System.Net.Http.Tests
         [InlineData("http://www.b\u00e9b\u00e9.eu/", true)]
         public void HttpProxy_Local_Bypassed(string name, bool shouldBypass)
         {
-            RemoteInvoke((url, expected) =>
+            RemoteExecutor.Invoke((url, expected) =>
             {
                 bool expectedResult = Boolean.Parse(expected);
                 IWebProxy p;
@@ -122,7 +123,7 @@ namespace System.Net.Http.Tests
                 Uri u = new Uri(url);
                 Assert.Equal(expectedResult, p.GetProxy(u) == null);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
            }, name, shouldBypass.ToString()).Dispose();
         }
 
@@ -134,7 +135,7 @@ namespace System.Net.Http.Tests
         [InlineData("[::]", 1)]
         public void HttpProxy_Local_Parsing(string bypass, int count)
         {
-            RemoteInvoke((bypassValue, expected) =>
+            RemoteExecutor.Invoke((bypassValue, expected) =>
             {
                 int expectedCount = Convert.ToInt32(expected);
                 IWebProxy p;
@@ -157,7 +158,7 @@ namespace System.Net.Http.Tests
                 {
                     Assert.Null(sp.BypassList);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
            }, bypass, count.ToString()).Dispose();
         }
 
@@ -169,7 +170,7 @@ namespace System.Net.Http.Tests
         [InlineData("  ;  ")]
         public void HttpProxy_InvalidSystemProxy_Null(string rawProxyString)
         {
-            RemoteInvoke((proxyString) =>
+            RemoteExecutor.Invoke((proxyString) =>
             {
                 IWebProxy p;
 
@@ -186,7 +187,7 @@ namespace System.Net.Http.Tests
                 Assert.Equal(null, p.GetProxy(new Uri(fooHttps)));
                 Assert.Equal(null, p.GetProxy(new Uri(fooWs)));
                 Assert.Equal(null, p.GetProxy(new Uri(fooWss)));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, rawProxyString).Dispose();
         }
     }
index 458abfd..1dd4c62 100644 (file)
@@ -3,6 +3,7 @@
     <ProjectGuid>{5F9C3C9F-652E-461E-B2D6-85D264F5A733}</ProjectGuid>
     <StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
   </PropertyGroup>
   <!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
       <Link>ProductionCode\System\Net\Http\WinInetProxyHelper.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
index 2723d24..cb015d2 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Mail.Tests
 {
-    public class LoggingTest : RemoteExecutorTestBase
+    public class LoggingTest
     {
         [Fact]
         [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
@@ -30,7 +31,7 @@ namespace System.Net.Mail.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
         public void EventSource_EventsRaisedAsExpected()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("Microsoft-System-Net-Mail", EventLevel.Verbose))
                 {
@@ -43,7 +44,7 @@ namespace System.Net.Mail.Tests
                     Assert.DoesNotContain(events, ev => ev.EventId == 0); // errors from the EventSource itself
                     Assert.InRange(events.Count, 1, int.MaxValue);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 7cec78f..be74e4a 100644 (file)
@@ -1,6 +1,7 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{A26D88B7-6EF6-4C8C-828B-7B57732CCE38}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System.Net.NetworkInformation" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 3a904d1..0305e4b 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Primitives.Functional.Tests
 {
-    public class LoggingTest : RemoteExecutorTestBase
+    public class LoggingTest
     {
         [Fact]
         [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
@@ -30,7 +31,7 @@ namespace System.Net.Primitives.Functional.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
         public void EventSource_EventsRaisedAsExpected()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("Microsoft-System-Net-Primitives", EventLevel.Verbose))
                 {
@@ -43,7 +44,7 @@ namespace System.Net.Primitives.Functional.Tests
                     Assert.DoesNotContain(events, ev => ev.EventId == 0); // errors from the EventSource itself
                     Assert.InRange(events.Count, 1, int.MaxValue);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 24e2aff..2566817 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{E671BC9F-A64C-4504-8B00-7A3215B99AF9}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="IPEndPointParsing.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <Reference Include="System.Memory" />
   </ItemGroup>
   <ItemGroup>
index 8baf87e..b669737 100644 (file)
@@ -4,13 +4,14 @@
 
 using System.Collections;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 #pragma warning disable CS0618 // obsolete warnings
 
 namespace System.Net.Tests
 {
-    public class AuthenticationManagerTest : RemoteExecutorTestBase
+    public class AuthenticationManagerTest
     {
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AuthenticationManager supported on NETFX")]
         [Fact]
@@ -29,7 +30,7 @@ namespace System.Net.Tests
         [Fact]
         public void Register_Unregister_ModuleCountUnchanged()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 int initialCount = GetModuleCount();
                 IAuthenticationModule module = new CustomModule();
@@ -37,13 +38,13 @@ namespace System.Net.Tests
                 AuthenticationManager.Unregister(module);
                 Assert.Equal(initialCount, GetModuleCount());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();           
         }
 
         public void Register_UnregisterByScheme_ModuleCountUnchanged()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 int initialCount = GetModuleCount();
                 IAuthenticationModule module = new CustomModule();
@@ -51,7 +52,7 @@ namespace System.Net.Tests
                 AuthenticationManager.Unregister("custom");
                 Assert.Equal(initialCount, GetModuleCount());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -69,7 +70,7 @@ namespace System.Net.Tests
         {
             Assert.Null(AuthenticationManager.CredentialPolicy);
 
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 ICredentialPolicy cp = new DummyCredentialPolicy();
                 AuthenticationManager.CredentialPolicy = cp;
@@ -78,7 +79,7 @@ namespace System.Net.Tests
                 AuthenticationManager.CredentialPolicy = null;
                 Assert.Null(AuthenticationManager.CredentialPolicy);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -89,7 +90,7 @@ namespace System.Net.Tests
             Assert.Empty(AuthenticationManager.CustomTargetNameDictionary);
             Assert.Same(AuthenticationManager.CustomTargetNameDictionary, AuthenticationManager.CustomTargetNameDictionary);
 
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string theKey = "http://www.contoso.com";
                 string theValue = "HTTP/www.contoso.com";
@@ -99,7 +100,7 @@ namespace System.Net.Tests
                 AuthenticationManager.CustomTargetNameDictionary.Clear();
                 Assert.Equal(0, AuthenticationManager.CustomTargetNameDictionary.Count);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();            
         }
 
index 7947624..fd7bf4c 100644 (file)
@@ -3,12 +3,12 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
-
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Tests
 {
-    public class GlobalProxySelectionTest : RemoteExecutorTestBase
+    public class GlobalProxySelectionTest
     {
         private class MyWebProxy : IWebProxy
         {
@@ -41,7 +41,7 @@ namespace System.Net.Tests
         [Fact]
         public void Select_Success()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var myProxy = new MyWebProxy();
 
@@ -88,7 +88,7 @@ namespace System.Net.Tests
                 Assert.True(GlobalProxySelection.Select.IsBypassed(null)); // This is true for EmptyWebProxy, but not for most proxies
 #pragma warning restore 0618
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 310e31c..44e2e95 100644 (file)
@@ -14,7 +14,7 @@ using System.Runtime.Serialization.Formatters.Binary;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
@@ -22,7 +22,7 @@ namespace System.Net.Tests
 {
     using Configuration = System.Net.Test.Common.Configuration;
 
-    public partial class HttpWebRequestTest : RemoteExecutorTestBase
+    public partial class HttpWebRequestTest
     {
         private const string RequestBody = "This is data to POST.";
         private readonly byte[] _requestBodyBytes = Encoding.UTF8.GetBytes(RequestBody);
@@ -691,7 +691,7 @@ namespace System.Net.Tests
         [Fact]
         public void DefaultMaximumResponseHeadersLength_SetAndGetLength_ValuesMatch()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 int defaultMaximumResponseHeadersLength = HttpWebRequest.DefaultMaximumResponseHeadersLength;
                 const int NewDefaultMaximumResponseHeadersLength = 255;
@@ -706,14 +706,14 @@ namespace System.Net.Tests
                     HttpWebRequest.DefaultMaximumResponseHeadersLength = defaultMaximumResponseHeadersLength;
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void DefaultMaximumErrorResponseLength_SetAndGetLength_ValuesMatch()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 int defaultMaximumErrorsResponseLength = HttpWebRequest.DefaultMaximumErrorResponseLength;
                 const int NewDefaultMaximumErrorsResponseLength = 255;
@@ -728,14 +728,14 @@ namespace System.Net.Tests
                     HttpWebRequest.DefaultMaximumErrorResponseLength = defaultMaximumErrorsResponseLength;
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void DefaultCachePolicy_SetAndGetPolicyReload_ValuesMatch()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 RequestCachePolicy requestCachePolicy = HttpWebRequest.DefaultCachePolicy;
 
@@ -750,7 +750,7 @@ namespace System.Net.Tests
                     HttpWebRequest.DefaultCachePolicy = requestCachePolicy;
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -1336,7 +1336,7 @@ namespace System.Net.Tests
                 proxyTask = proxyServer.AcceptConnectionPerformAuthenticationAndCloseAsync("Proxy-Authenticate: Basic realm=\"NetCore\"\r\n");
                 psi.Environment.Add("http_proxy", $"http://{proxyUri.Host}:{proxyUri.Port}");
 
-                RemoteInvoke(async (user, pw) =>
+                RemoteExecutor.Invoke(async (user, pw) =>
                 {
                     WebRequest.DefaultWebProxy.Credentials = new NetworkCredential(user, pw);
                     HttpWebRequest request = HttpWebRequest.CreateHttp(Configuration.Http.RemoteEchoServer);
@@ -1346,7 +1346,7 @@ namespace System.Net.Tests
                         Assert.Equal(HttpStatusCode.OK, response.StatusCode);
                     }
 
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, cred.UserName, cred.Password, new RemoteInvokeOptions { StartInfo = psi }).Dispose();
 
                 await proxyTask;
index b101f87..376dec3 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{E520B5FD-C6FF-46CF-8079-6C8098013EA3}</ProjectGuid>
     <StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
     <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
   </PropertyGroup>
     <Compile Include="$(CommonTestPath)\System\Threading\Tasks\TaskTimeoutExtensions.cs">
       <Link>Common\System\Threading\Tasks\TaskTimeoutExtensions.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="AuthorizationTest.cs" />
index 861a3d4..4acc29f 100644 (file)
@@ -3,11 +3,12 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Tests
 {
-    public class WebRequestTest : RemoteExecutorTestBase
+    public class WebRequestTest
     {
         static WebRequestTest()
         {
@@ -33,14 +34,14 @@ namespace System.Net.Tests
         [Fact]
         public void DefaultWebProxy_SetThenGet_ValuesMatch()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 IWebProxy p = new WebProxy();
 
                 WebRequest.DefaultWebProxy = p;
                 Assert.Same(p, WebRequest.DefaultWebProxy);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 31fedb4..0f216af 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Security.Tests
 {
-    public class LoggingTest : RemoteExecutorTestBase
+    public class LoggingTest
     {
         [Fact]
         [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)]
@@ -30,7 +31,7 @@ namespace System.Net.Security.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
         public void EventSource_EventsRaisedAsExpected()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("Microsoft-System-Net-Security", EventLevel.Verbose))
                 {
@@ -45,7 +46,7 @@ namespace System.Net.Security.Tests
                     Assert.DoesNotContain(events, ev => ev.EventId == 0); // errors from the EventSource itself
                     Assert.InRange(events.Count, 1, int.MaxValue);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index b686645..5e2b1dc 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{A55A2B9A-830F-4330-A0E7-02A9FB30ABD2}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(TargetsUnix)' == 'true' ">
   <ItemGroup>
     <SupplementalTestData Include="$(PackagesDir)system.net.testdata\1.0.1-prerelease\content\**\*.*" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
index f9ab985..df9bdae 100644 (file)
@@ -6,22 +6,23 @@ using System;
 using System.Diagnostics;
 using System.Net.Security;
 using System.Security.Cryptography.X509Certificates;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Tests
 {
-    public class ServicePointManagerTest : RemoteExecutorTestBase
+    public class ServicePointManagerTest
     {
         [Fact]
         public static void RequireEncryption_ExpectedDefault()
         {
-            RemoteInvoke(() => Assert.Equal(EncryptionPolicy.RequireEncryption, ServicePointManager.EncryptionPolicy)).Dispose();
+            RemoteExecutor.Invoke(() => Assert.Equal(EncryptionPolicy.RequireEncryption, ServicePointManager.EncryptionPolicy)).Dispose();
         }
 
         [Fact]
         public static void CheckCertificateRevocationList_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.False(ServicePointManager.CheckCertificateRevocationList);
 
@@ -36,7 +37,7 @@ namespace System.Net.Tests
         [Fact]
         public static void DefaultConnectionLimit_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(2, ServicePointManager.DefaultConnectionLimit);
 
@@ -51,7 +52,7 @@ namespace System.Net.Tests
         [Fact]
         public static void DnsRefreshTimeout_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(120000, ServicePointManager.DnsRefreshTimeout);
 
@@ -66,7 +67,7 @@ namespace System.Net.Tests
         [Fact]
         public static void EnableDnsRoundRobin_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.False(ServicePointManager.EnableDnsRoundRobin);
 
@@ -81,7 +82,7 @@ namespace System.Net.Tests
         [Fact]
         public static void Expect100Continue_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(ServicePointManager.Expect100Continue);
 
@@ -96,7 +97,7 @@ namespace System.Net.Tests
         [Fact]
         public static void MaxServicePointIdleTime_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(100000, ServicePointManager.MaxServicePointIdleTime);
 
@@ -111,7 +112,7 @@ namespace System.Net.Tests
         [Fact]
         public static void MaxServicePoints_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(0, ServicePointManager.MaxServicePoints);
 
@@ -126,7 +127,7 @@ namespace System.Net.Tests
         [Fact]
         public static void ReusePort_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.False(ServicePointManager.ReusePort);
 
@@ -142,7 +143,7 @@ namespace System.Net.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop default SecurityProtocol to Ssl3; explicitly changed to SystemDefault for core.")]
         public static void SecurityProtocol_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var orig = (SecurityProtocolType)0; // SystemDefault.
                 Assert.Equal(orig, ServicePointManager.SecurityProtocol);
@@ -158,7 +159,7 @@ namespace System.Net.Tests
         [Fact]
         public static void ServerCertificateValidationCallback_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Null(ServicePointManager.ServerCertificateValidationCallback);
 
@@ -174,7 +175,7 @@ namespace System.Net.Tests
         [Fact]
         public static void UseNagleAlgorithm_Roundtrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(ServicePointManager.UseNagleAlgorithm);
 
@@ -189,7 +190,7 @@ namespace System.Net.Tests
         [Fact]
         public static void InvalidArguments_Throw()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 const int ssl2Client = 0x00000008;
                 const int ssl2Server = 0x00000004;
@@ -221,7 +222,7 @@ namespace System.Net.Tests
         [Fact]
         public static void SecurityProtocol_Ssl3_NotSupported()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 const int ssl2Client = 0x00000008;
                 const int ssl2Server = 0x00000004;
@@ -237,7 +238,7 @@ namespace System.Net.Tests
         [Fact]
         public static void FindServicePoint_ReturnsCachedServicePoint()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 const string Localhost = "http://localhost";
                 string address1 = "http://" + Guid.NewGuid().ToString("N");
@@ -274,7 +275,7 @@ namespace System.Net.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop ServicePoint lifetime is slightly longer due to implementation details of real implementation")]
         public static void FindServicePoint_Collectible()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string address = "http://" + Guid.NewGuid().ToString("N");
 
@@ -292,7 +293,7 @@ namespace System.Net.Tests
         [Fact]
         public static void FindServicePoint_ReturnedServicePointMatchesExpectedValues()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string address = "http://" + Guid.NewGuid().ToString("N");
 
@@ -319,7 +320,7 @@ namespace System.Net.Tests
         [Fact]
         public static void FindServicePoint_PropertiesRoundtrip()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string address = "http://" + Guid.NewGuid().ToString("N");
 
@@ -354,7 +355,7 @@ namespace System.Net.Tests
         [Fact]
         public static void FindServicePoint_NewServicePointsInheritCurrentValues()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string address1 = "http://" + Guid.NewGuid().ToString("N");
                 string address2 = "http://" + Guid.NewGuid().ToString("N");
index 0eca285..43d9e76 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{DC3BBD1F-37C8-40B2-B248-E12E8D0D146B}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <!-- TODO #13070: Add net463 to the condition after the TFM gets updated to the actual .NET Framework 4.6.3.-->
     <Compile Include="TlsSystemDefault.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 67ee162..42d83da 100644 (file)
@@ -3,22 +3,23 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Tests
 {
-    public class TlsSystemDefault : RemoteExecutorTestBase
+    public class TlsSystemDefault
     {
         [Fact]
         public void ServicePointManager_SecurityProtocolDefault_Ok()
         {
-            RemoteInvoke(() => Assert.Equal(SecurityProtocolType.SystemDefault, ServicePointManager.SecurityProtocol)).Dispose();
+            RemoteExecutor.Invoke(() => Assert.Equal(SecurityProtocolType.SystemDefault, ServicePointManager.SecurityProtocol)).Dispose();
         }
 
         [Fact]
         public void ServicePointManager_CheckAllowedProtocols_SystemDefault_Allowed()
         {
-            RemoteInvoke(() => ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault).Dispose();
+            RemoteExecutor.Invoke(() => ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault).Dispose();
         }
     }
 }
index 48f6cea..819344d 100644 (file)
@@ -6,11 +6,12 @@ using System.Diagnostics;
 using System.IO;
 using System.IO.Pipes;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Net.Sockets.Tests
 {
-    public class CreateSocket : RemoteExecutorTestBase
+    public class CreateSocket
     {
         public static object[][] DualModeSuccessInputs = {
             new object[] { SocketType.Stream, ProtocolType.Tcp },
@@ -125,7 +126,7 @@ namespace System.Net.Sockets.Tests
         {
             // Run the test in another process so as to not have trouble with other tests
             // launching child processes that might impact inheritance.
-            RemoteInvoke((validateClientString, acceptApiString) =>
+            RemoteExecutor.Invoke((validateClientString, acceptApiString) =>
             {
                 bool validateClient = bool.Parse(validateClientString);
                 int acceptApi = int.Parse(acceptApiString);
@@ -158,7 +159,7 @@ namespace System.Net.Sockets.Tests
                             // Create a child process that blocks waiting to receive a signal on the anonymous pipe.
                             // The whole purpose of the child is to test whether handles are inherited, so we
                             // keep the child process alive until we're done validating that handles close as expected.
-                            using (RemoteInvoke(clientPipeHandle =>
+                            using (RemoteExecutor.Invoke(clientPipeHandle =>
                                    {
                                        using (var clientPipe = new AnonymousPipeClientStream(PipeDirection.In, clientPipeHandle))
                                        {
index 7bfb114..e006933 100644 (file)
@@ -5,12 +5,13 @@
 using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
 namespace System.Net.Sockets.Tests
 {
-    public class LoggingTest : RemoteExecutorTestBase
+    public class LoggingTest
     {
         public readonly ITestOutputHelper _output;
 
@@ -39,7 +40,7 @@ namespace System.Net.Sockets.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")]
         public void EventSource_EventsRaisedAsExpected()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("Microsoft-System-Net-Sockets", EventLevel.Verbose))
                 {
@@ -66,7 +67,7 @@ namespace System.Net.Sockets.Tests
                     Assert.DoesNotContain(events, ev => ev.EventId == 0); // errors from the EventSource itself
                     Assert.InRange(events.Count, 1, int.MaxValue);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index c90b3bf..83fb63b 100644 (file)
@@ -7,6 +7,7 @@ using System.Linq;
 using System.Runtime.InteropServices;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
@@ -1389,7 +1390,7 @@ namespace System.Net.Sockets.Tests
         [Fact]
         public void BlockingRead_DoesntRequireAnotherThreadPoolThread()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // Set the max number of worker threads to a low value.
                 ThreadPool.GetMaxThreads(out int workerThreads, out int completionPortThreads);
index e4f93fc..23f523a 100644 (file)
@@ -279,7 +279,7 @@ namespace System.Net.Sockets.Tests
     // MemberDatas that are generally useful
     //
 
-    public abstract class MemberDatas : RemoteExecutorTestBase
+    public abstract class MemberDatas
     {
         public static readonly object[][] Loopbacks = new[]
         {
index 8466b69..cac7453 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <ProjectGuid>{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index 4270fa7..3172544 100644 (file)
@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using Xunit;
 using System.Collections.Generic;
 using System.Drawing;
 using System.Globalization;
@@ -12,6 +11,8 @@ using System.Drawing.Imaging;
 using System.Linq;
 using System.Resources;
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
+using Xunit;
 
 [assembly:NeutralResourcesLanguage("en")]
 
@@ -24,7 +25,7 @@ namespace System.Resources.Tests
         }
     }
 
-    public class ResourceManagerTests : RemoteExecutorTestBase
+    public class ResourceManagerTests
     {
         [Fact]
         public static void ExpectMissingManifestResourceException()
@@ -148,7 +149,7 @@ namespace System.Resources.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP does not use satellite assemblies in most cases")]
         public static void GetString_ExpectEvents()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // Events only fire first time.  Remote to make sure test runs in a separate process
                 Remote_ExpectEvents();
index 21b756f..22ccb67 100644 (file)
@@ -2,9 +2,10 @@
   <PropertyGroup>
     <ProjectGuid>{1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}</ProjectGuid>
     <RootNamespace>System.Resources.Tests</RootNamespace>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
-    <TestRuntime>true</TestRuntime>
     <BinPlaceSatelliteAssemblies>true</BinPlaceSatelliteAssemblies>
+    <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="MissingManifestResourceExceptionTests.cs" />
     <SupplementalTestData Include="Resources\bitmap.bmp" />
     <SupplementalTestData Include="Resources\icon.ico" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
   <!--
     MSBuild on .NET Core doesn't support non-string resources. See https://github.com/Microsoft/msbuild/issues/2221
     Workaround this for now by invoking the desktop resgen.exe on Windows manually to regenerate the resource files.
index 35aadd0..3319c05 100644 (file)
@@ -3,8 +3,9 @@
     <ProjectGuid>{6C314C9B-3D28-4B05-9B4C-B57A00A9B3B9}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
-    <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System\ApplicationIdTests.cs" />
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
     <ProjectReference Include="AssemblyResolveTestApp\AssemblyResolveTestApp.csproj">
       <Project>{ad83807c-8be5-4f27-85df-9793613233e1}</Project>
       <Name>AssemblyResolveTestApp</Name>
index 8fc0740..d9088ad 100644 (file)
@@ -9,11 +9,12 @@ using System.Net.Http;
 using System.Reflection;
 using System.Resources;
 using System.Runtime.ExceptionServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class AppDomainTests : RemoteExecutorTestBase
+    public partial class AppDomainTests : FileCleanupTestBase
     {
         [Fact]
         public void CurrentDomain_Not_Null()
@@ -42,7 +43,7 @@ namespace System.Tests
         [Fact]
         public void TargetFrameworkTest()
         {
-            string targetFrameworkName = "DUMMY-TFA";
+            string targetFrameworkName = ".NETStandard,Version=v2.0";
             if (PlatformDetection.IsInAppContainer)
             {
                 targetFrameworkName = ".NETCore,Version=v5.0";
@@ -52,7 +53,7 @@ namespace System.Tests
                 targetFrameworkName = ".NETCoreApp,Version=v2.0";
             }
             
-            RemoteInvoke((_targetFrameworkName) => {
+            RemoteExecutor.Invoke((_targetFrameworkName) => {
                 Assert.Contains(_targetFrameworkName, AppContext.TargetFrameworkName);
             }, targetFrameworkName).Dispose();
         }
@@ -60,17 +61,17 @@ namespace System.Tests
         [Fact]
         public void UnhandledException_Add_Remove()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
                 AppDomain.CurrentDomain.UnhandledException -= new UnhandledExceptionEventHandler(MyHandler);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void UnhandledException_NotCalled_When_Handled()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(NotExpectedToBeCalledHandler);
                 try
                 {
@@ -80,7 +81,7 @@ namespace System.Tests
                 {
                 }
                 AppDomain.CurrentDomain.UnhandledException -= new UnhandledExceptionEventHandler(NotExpectedToBeCalledHandler);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -92,12 +93,12 @@ namespace System.Tests
             System.IO.File.Delete("success.txt");
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.CheckExitCode = false;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
                 throw new Exception("****This Unhandled Exception is Expected****");
 #pragma warning disable 0162
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
 #pragma warning restore 0162
             }, options).Dispose();
 
@@ -138,9 +139,9 @@ namespace System.Tests
         public void Id()
         {
             // if running directly on some platforms Xunit may be Id = 1
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assert.Equal(1, AppDomain.CurrentDomain.Id);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }        
 
@@ -159,20 +160,20 @@ namespace System.Tests
         [Fact]
         public void FirstChanceException_Add_Remove()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 EventHandler<FirstChanceExceptionEventArgs> handler = (sender, e) =>
                 {
                 };
                 AppDomain.CurrentDomain.FirstChanceException += handler;
                 AppDomain.CurrentDomain.FirstChanceException -= handler;
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void FirstChanceException_Called()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 bool flag = false;
                 EventHandler<FirstChanceExceptionEventArgs> handler = (sender, e) =>
                 {
@@ -192,7 +193,7 @@ namespace System.Tests
                 }
                 AppDomain.CurrentDomain.FirstChanceException -= handler;
                 Assert.True(flag, "FirstChanceHandler not called");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -205,13 +206,13 @@ namespace System.Tests
         [Fact]
         public void ProcessExit_Add_Remove()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 EventHandler handler = (sender, e) =>
                 {
                 };
                 AppDomain.CurrentDomain.ProcessExit += handler;
                 AppDomain.CurrentDomain.ProcessExit -= handler;
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -220,7 +221,7 @@ namespace System.Tests
         public void ProcessExit_Called()
         {
             string path = GetTestFilePath();
-            RemoteInvoke((pathToFile) =>
+            RemoteExecutor.Invoke((pathToFile) =>
             {
                 EventHandler handler = (sender, e) =>
                 {
@@ -228,7 +229,7 @@ namespace System.Tests
                 };
 
                 AppDomain.CurrentDomain.ProcessExit += handler;
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, path).Dispose();
 
             Assert.True(File.Exists(path));
@@ -263,7 +264,7 @@ namespace System.Tests
         [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)]
         public void ExecuteAssemblyByName()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 string name = "TestApp";
                 var assembly = Assembly.Load(name);
                 Assert.Equal(5, AppDomain.CurrentDomain.ExecuteAssemblyByName(assembly.FullName));
@@ -272,7 +273,7 @@ namespace System.Tests
                 AssemblyName assemblyName = assembly.GetName();
                 assemblyName.CodeBase = null;
                 Assert.Equal(105, AppDomain.CurrentDomain.ExecuteAssemblyByName(assemblyName, new string[3] { "50", "25", "25" }));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -300,20 +301,20 @@ namespace System.Tests
         [Fact]
         public void GetData_SetData()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AssertExtensions.Throws<ArgumentNullException>("name", () => { AppDomain.CurrentDomain.SetData(null, null); });
                 AppDomain.CurrentDomain.SetData("", null);
                 Assert.Null(AppDomain.CurrentDomain.GetData(""));
                 AppDomain.CurrentDomain.SetData("randomkey", 4);
                 Assert.Equal(4, AppDomain.CurrentDomain.GetData("randomkey"));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void SetData_SameKeyMultipleTimes_ReplacesOldValue()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 string key = Guid.NewGuid().ToString("N");
                 for (int i = 0; i < 3; i++)
                 {
@@ -321,7 +322,7 @@ namespace System.Tests
                     Assert.Equal(i.ToString(), AppDomain.CurrentDomain.GetData(key));
                 }
                 AppDomain.CurrentDomain.SetData(key, null);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -338,10 +339,10 @@ namespace System.Tests
         public void IsDefaultAppDomain()
         {
             // Xunit may be default app domain if run directly
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(AppDomain.CurrentDomain.IsDefaultAppDomain());
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -355,7 +356,7 @@ namespace System.Tests
         public void toString()
         {
             // Workaround issue: UWP culture is process wide
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
@@ -374,10 +375,10 @@ namespace System.Tests
         [Fact]
         public void Unload()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AssertExtensions.Throws<ArgumentNullException>("domain", () => { AppDomain.Unload(null); });
                 Assert.Throws<CannotUnloadAppDomainException>(() => { AppDomain.Unload(AppDomain.CurrentDomain); });
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -408,7 +409,7 @@ namespace System.Tests
         [Fact]
         public void MonitoringIsEnabled()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assert.False(AppDomain.MonitoringIsEnabled);
                 Assert.Throws<ArgumentException>(() => { AppDomain.MonitoringIsEnabled = false; });
 
@@ -421,7 +422,7 @@ namespace System.Tests
                 {
                     Assert.Throws<PlatformNotSupportedException>(() => { AppDomain.MonitoringIsEnabled = true; });
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -470,54 +471,54 @@ namespace System.Tests
         [Fact]
         public void AppendPrivatePath()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.AppendPrivatePath("test");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void ClearPrivatePath()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.ClearPrivatePath();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void ClearShadowCopyPath()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.ClearShadowCopyPath();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void SetCachePath()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.SetCachePath("test");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void SetShadowCopyFiles()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.SetShadowCopyFiles();
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void SetShadowCopyPath()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AppDomain.CurrentDomain.SetShadowCopyPath("test");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -527,7 +528,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void GetAssemblies()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
                 Assert.NotNull(assemblies);
                 Assert.True(assemblies.Length > 0, "There must be assemblies already loaded in the process");
@@ -558,7 +559,7 @@ namespace System.Tests
                     }
                 }
                 Assert.True(ctr > 0, "Assembly.LoadFile should cause file to be loaded again");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -567,7 +568,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void AssemblyLoad()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 bool AssemblyLoadFlag = false;
                 AssemblyLoadEventHandler handler = (sender, args) =>
                 {
@@ -588,7 +589,7 @@ namespace System.Tests
                     AppDomain.CurrentDomain.AssemblyLoad -= handler;
                 }
                 Assert.True(AssemblyLoadFlag);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -598,7 +599,7 @@ namespace System.Tests
         {
             CopyTestAssemblies();
 
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 ResolveEventHandler handler = (sender, e) =>
                 {
                     return Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "AssemblyResolveTestApp.dll"));
@@ -608,7 +609,7 @@ namespace System.Tests
 
                 Type t = Type.GetType("AssemblyResolveTestApp.Class1, AssemblyResolveTestApp", true);
                 Assert.NotNull(t);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -618,7 +619,7 @@ namespace System.Tests
         {
             CopyTestAssemblies();
 
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assembly a = Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "TestAppOutsideOfTPA.exe"));
 
                 ResolveEventHandler handler = (sender, e) =>
@@ -632,14 +633,14 @@ namespace System.Tests
                 MethodInfo myMethodInfo = ptype.GetMethod("foo");
                 object ret = myMethodInfo.Invoke(null, null);
                 Assert.NotNull(ret);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void AssemblyResolve_IsNotCalledForCoreLibResources()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 bool assemblyResolveHandlerCalled = false;
                 AppDomain.CurrentDomain.AssemblyResolve +=
@@ -666,7 +667,7 @@ namespace System.Tests
                     CultureInfo.CurrentUICulture = previousUICulture;
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -674,7 +675,7 @@ namespace System.Tests
         [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)]
         public void TypeResolve()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assert.Throws<TypeLoadException>(() => Type.GetType("Program", true));
 
                 ResolveEventHandler handler = (sender, args) =>
@@ -694,7 +695,7 @@ namespace System.Tests
                     AppDomain.CurrentDomain.TypeResolve -= handler;
                 }
                 Assert.NotNull(t);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -703,7 +704,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "In UWP the resources always exist in the resources.pri file even if the assembly is not loaded")]
         public void ResourceResolve()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 ResourceManager res = new ResourceManager(typeof(FxResources.TestApp.SR));
                 Assert.Throws<MissingManifestResourceException>(() => res.GetString("Message"));
 
@@ -724,19 +725,19 @@ namespace System.Tests
                     AppDomain.CurrentDomain.ResourceResolve -= handler;
                 }
                 Assert.Equal(s, "Happy Halloween");
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]       
         public void SetThreadPrincipal()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assert.Throws<ArgumentNullException>(() => { AppDomain.CurrentDomain.SetThreadPrincipal(null); });
                 var identity = new System.Security.Principal.GenericIdentity("NewUser");
                 var principal = new System.Security.Principal.GenericPrincipal(identity, null);
                 AppDomain.CurrentDomain.SetThreadPrincipal(principal);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 0db8317..5f77a63 100644 (file)
@@ -9,6 +9,7 @@ using System.Reflection;
 using System.Runtime.Remoting;
 using System.Security;
 using System.Security.Permissions;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
@@ -18,19 +19,19 @@ namespace System.Tests
         [Fact]
         public void GetSetupInformation()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assert.Equal(AppContext.BaseDirectory, AppDomain.CurrentDomain.SetupInformation.ApplicationBase);
                 Assert.Equal(AppContext.TargetFrameworkName, AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void GetPermissionSet()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assert.Equal(new PermissionSet(PermissionState.Unrestricted), AppDomain.CurrentDomain.PermissionSet);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }    
  
index a459ae8..1779846 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.IO;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public class Environment_Exit : RemoteExecutorTestBase
+    public class Environment_Exit
     {
         public static object[][] ExitCodeValues = new object[][]
         {
@@ -24,7 +25,7 @@ namespace System.Tests
         [MemberData(nameof(ExitCodeValues))]
         public static void CheckExitCode(int expectedExitCode)
         {
-            RemoteInvoke(s => int.Parse(s), expectedExitCode.ToString(), new RemoteInvokeOptions { ExpectedExitCode = expectedExitCode }).Dispose();
+            RemoteExecutor.Invoke(s => int.Parse(s), expectedExitCode.ToString(), new RemoteInvokeOptions { ExpectedExitCode = expectedExitCode }).Dispose();
         }
 
         [Theory]
@@ -55,7 +56,7 @@ namespace System.Tests
             }
             else
             {
-                psi.FileName = HostRunner;
+                psi.FileName = RemoteExecutor.HostRunner;
                 psi.Arguments = $"{AppName} {expectedExitCode} {mode}";
             }
 
index 285fb6c..2ba96f7 100644 (file)
@@ -5,12 +5,13 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Reflection;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
     [ActiveIssue("https://github.com/dotnet/corefx/issues/21413", TargetFrameworkMonikers.Uap)]
-    public class GetCommandLineArgs : RemoteExecutorTestBase
+    public class GetCommandLineArgs
     {
         public static IEnumerable<object[]> GetCommandLineArgs_TestData()
         {
@@ -29,15 +30,15 @@ namespace System.Tests
             switch (args.Length)
             {
                 case 1:
-                    RemoteInvoke((arg) => CheckCommandLineArgs(new string[] { arg }), args[0]).Dispose();
+                    RemoteExecutor.Invoke((arg) => CheckCommandLineArgs(new string[] { arg }), args[0]).Dispose();
                     break;
 
                 case 2:
-                    RemoteInvoke((arg1, arg2) => CheckCommandLineArgs(new string[] { arg1, arg2 }), args[0], args[1]).Dispose();
+                    RemoteExecutor.Invoke((arg1, arg2) => CheckCommandLineArgs(new string[] { arg1, arg2 }), args[0], args[1]).Dispose();
                     break;
 
                 case 3:
-                    RemoteInvoke((arg1, arg2, arg3) => CheckCommandLineArgs(new string[] { arg1, arg2, arg3 }), args[0], args[1], args[2]).Dispose();
+                    RemoteExecutor.Invoke((arg1, arg2, arg3) => CheckCommandLineArgs(new string[] { arg1, arg2, arg3 }), args[0], args[1], args[2]).Dispose();
                     break;
 
                 default:
@@ -52,7 +53,7 @@ namespace System.Tests
             string[] cmdLineArgs = Environment.GetCommandLineArgs();
 
             Assert.InRange(cmdLineArgs.Length, 5, int.MaxValue); /*AppName, AssemblyName, TypeName, MethodName, ExceptionFile */
-            Assert.Contains(TestConsoleApp, cmdLineArgs[0]); /*The host returns the fullName*/
+            Assert.Contains(RemoteExecutor.Path, cmdLineArgs[0]); /*The host returns the fullName*/
 
             Type t = typeof(GetCommandLineArgs);
             MethodInfo mi = t.GetMethod("CheckCommandLineArgs");
@@ -69,7 +70,7 @@ namespace System.Tests
                 Assert.Equal(args[i], cmdLineArgs[i + 5]);
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
     }
 }
index 69a16ab..0fa3f76 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections;
 using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Security;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public class SetEnvironmentVariable : RemoteExecutorTestBase
+    public class SetEnvironmentVariable
     {
         private const string NullString = "\u0000";
 
@@ -76,7 +77,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")]
         public void EnvironmentVariableTooLarge_Throws()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string longVar;
                 string val = "Test_SetEnvironmentVariable_EnvironmentVariableTooLarge_Throws";
@@ -90,7 +91,7 @@ namespace System.Tests
                 catch (OutOfMemoryException)
                 {
                     // not enough memory to allocate a string at test time
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }
 
                 try
@@ -103,7 +104,7 @@ namespace System.Tests
                 {
                     // expected
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -112,7 +113,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")]
         public void EnvironmentVariableValueTooLarge_Throws()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string var = "Test_SetEnvironmentVariable_EnvironmentVariableValueTooLarge_Throws";
                 string longVal;
@@ -126,7 +127,7 @@ namespace System.Tests
                 catch (OutOfMemoryException)
                 {
                     // not enough memory to allocate a string at test time
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }
 
                 try
@@ -139,7 +140,7 @@ namespace System.Tests
                 {
                     // expected
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index f96207c..d561ea4 100644 (file)
@@ -11,12 +11,13 @@ using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Threading;
 using System.Threading.Tasks;
-using Xunit;
+using Microsoft.DotNet.RemoteExecutor;
 using Microsoft.DotNet.XUnitExtensions;
+using Xunit;
 
 namespace System.Tests
 {
-    public class EnvironmentTests : RemoteExecutorTestBase
+    public class EnvironmentTests : FileCleanupTestBase
     {
         [Fact]
         public void CurrentDirectory_Null_Path_Throws_ArgumentNullException()
@@ -39,7 +40,7 @@ namespace System.Tests
         [Fact]
         public void CurrentDirectory_SetToValidOtherDirectory()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Environment.CurrentDirectory = TestDirectory;
                 Assert.Equal(Directory.GetCurrentDirectory(), Environment.CurrentDirectory);
@@ -52,7 +53,7 @@ namespace System.Tests
                     Assert.Equal(TestDirectory, Directory.GetCurrentDirectory());
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -197,20 +198,20 @@ namespace System.Tests
         [ActiveIssue("21404", TargetFrameworkMonikers.Uap)]
         public void FailFast_ExpectFailureExitCode()
         {
-            using (RemoteInvokeHandle handle = RemoteInvoke(() => { Environment.FailFast("message"); return SuccessExitCode; }))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(() => { Environment.FailFast("message"); return RemoteExecutor.SuccessExitCode; }))
             {
                 Process p = handle.Process;
                 handle.Process = null;
                 p.WaitForExit();
-                Assert.NotEqual(SuccessExitCode, p.ExitCode);
+                Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode);
             }
 
-            using (RemoteInvokeHandle handle = RemoteInvoke(() => { Environment.FailFast("message", new Exception("uh oh")); return SuccessExitCode; }))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(() => { Environment.FailFast("message", new Exception("uh oh")); return RemoteExecutor.SuccessExitCode; }))
             {
                 Process p = handle.Process;
                 handle.Process = null;
                 p.WaitForExit();
-                Assert.NotEqual(SuccessExitCode, p.ExitCode);
+                Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode);
             }
         }
 
@@ -224,8 +225,8 @@ namespace System.Tests
             psi.RedirectStandardError = true;
             psi.RedirectStandardOutput = true;
 
-            using (RemoteInvokeHandle handle = RemoteInvoke(
-                () => { Environment.FailFast("message", new ArgumentException("bad arg")); return SuccessExitCode; },
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(
+                () => { Environment.FailFast("message", new ArgumentException("bad arg")); return RemoteExecutor.SuccessExitCode; },
                 new RemoteInvokeOptions { StartInfo = psi }))
             {
                 Process p = handle.Process;
@@ -249,8 +250,8 @@ namespace System.Tests
             psi.RedirectStandardError = true;
             psi.RedirectStandardOutput = true;
 
-            using (RemoteInvokeHandle handle = RemoteInvoke(
-                () => { Environment.FailFast("message", new StackOverflowException("SO exception")); return SuccessExitCode; },
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(
+                () => { Environment.FailFast("message", new StackOverflowException("SO exception")); return RemoteExecutor.SuccessExitCode; },
                 new RemoteInvokeOptions { StartInfo = psi }))
             {
                 Process p = handle.Process;
@@ -274,8 +275,8 @@ namespace System.Tests
             psi.RedirectStandardError = true;
             psi.RedirectStandardOutput = true;
 
-            using (RemoteInvokeHandle handle = RemoteInvoke(
-                () => { Environment.FailFast("message", new ArgumentException("first exception", new NullReferenceException("inner exception"))); return SuccessExitCode; },
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(
+                () => { Environment.FailFast("message", new ArgumentException("first exception", new NullReferenceException("inner exception"))); return RemoteExecutor.SuccessExitCode; },
                 new RemoteInvokeOptions { StartInfo = psi }))
             {
                 Process p = handle.Process;
index e07cb52..ad4d067 100644 (file)
@@ -7,7 +7,7 @@ using Xunit;
 
 namespace System.IO.Tests
 {
-    public partial class PathTestsBase : RemoteExecutorTestBase
+    public partial class PathTestsBase
     {
         protected static string Sep = Path.DirectorySeparatorChar.ToString();
         protected static string AltSep = Path.AltDirectorySeparatorChar.ToString();
index 19b2473..1ea28e4 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -48,7 +49,7 @@ namespace System.IO.Tests
         [Fact]
         public void GetTempPath_SetEnvVar_Unix()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 foreach (string[] tempPath in GetTempPath_SetEnvVar_Data())
                 {
index 005a116..049c7ab 100644 (file)
@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using System.Text;
 using System.Text.RegularExpressions;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.IO.Tests
@@ -72,7 +73,7 @@ namespace System.IO.Tests
         [Fact]
         public void GetTempPath_SetEnvVar()
         {
-            RemoteInvoke(() => 
+            RemoteExecutor.Invoke(() => 
             {
                 foreach (string[] tempPath in GetTempPath_SetEnvVar_Data())
                 {
index 629e7e0..57d88f5 100644 (file)
@@ -5,12 +5,13 @@
 using System.Diagnostics;
 using System.IO;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
 namespace System.Runtime.Tests
 {
-    public class ProfileOptimizationTest : RemoteExecutorTestBase
+    public class ProfileOptimizationTest : FileCleanupTestBase
     {
         // Active issue https://github.com/dotnet/corefx/issues/31792
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRedHatFamily6))]
@@ -18,7 +19,7 @@ namespace System.Runtime.Tests
         {
             string profileFile = GetTestFileName();
 
-            RemoteInvoke((_profileFile) =>
+            RemoteExecutor.Invoke((_profileFile) =>
             {
                 // tracking down why test sporadically fails on RedHat69
                 // write to the file first to check permissions
index 99290d4..99bfc00 100644 (file)
@@ -5,11 +5,12 @@
 using System.Diagnostics;
 using System.IO;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public class UnloadingAndProcessExitTests : RemoteExecutorTestBase
+    public class UnloadingAndProcessExitTests : FileCleanupTestBase
     {
         [ActiveIssue("https://github.com/dotnet/corefx/issues/23307", TargetFrameworkMonikers.Uap)]
         [Fact]
@@ -31,10 +32,10 @@ namespace System.Tests
                 System.Runtime.Loader.AssemblyLoadContext.Default.Unloading += acl => OnUnloading(1);
                 File.AppendAllText(f, "h");
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             };
 
-            using (var remote = RemoteInvoke(otherProcess, fileName))
+            using (var remote = RemoteExecutor.Invoke(otherProcess, fileName))
             {
             }
 
index 043d4e6..e6a1bf5 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Numerics.Tests
 {
-    public partial class ToStringTest : RemoteExecutorTestBase
+    public partial class ToStringTest
     {
         private static bool s_noZeroOut = true;
 
@@ -188,7 +189,7 @@ namespace System.Numerics.Tests
         [Fact]
         public static void RunRegionSpecificStandardFormatToStringTests()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo[] cultures = new CultureInfo[] { new CultureInfo("en-US"), new CultureInfo("en-GB"), new CultureInfo("fr-CA"),
                                                              new CultureInfo("ar-SA"), new CultureInfo("de-DE"), new CultureInfo("he-IL"),
index 9ea834a..e5b4c95 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Numerics.Tests
 {
-    public partial class parseTest : RemoteExecutorTestBase
+    public partial class parseTest
     {
         private readonly static int s_samples = 10;
         private readonly static Random s_random = new Random(100);
@@ -35,7 +36,7 @@ namespace System.Numerics.Tests
         [OuterLoop]
         public static void RunParseToStringTests(CultureInfo culture)
         {
-            RemoteInvoke((cultureName) =>
+            RemoteExecutor.Invoke((cultureName) =>
             {
                 byte[] tempByteArray1 = new byte[0];
 
index 07c0540..49bbb84 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{28AE24F8-BEF4-4358-B612-ADD9D587C8E1}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="ComplexTests.cs" />
     <Compile Include="ComplexTests.netcoreapp.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 19acaa6..777d31a 100644 (file)
@@ -14,11 +14,12 @@ using System.Reflection;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Text;
 using System.Text.RegularExpressions;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Runtime.Serialization.Formatters.Tests
 {
-    public partial class BinaryFormatterTests : RemoteExecutorTestBase
+    public partial class BinaryFormatterTests : FileCleanupTestBase
     {
         // On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions.
         [ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))]
@@ -504,7 +505,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
             }
 
             // In another process, deserialize from that file and serialize to another
-            RemoteInvoke((remoteInput, remoteOutput) =>
+            RemoteExecutor.Invoke((remoteInput, remoteOutput) =>
             {
                 Assert.False(File.Exists(remoteOutput));
                 using (FileStream input = File.OpenRead(remoteInput))
@@ -512,7 +513,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
                 {
                     var b = new BinaryFormatter();
                     b.Serialize(output, b.Deserialize(input));
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }
             }, outputPath, inputPath).Dispose();
 
index b0133ae..39715dd 100644 (file)
@@ -2,8 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{13CE5E71-D373-4EA6-B3CB-166FF089A42A}</ProjectGuid>
     <SkipIncludeNewtonsoftJson>true</SkipIncludeNewtonsoftJson>
-    <Configurations>netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="BinaryFormatterTestData.cs" />
   <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
     <Reference Include="System.Text.Json" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 587050d..4b97b78 100644 (file)
@@ -3,8 +3,9 @@
     <ProjectGuid>{B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <NoWarn>1718</NoWarn>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonTestPath)\System\EnumTypes.cs">
     <Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs">
       <Link>Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="TestLoadAssembly\TestLoadAssembly.csproj">
index 4c4ae4d..05a83f7 100644 (file)
@@ -9,11 +9,12 @@ using System.IO;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Runtime.Remoting;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class ActivatorTests : RemoteExecutorTestBase
+    public partial class ActivatorTests
     {
         [Fact]
         public void CreateInstance_NonPublicValueTypeWithPrivateDefaultConstructor_Success()
@@ -257,7 +258,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile is not supported in AppX.")]
         public static void CreateInstanceAssemblyResolve()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs args) => Assembly.LoadFile(Path.Combine(Directory.GetCurrentDirectory(), "TestLoadAssembly.dll"));
                 ObjectHandle oh = Activator.CreateInstance(",,,,", "PublicClassSample");
index 9459d7f..a7e82d0 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Reflection;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.ComponentModel.Tests
 {
-    public partial class DefaultValueAttributeTests : RemoteExecutorTestBase
+    public partial class DefaultValueAttributeTests
     {
         [Fact]
         public static void Ctor()
@@ -71,7 +72,7 @@ namespace System.ComponentModel.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public void Ctor_TypeDescriptorNotFound_ExceptionFallback(Type type, bool returnNull, string stringToConvert, int expectedValue)
         {
-            RemoteInvoke((innerType, innerReturnNull, innerStringToConvert, innerExpectedValue) =>
+            RemoteExecutor.Invoke((innerType, innerReturnNull, innerStringToConvert, innerExpectedValue) =>
             {
                 FieldInfo s_convertFromInvariantString = typeof(DefaultValueAttribute).GetField("s_convertFromInvariantString", BindingFlags.GetField | Reflection.BindingFlags.NonPublic | Reflection.BindingFlags.Static);
                 Assert.NotNull(s_convertFromInvariantString);
index 3216187..31a23a5 100644 (file)
@@ -7,11 +7,12 @@ using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
 using System.Numerics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class DecimalTests : RemoteExecutorTestBase
+    public partial class DecimalTests
     {
         [Fact]
         public static void MaxValue()
@@ -1240,7 +1241,7 @@ namespace System.Tests
         [Fact]
         public static void Test_ToString()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -1248,7 +1249,7 @@ namespace System.Tests
                 {
                     ToString((decimal)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 2efce93..d7dcd99 100644 (file)
@@ -4,6 +4,7 @@
 
 using System.Collections.Generic;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
@@ -75,7 +76,7 @@ namespace System.Tests
         [Fact]
         public static void TryFormat()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -132,7 +133,7 @@ namespace System.Tests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index db59290..6f9a410 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Runtime.CompilerServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class DoubleTests : RemoteExecutorTestBase
+    public partial class DoubleTests
     {
         // NOTE: Consider duplicating any tests added here in SingleTests.cs
 
@@ -470,7 +471,7 @@ namespace System.Tests
         [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
         public static void Test_ToString_NetFramework()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -478,7 +479,7 @@ namespace System.Tests
                 {
                     ToString((double)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -486,7 +487,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public static void Test_ToString_NotNetFramework()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -494,7 +495,7 @@ namespace System.Tests
                 {
                     ToString((double)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 8144734..ddcb81d 100644 (file)
@@ -5,6 +5,7 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
@@ -144,7 +145,7 @@ namespace System.Tests
         [Fact]
         public static void TryFormat()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -186,7 +187,7 @@ namespace System.Tests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index d96e565..30e86c4 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.Runtime.InteropServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public class ExitCodeTests : RemoteExecutorTestBase
+    public class ExitCodeTests
     {
         private const int SIGTERM = 15;
 
@@ -40,7 +41,7 @@ namespace System.Tests
 
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.StartInfo.RedirectStandardOutput = true;
-            using (RemoteInvokeHandle remoteExecution = RemoteInvoke(action, exitCodeOnSigterm?.ToString() ?? string.Empty, options))
+            using (RemoteInvokeHandle remoteExecution = RemoteExecutor.Invoke(action, exitCodeOnSigterm?.ToString() ?? string.Empty, options))
             {
                 Process process = remoteExecution.Process;
 
@@ -53,7 +54,7 @@ namespace System.Tests
                 Assert.Equal(0, rv);
 
                 // Process exits in a timely manner
-                bool exited = process.WaitForExit(FailWaitTimeoutMilliseconds);
+                bool exited = process.WaitForExit(RemoteExecutor.FailWaitTimeoutMilliseconds);
                 Assert.True(exited);
 
                 // Check exit code
index d313a5d..26f4445 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class FormattableStringTests : RemoteExecutorTestBase
+    public partial class FormattableStringTests
     {
         [Fact]
         public static void Invariant_Null_ThrowsArgumentNullException()
@@ -19,7 +20,7 @@ namespace System.Tests
         [Fact]
         public static void Invariant_DutchCulture_FormatsDoubleBasedOnInvariantCulture()
         {
-            RemoteInvoke(
+            RemoteExecutor.Invoke(
                 () =>
                 {
                     CultureInfo.CurrentCulture = new CultureInfo("nl"); // would be 123,456 in Dutch
@@ -28,7 +29,7 @@ namespace System.Tests
                     string actual = FormattableString.Invariant($"Invariant culture is used {d}");
                     Assert.Equal(expected, actual);
 
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }).Dispose();
         }
 
@@ -44,7 +45,7 @@ namespace System.Tests
         [Fact]
         public static void IFormattableToString_UsesSuppliedFormatProvider()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("nl"); // would be 123,456 in Dutch
                 double d = 123.456;
@@ -52,7 +53,7 @@ namespace System.Tests
                 string actual = ((IFormattable)((FormattableString)$"Invariant culture is used {d}")).ToString(null, CultureInfo.InvariantCulture);
                 Assert.Equal(expected, actual);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 64f7fb7..a590bf0 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class FormattableStringTests : RemoteExecutorTestBase
+    public partial class FormattableStringTests
     {
         [Fact]
         public static void CurrentCulture_ImplicityAndExplicitMethodsReturnSameString()
@@ -28,18 +29,17 @@ namespace System.Tests
         [Fact]
         public static void CurrentCulture_DutchCulture_FormatsDoubleBasedOnCurrentCulture()
         {
-            RemoteInvoke(
-                () =>
-                {
-                    var dutchCulture = new CultureInfo("nl");
-                    CultureInfo.CurrentCulture = dutchCulture;
-                    double d = 123.456;
-                    string expected = string.Format(dutchCulture, "Dutch decimal separator is comma {0}", d);
-                    string actual = FormattableString.CurrentCulture($"Dutch decimal separator is comma {d}");
-                    Assert.Equal(expected, actual);
+            RemoteExecutor.Invoke(() =>
+            {
+                var dutchCulture = new CultureInfo("nl");
+                CultureInfo.CurrentCulture = dutchCulture;
+                double d = 123.456;
+                string expected = string.Format(dutchCulture, "Dutch decimal separator is comma {0}", d);
+                string actual = FormattableString.CurrentCulture($"Dutch decimal separator is comma {d}");
+                Assert.Equal(expected, actual);
 
-                    return SuccessExitCode;
-                }).Dispose();
+                return RemoteExecutor.SuccessExitCode;
+            }).Dispose();
         }
     }
 }
index da919c5..ca92864 100644 (file)
@@ -6,6 +6,7 @@ using System.Runtime.CompilerServices;
 using System.Diagnostics;
 using System.Threading;
 using System.Runtime;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
@@ -420,8 +421,7 @@ namespace System.Tests
         public static void LatencyRoundtrips_LowLatency(GCLatencyMode value) => LatencyRoundtrips(value);
     }
 
-    public class GCExtendedTests : RemoteExecutorTestBase
-    {
+    public class GCExtendedTests    {
         private const int TimeoutMilliseconds = 10 * 30 * 1000; //if full GC is triggered it may take a while
 
         /// <summary>
@@ -442,7 +442,7 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
                 {
 
                     Func<WeakReference> getweakref = delegate ()
@@ -465,7 +465,7 @@ namespace System.Tests
                     GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, true, true);
                     Assert.Throws<ArgumentNullException>(() => GC.GetGeneration(weakref));
 #endif
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, options).Dispose();
 
         }
@@ -501,10 +501,10 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke((approachString, timeoutString) =>
+            RemoteExecutor.Invoke((approachString, timeoutString) =>
                 {
                     TestWait(bool.Parse(approachString), int.Parse(timeoutString));
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, approach.ToString(), timeout.ToString(), options).Dispose();
         }
 
@@ -514,10 +514,10 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
                 {
                     Assert.Throws<InvalidOperationException>(() => GC.EndNoGCRegion());
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, options).Dispose();
         }
 
@@ -537,7 +537,7 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
                 {
                     Assert.True(GC.TryStartNoGCRegion(1024));
 
@@ -546,7 +546,7 @@ namespace System.Tests
                     // at this point, the GC should have booted us out of the no GC region
                     // since we allocated too much.
                     Assert.Throws<InvalidOperationException>(() => GC.EndNoGCRegion());
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 }, options).Dispose();
         }
 
@@ -556,14 +556,14 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget));
                 Assert.Throws<InvalidOperationException>(() => GC.TryStartNoGCRegion(NoGCRequestedBudget));
 
                 Assert.Throws<InvalidOperationException>(() => GC.EndNoGCRegion());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, options).Dispose();
         }
 
@@ -573,14 +573,14 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget, true));
                 Assert.Throws<InvalidOperationException>(() => GC.TryStartNoGCRegion(NoGCRequestedBudget, true));
 
                 Assert.Throws<InvalidOperationException>(() => GC.EndNoGCRegion());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, options).Dispose();
         }
 
@@ -590,14 +590,14 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget, NoGCRequestedBudget));
                 Assert.Throws<InvalidOperationException>(() => GC.TryStartNoGCRegion(NoGCRequestedBudget, NoGCRequestedBudget));
 
                 Assert.Throws<InvalidOperationException>(() => GC.EndNoGCRegion());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, options).Dispose();
         }
 
@@ -607,14 +607,14 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget, NoGCRequestedBudget, true));
                 Assert.Throws<InvalidOperationException>(() => GC.TryStartNoGCRegion(NoGCRequestedBudget, NoGCRequestedBudget, true));
 
                 Assert.Throws<InvalidOperationException>(() => GC.EndNoGCRegion());
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, options).Dispose();
         }
 
@@ -624,7 +624,7 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // The budget for this test is 4mb, because the act of throwing an exception with a message
                 // contained in a resource file has to potential to allocate a lot on CoreRT. In particular, when compiling
@@ -637,7 +637,7 @@ namespace System.Tests
 
                 GC.EndNoGCRegion();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, options).Dispose();
         }
 
@@ -647,14 +647,14 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
                 {
 
                     Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget));
                     Assert.Equal(GCSettings.LatencyMode, GCLatencyMode.NoGCRegion);
                     GC.EndNoGCRegion();
 
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
 
                 }, options).Dispose();
         }
@@ -665,13 +665,13 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget, true));
                 Assert.Equal(GCSettings.LatencyMode, GCLatencyMode.NoGCRegion);
                 GC.EndNoGCRegion();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
 
             }, options).Dispose();
         }
@@ -682,13 +682,13 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget, NoGCRequestedBudget));
                 Assert.Equal(GCSettings.LatencyMode, GCLatencyMode.NoGCRegion);
                 GC.EndNoGCRegion();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
 
             }, options).Dispose();
         }
@@ -699,13 +699,13 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.True(GC.TryStartNoGCRegion(NoGCRequestedBudget, NoGCRequestedBudget, true));
                 Assert.Equal(GCSettings.LatencyMode, GCLatencyMode.NoGCRegion);
                 GC.EndNoGCRegion();
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
 
             }, options).Dispose();
         }
@@ -719,10 +719,10 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(sizeString =>
+            RemoteExecutor.Invoke(sizeString =>
             {
                 AssertExtensions.Throws<ArgumentOutOfRangeException>("totalSize", () => GC.TryStartNoGCRegion(long.Parse(sizeString)));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, size.ToString(), options).Dispose();
         }
 
@@ -736,10 +736,10 @@ namespace System.Tests
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
             options.TimeOut = TimeoutMilliseconds;
-            RemoteInvoke(sizeString =>
+            RemoteExecutor.Invoke(sizeString =>
             {
                 AssertExtensions.Throws<ArgumentOutOfRangeException>("lohSize", () => GC.TryStartNoGCRegion(1024, long.Parse(sizeString)));
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, size.ToString(), options).Dispose();
         }
 
index f3b34a9..960a371 100644 (file)
@@ -7,6 +7,7 @@ using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Runtime.Loader;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Reflection.Tests
@@ -18,7 +19,7 @@ namespace System.Reflection.Tests
     }
 
     [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AssemblyLoadContext not available in NetFx")]
-    public class IsCollectibleTests : RemoteExecutorTestBase
+    public class IsCollectibleTests
     {
         static public string asmNameString = "TestCollectibleAssembly";
         static public string asmPath = Path.Combine(Environment.CurrentDirectory, "TestCollectibleAssembly.dll");
@@ -38,7 +39,7 @@ namespace System.Reflection.Tests
         [Fact]
         public void Assembly_IsCollectibleFalse_WhenUsingAssemblyLoad()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 Assembly asm = Assembly.LoadFrom(asmPath);
 
                 Assert.NotNull(asm);
@@ -56,14 +57,14 @@ namespace System.Reflection.Tests
                 Assert.Contains(asm, alc.Assemblies);
 #endif
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void Assembly_IsCollectibleFalse_WhenUsingAssemblyLoadContext()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AssemblyLoadContext alc = new AssemblyLoadContext("Assembly_IsCollectibleFalse_WhenUsingAssemblyLoadContext");
 
                 Assembly asm = alc.LoadFromAssemblyPath(asmPath);
@@ -81,14 +82,14 @@ namespace System.Reflection.Tests
                 Assert.Contains(asm, alc.Assemblies);
 #endif
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void Assembly_IsCollectibleTrue_WhenUsingTestAssemblyLoadContext()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 AssemblyLoadContext alc = new TestAssemblyLoadContext();
 
                 Assembly asm = alc.LoadFromAssemblyPath(asmPath);
@@ -106,7 +107,7 @@ namespace System.Reflection.Tests
                 Assert.Contains(asm, alc.Assemblies);
 #endif
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -120,7 +121,7 @@ namespace System.Reflection.Tests
         [InlineData("MyStaticGenericMethod")]
         public void MemberInfo_IsCollectibleFalse_WhenUsingAssemblyLoad(string memberName)
         {
-            RemoteInvoke((marshalledName) => 
+            RemoteExecutor.Invoke((marshalledName) => 
             {
                 Type t1 = Type.GetType(
                     "TestCollectibleAssembly.MyTestClass, TestCollectibleAssembly, Version=1.0.0.0", 
@@ -137,7 +138,7 @@ namespace System.Reflection.Tests
 
                 Assert.False(member.IsCollectible);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, memberName).Dispose();
         }
 
@@ -151,7 +152,7 @@ namespace System.Reflection.Tests
         [InlineData("MyGenericMethod")]
         public void MemberInfoGeneric_IsCollectibleFalse_WhenUsingAssemblyLoad(string memberName)
         {
-            RemoteInvoke((marshalledName) => 
+            RemoteExecutor.Invoke((marshalledName) => 
             {
                 Type t1 = Type.GetType(
                     "TestCollectibleAssembly.MyGenericTestClass`1[System.Int32], TestCollectibleAssembly, Version=1.0.0.0", 
@@ -168,7 +169,7 @@ namespace System.Reflection.Tests
 
                 Assert.False(member.IsCollectible);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, memberName).Dispose();
         }
 
@@ -182,7 +183,7 @@ namespace System.Reflection.Tests
         [InlineData("MyStaticGenericMethod")]
         public void MemberInfo_IsCollectibleTrue_WhenUsingAssemblyLoadContext(string memberName)
         {
-            RemoteInvoke((marshalledName) => 
+            RemoteExecutor.Invoke((marshalledName) => 
             {
                 AssemblyLoadContext alc = new TestAssemblyLoadContext();
 
@@ -201,7 +202,7 @@ namespace System.Reflection.Tests
 
                 Assert.True(member.IsCollectible);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, memberName).Dispose();
         }
 
@@ -215,7 +216,7 @@ namespace System.Reflection.Tests
         [InlineData("MyGenericMethod")]
         public void MemberInfoGeneric_IsCollectibleTrue_WhenUsingAssemblyLoadContext(string memberName)
         {
-            RemoteInvoke((marshalledName) => 
+            RemoteExecutor.Invoke((marshalledName) => 
             {
                 AssemblyLoadContext alc = new TestAssemblyLoadContext();
 
@@ -234,14 +235,14 @@ namespace System.Reflection.Tests
 
                 Assert.True(member.IsCollectible);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, memberName).Dispose();
         }
 
         [Fact]
         public void GenericWithCollectibleTypeParameter_IsCollectibleTrue_WhenUsingAssemblyLoadContext()
         {
-            RemoteInvoke(() => 
+            RemoteExecutor.Invoke(() => 
             {
                 AssemblyLoadContext alc = new TestAssemblyLoadContext();
 
@@ -256,7 +257,7 @@ namespace System.Reflection.Tests
 
                 Assert.True(t1.IsCollectible);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index 7dc7e6d..249b53a 100644 (file)
@@ -8,11 +8,12 @@ using System.Runtime.ExceptionServices;
 using System.Runtime.InteropServices;
 using System.Text.RegularExpressions;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Runtime.ExceptionServices.Tests
 {
-    public class HandleProcessCorruptedStateExceptionsTests : RemoteExecutorTestBase
+    public class HandleProcessCorruptedStateExceptionsTests
     {
         [DllImport("kernel32.dll")]
         static extern void RaiseException(uint dwExceptionCode, uint dwExceptionFlags, uint nNumberOfArguments, IntPtr lpArguments);
@@ -43,14 +44,14 @@ namespace System.Runtime.ExceptionServices.Tests
             // We expect the launched process to crash; don't let it write the resulting AV message to the console.
             var psi = new ProcessStartInfo() { RedirectStandardError = true, RedirectStandardOutput = true };
 
-            using (RemoteInvokeHandle handle = RemoteInvoke(() => { CauseAVInNative(); return SuccessExitCode; }, new RemoteInvokeOptions { CheckExitCode = false, StartInfo = psi }))
+            using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(() => { CauseAVInNative(); return RemoteExecutor.SuccessExitCode; }, new RemoteInvokeOptions { CheckExitCode = false, StartInfo = psi }))
             {
                 Process p = handle.Process;
                 p.WaitForExit();
                 if (PlatformDetection.IsFullFramework)
-                    Assert.Equal(SuccessExitCode, p.ExitCode);
+                    Assert.Equal(RemoteExecutor.SuccessExitCode, p.ExitCode);
                 else
-                    Assert.NotEqual(SuccessExitCode, p.ExitCode);
+                    Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode);
             }
         }
     }
index 47ff756..0977604 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Runtime.CompilerServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class SingleTests : RemoteExecutorTestBase
+    public partial class SingleTests
     {
         // NOTE: Consider duplicating any tests added here in DoubleTests.cs
 
@@ -468,7 +469,7 @@ namespace System.Tests
         [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
         public static void Test_ToString_NetFramework()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -476,7 +477,7 @@ namespace System.Tests
                 {
                     ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -484,7 +485,7 @@ namespace System.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
         public static void Test_ToString_NotNetFramework()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -492,7 +493,7 @@ namespace System.Tests
                 {
                     ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 4f7379d..ff3696c 100644 (file)
@@ -5,6 +5,7 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
@@ -147,7 +148,7 @@ namespace System.Tests
         [Fact]
         public static void TryFormat()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -189,7 +190,7 @@ namespace System.Tests
                     }
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 87a5fc9..ce4f672 100644 (file)
@@ -5,11 +5,12 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
 {
-    public partial class StringGetHashCodeTests : RemoteExecutorTestBase
+    public partial class StringGetHashCodeTests
     {
         /// <summary>
         /// Ensure that hash codes are randomized by getting the hash in two processes
@@ -20,19 +21,19 @@ namespace System.Tests
         [MemberData(nameof(GetHashCode_TestData))]
         public void GetHashCodeWithStringComparer_UseSameStringInTwoProcesses_ReturnsDifferentHashCodes(int getHashCodeIndex)
         {
-            Func<string, string, int> method = (parentHash, i) => int.Parse(parentHash) != s_GetHashCodes[int.Parse(i)]() ? SuccessExitCode : -1;
+            Func<string, string, int> method = (parentHash, i) => int.Parse(parentHash) != s_GetHashCodes[int.Parse(i)]() ? RemoteExecutor.SuccessExitCode : -1;
             int parentHashCode = s_GetHashCodes[getHashCodeIndex]();
             int exitCode, retry = 0;
             do
             {
                 // very small chance the child and parent hashcode are the same. To further reduce chance of collision we try up to 3 times
-                using (RemoteInvokeHandle handle = RemoteInvoke(method, parentHashCode.ToString(), getHashCodeIndex.ToString(), new RemoteInvokeOptions { CheckExitCode = false }))
+                using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(method, parentHashCode.ToString(), getHashCodeIndex.ToString(), new RemoteInvokeOptions { CheckExitCode = false }))
                 {
                     exitCode = handle.ExitCode;
                     retry++;
                 }
-            } while (exitCode != SuccessExitCode && retry < 3);
-            Assert.Equal(SuccessExitCode, exitCode);
+            } while (exitCode != RemoteExecutor.SuccessExitCode && retry < 3);
+            Assert.Equal(RemoteExecutor.SuccessExitCode, exitCode);
         }
 
         public static IEnumerable<object[]> GetHashCode_TestData()
index 754484f..69a5bdd 100644 (file)
@@ -8,6 +8,7 @@ using System.Globalization;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Tests
@@ -279,24 +280,24 @@ namespace System.Tests
         public static void Contains_StringComparison_TurkishI()
         {
             string str = "\u0069\u0130";
-            RemoteInvoke((source) =>
+            RemoteExecutor.Invoke((source) =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
 
                 Assert.True(source.Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
                 Assert.True(source.AsSpan().Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, str).Dispose();
 
-            RemoteInvoke((source) =>
+            RemoteExecutor.Invoke((source) =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
                 Assert.False(source.Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
                 Assert.False(source.AsSpan().Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, str).Dispose();
         }
 
@@ -665,7 +666,7 @@ namespace System.Tests
         {
             string src = "\u0069\u0130";
 
-            RemoteInvoke((source) =>
+            RemoteExecutor.Invoke((source) =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
 
@@ -676,10 +677,10 @@ namespace System.Tests
                 Assert.Equal("\u0069a", source.Replace("\u0130", "a", StringComparison.CurrentCulture));
                 Assert.Equal("aa", source.Replace("\u0130", "a", StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, src).Dispose();
 
-            RemoteInvoke((source) =>
+            RemoteExecutor.Invoke((source) =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
@@ -690,7 +691,7 @@ namespace System.Tests
                 Assert.Equal("\u0069a", source.Replace("\u0130", "a", StringComparison.CurrentCulture));
                 Assert.Equal("\u0069a", source.Replace("\u0130", "a", StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, src).Dispose();
         }
 
@@ -894,7 +895,7 @@ namespace System.Tests
         [Fact]
         public static void IndexOf_TurkishI_TurkishCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("tr-TR");
 
@@ -923,14 +924,14 @@ namespace System.Tests
                 Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.Ordinal));
                 Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_TurkishI_InvariantCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -945,14 +946,14 @@ namespace System.Tests
                 Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
                 Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_TurkishI_EnglishUSCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
 
@@ -967,14 +968,14 @@ namespace System.Tests
                 Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
                 Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_EquivalentDiacritics_EnglishUSCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Exhibit a\u0300\u00C0";
                 char value = '\u00C0';
@@ -986,14 +987,14 @@ namespace System.Tests
                 Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
                 Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_EquivalentDiacritics_InvariantCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Exhibit a\u0300\u00C0";
                 char value = '\u00C0';
@@ -1003,14 +1004,14 @@ namespace System.Tests
                 Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
                 Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_CyrillicE_EnglishUSCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Foo\u0400Bar";
                 char value = '\u0400';
@@ -1022,14 +1023,14 @@ namespace System.Tests
                 Assert.Equal(3, s.IndexOf(value, StringComparison.Ordinal));
                 Assert.Equal(3, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void IndexOf_CyrillicE_InvariantCulture_Char()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 string s = "Foo\u0400Bar";
                 char value = '\u0400';
@@ -1039,7 +1040,7 @@ namespace System.Tests
                 Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
                 Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 796363c..eee6b89 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Tests;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.Tests
 {
-    public partial class StringBuilderTests : RemoteExecutorTestBase
+    public partial class StringBuilderTests
     {
         private static readonly string s_chunkSplitSource = new string('a', 30);
         private static readonly string s_noCapacityParamName = PlatformDetection.IsFullFramework ? "requiredLength" : "valueCount";
@@ -258,7 +259,7 @@ namespace System.Text.Tests
         [Fact]
         public static void Test_Append_Decimal()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 
@@ -266,7 +267,7 @@ namespace System.Text.Tests
                 {
                     Append_Decimal((string)testdata[0], (double)testdata[1], (string)testdata[2]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -295,14 +296,14 @@ namespace System.Text.Tests
         [Fact]
         public static void Test_Append_Double()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
                 foreach (var testdata in Append_Double_TestData())
                 {
                     Append_Double((string)testdata[0], (double)testdata[1], (string)testdata[2]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -434,14 +435,14 @@ namespace System.Text.Tests
         [Fact]
         public static void Test_Append_Float()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
                 foreach (var testdata in Append_Float_TestData())
                 {
                     Append_Float((string)testdata[0], (float)testdata[1], (string)testdata[2]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -1261,14 +1262,14 @@ namespace System.Text.Tests
         [Fact]
         public static void Test_Insert_Float()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
                 foreach (var testdata in Insert_Float_TestData())
                 {
                     Insert_Float((string)testdata[0], (int)testdata[1], (float)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -1390,14 +1391,14 @@ namespace System.Text.Tests
         [Fact]
         public static void Test_Insert_Double()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
                 foreach (var testdata in Insert_Double_TestData())
                 {
                     Insert_Double((string)testdata[0], (int)testdata[1], (double)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -1429,14 +1430,14 @@ namespace System.Text.Tests
         [Fact]
         public static void Test_Insert_Decimal()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
                 foreach (var testdata in Test_Insert_Decimal_TestData())
                 {
                     Insert_Decimal((string)testdata[0], (int)testdata[1], (double)testdata[2], (string)testdata[3]);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index ddcc1ae..18092d4 100644 (file)
@@ -9,7 +9,7 @@ using Xunit;
 
 namespace System.Text.Tests
 {
-    public partial class StringBuilderTests : RemoteExecutorTestBase
+    public partial class StringBuilderTests
     {
         [Fact]
         public static void AppendJoin_NullValues_ThrowsArgumentNullException()
index 1783e18..bb3c4c7 100644 (file)
@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Reflection;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 public class Outside
@@ -286,8 +287,7 @@ namespace System.Tests
         }
     }
 
-    public class TypeTestsExtended : RemoteExecutorTestBase
-    {
+    public class TypeTestsExtended    {
         public class ContextBoundClass : ContextBoundObject
         {
             public string Value = "The Value property.";
@@ -307,7 +307,7 @@ namespace System.Tests
         public void GetTypeByName()
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
                {
                    string test1 = testtype;
                    Type t1 = Type.GetType(test1,
@@ -325,7 +325,7 @@ namespace System.Tests
                    Assert.NotNull(t2);
                    Assert.Equal(t1, t2);
 
-                   return SuccessExitCode;
+                   return RemoteExecutor.SuccessExitCode;
                }, options).Dispose();
         }
 
@@ -335,12 +335,12 @@ namespace System.Tests
         [InlineData("")]
         public void GetTypeByName_NoSuchType_ThrowsTypeLoadException(string typeName)
         {
-            RemoteInvoke(marshalledTypeName =>
+            RemoteExecutor.Invoke(marshalledTypeName =>
             {
                 Assert.Throws<TypeLoadException>(() => Type.GetType(marshalledTypeName, assemblyloader, typeloader, true));
                 Assert.Null(Type.GetType(marshalledTypeName, assemblyloader, typeloader, false));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, typeName).Dispose();
         }
 
@@ -349,7 +349,7 @@ namespace System.Tests
         public void GetTypeByNameCaseSensitiveTypeloadFailure()
         {
             RemoteInvokeOptions options = new RemoteInvokeOptions();
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
                {
                    //Type load failure due to case sensitive search of type Ptogram
                    string test3 = "System.Collections.Generic.Dictionary`2[[Program, TestLoadAssembly], [program, TestLoadAssembly]]";
@@ -371,7 +371,7 @@ namespace System.Tests
 
                    Assert.Null(t2);
 
-                   return SuccessExitCode;
+                   return RemoteExecutor.SuccessExitCode;
                }, options).Dispose();
         }
 
index 6b0580e..12db6d8 100644 (file)
@@ -8,6 +8,7 @@
     <DefineConstants Condition="'$(HaveCertificateCreation)'!='true'">$(DefineConstants);NO_EPHEMERALKEYSET_AVAILABLE</DefineConstants>
     <DefineConstants Condition="'$(TargetGroup)'=='netcoreapp' OR '$(TargetGroup)'=='uap'">$(DefineConstants);HAVE_THUMBPRINT_OVERLOADS</DefineConstants>
     <DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <SupplementalTestData Include="$(PackagesDir)system.security.cryptography.x509certificates.testdata\1.0.2-prerelease\content\**\*.*" />
   </ItemGroup>
 </Project>
index 968217c..fcfc581 100644 (file)
@@ -9,11 +9,12 @@
 using System.Diagnostics;
 using System.IO;
 using System.Runtime.InteropServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Security.Cryptography.X509Certificates.Tests
 {
-    public class X509StoreTests : RemoteExecutorTestBase
+    public class X509StoreTests : FileCleanupTestBase
     {
         [Fact]
         public static void OpenMyStore()
@@ -561,7 +562,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
             var psi = new ProcessStartInfo();
             psi.Environment.Add("SSL_CERT_DIR", sslCertDir);
             psi.Environment.Add("SSL_CERT_FILE", "/nonexisting");
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var store = new X509Store(StoreName.Root, StoreLocation.LocalMachine))
                 {
@@ -570,7 +571,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
                     // Check nr of certificates in store.
                     Assert.Equal(2, store.Certificates.Count);
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }, new RemoteInvokeOptions { StartInfo = psi }).Dispose();
         }
 
index 4fd1b7c..19a7236 100644 (file)
@@ -1,6 +1,7 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{6C36F3AC-54A1-4021-9F5D-CDEFF7347277}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
index b1028ad..e30f248 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.Tests
@@ -70,12 +71,12 @@ namespace System.Text.Tests
         public override int MaxCharCount => 2;
     }
 
-    public class EncoderFallbackBufferHelperTest : RemoteExecutorTestBase
+    public class EncoderFallbackBufferHelperTest
     {
         [Fact]
         public void Test_EncoderFallbackBufferHelper_ValidateFallbackForDataRoundTrips()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // Add the code page provider.
                 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
index ffbd957..05c0f71 100644 (file)
@@ -1,14 +1,11 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{835AD07B-7C9A-406F-B16F-59B3B0D017A4}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="EncoderFallbackBufferHelper.cs" />
     <Compile Include="EncodingCodePages.cs" />
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
index 2713ff6..f84a880 100644 (file)
@@ -4,11 +4,12 @@
 
 using System.Diagnostics;
 using System.Globalization;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.Tests
 {
-    public class EncodingGetEncodingTest : RemoteExecutorTestBase
+    public class EncodingGetEncodingTest
     {
         [Fact]
         public void GetEncoding_String_Invalid()
@@ -101,7 +102,7 @@ namespace System.Text.Tests
         public void GetEncoding_EncodingName()
         {
             // Workaround issue: UWP culture is process wide
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
 
index fc534d1..d8461ac 100644 (file)
@@ -2,8 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{3BB28F2F-51DF-49A3-A0BF-E1C5C0D7E3E0}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="ASCIIEncoding\ASCIIEncodingEncode.cs" />
     <Compile Include="Decoder\Decoder.cs" />
     <Compile Include="Encoder\Encoder.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index f8f786e..f124ad5 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Reflection;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.RegularExpressions.Tests
 {
-    public class RegexCacheTests : RemoteExecutorTestBase
+    public class RegexCacheTests
     {
         [Theory]
         [InlineData(0)]
@@ -40,13 +41,13 @@ namespace System.Text.RegularExpressions.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
         public void Ctor_Cache_Second_drops_first()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Regex.CacheSize = 1;
                 Assert.True(Regex.IsMatch("1", "1"));
                 Assert.True(Regex.IsMatch("2", "2")); // previous removed from cache
                 Assert.True(GetCachedItemsNum() == 1);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -54,7 +55,7 @@ namespace System.Text.RegularExpressions.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
         public void Ctor_Cache_Shrink_cache()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Regex.CacheSize = 2;
                 Assert.True(Regex.IsMatch("1", "1"));
@@ -64,7 +65,7 @@ namespace System.Text.RegularExpressions.Tests
                 Assert.True(GetCachedItemsNum() == 1);
                 Regex.CacheSize = 0; // clear
                 Assert.True(GetCachedItemsNum() == 0);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -72,7 +73,7 @@ namespace System.Text.RegularExpressions.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
         public void Ctor_Cache_Promote_entries()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Regex.CacheSize = 3;
                 Assert.True(Regex.IsMatch("1", "1"));
@@ -83,7 +84,7 @@ namespace System.Text.RegularExpressions.Tests
                 Assert.True(GetCachedItemsNum() == 3);
                 Regex.CacheSize = 1;  // only 1 stays
                 Assert.True(GetCachedItemsNum() == 1);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -91,7 +92,7 @@ namespace System.Text.RegularExpressions.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")]
         public void Ctor_Cache_Uses_culture_and_options()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Regex.CacheSize = 0;
                 Regex.CacheSize = 3;
@@ -102,7 +103,7 @@ namespace System.Text.RegularExpressions.Tests
                 CultureInfo.CurrentCulture = CultureInfo.CurrentCulture.Equals(CultureInfo.GetCultureInfo("de-DE")) ? CultureInfo.InvariantCulture : CultureInfo.GetCultureInfo("de-DE");
                 Assert.True(Regex.IsMatch("1", "1", RegexOptions.Multiline));
                 Assert.True(GetCachedItemsNum() == 3);
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -112,7 +113,7 @@ namespace System.Text.RegularExpressions.Tests
         public void Ctor_Cache_Uses_dictionary_linked_list_switch_does_not_throw()
         {
             // assume the limit is less than the cache size so we cross it two times:
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 int original = Regex.CacheSize;
                 Regex.CacheSize = 0;
@@ -140,7 +141,7 @@ namespace System.Text.RegularExpressions.Tests
                         Assert.True(GetCachedItemsNum() == Regex.CacheSize);
                     }
                 }
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 125cc47..ff7c0c4 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Threading;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.RegularExpressions.Tests
 {
-    public class RegexConstructorTests : RemoteExecutorTestBase
+    public class RegexConstructorTests
     {
         public static IEnumerable<object[]> Ctor_TestData()
         {
@@ -79,24 +80,24 @@ namespace System.Text.RegularExpressions.Tests
         [Fact]
         public static void StaticCtor_InvalidTimeoutObject_ExceptionThrown()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.SetData(RegexHelpers.DefaultMatchTimeout_ConfigKeyName, true);
                 Assert.Throws<TypeInitializationException>(() => Regex.InfiniteMatchTimeout);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public static void StaticCtor_InvalidTimeoutRange_ExceptionThrown()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.SetData(RegexHelpers.DefaultMatchTimeout_ConfigKeyName, TimeSpan.Zero);
                 Assert.Throws<TypeInitializationException>(() => Regex.InfiniteMatchTimeout);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
     }
index faab74c..2293f76 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.RegularExpressions.Tests
 {
-    public class RegexGroupTests : RemoteExecutorTestBase
+    public class RegexGroupTests
     {
         private static readonly CultureInfo s_enUSCulture = new CultureInfo("en-US");
         private static readonly CultureInfo s_invariantCulture = new CultureInfo("");
@@ -679,84 +680,84 @@ namespace System.Text.RegularExpressions.Tests
         [Fact]
         public void GroupsEnUS()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = s_enUSCulture;
                 foreach (object[] testCase in Groups_CustomCulture_TestData_enUS())
                 {
                     GroupsTest(testCase);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void GroupsCzech()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = s_czechCulture;
                 foreach (object[] testCase in Groups_CustomCulture_TestData_Czech())
                 {
                     GroupsTest(testCase);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void GroupsDanish()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = s_danishCulture;
                 foreach (object[] testCase in Groups_CustomCulture_TestData_Danish())
                 {
                     GroupsTest(testCase);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void GroupsTurkish()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = s_turkishCulture;
                 foreach (object[] testCase in Groups_CustomCulture_TestData_Turkish())
                 {
                     GroupsTest(testCase);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void GroupsAzeriLatin()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = s_azeriLatinCulture;
                 foreach (object[] testCase in Groups_CustomCulture_TestData_AzeriLatin())
                 {
                     GroupsTest(testCase);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void GroupsBasic()
         {
-            RemoteInvoke(() => {
+            RemoteExecutor.Invoke(() => {
                 CultureInfo.CurrentCulture = GetDefaultCultureForTests();
                 foreach (object[] testCase in Groups_Basic_TestData())
                 {
                     GroupsTest(testCase);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index c7c6f5e..93c28e4 100644 (file)
@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Text.RegularExpressions.Tests
 {
-    public class RegexMatchTests : RemoteExecutorTestBase
+    public class RegexMatchTests
     {
         public static IEnumerable<object[]> Match_Basic_TestData()
         {
@@ -368,7 +369,7 @@ namespace System.Text.RegularExpressions.Tests
         [Fact]
         public void Match_Timeout_Throws()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 const string Pattern = @"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$";
                 string input = new string('a', 50) + "@a.a";
@@ -376,7 +377,7 @@ namespace System.Text.RegularExpressions.Tests
                 AppDomain.CurrentDomain.SetData(RegexHelpers.DefaultMatchTimeout_ConfigKeyName, TimeSpan.FromMilliseconds(100));
                 Assert.Throws<RegexMatchTimeoutException>(() => new Regex(Pattern).Match(input));
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -763,20 +764,20 @@ namespace System.Text.RegularExpressions.Tests
         [Fact]
         public void Match_SpecialUnicodeCharacters_enUS()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = new CultureInfo("en-US");
                 Match("\u0131", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
                 Match("\u0131", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
         [Fact]
         public void Match_SpecialUnicodeCharacters_Invariant()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
                 Match("\u0131", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
@@ -784,7 +785,7 @@ namespace System.Text.RegularExpressions.Tests
                 Match("\u0130", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
                 Match("\u0130", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
@@ -792,7 +793,7 @@ namespace System.Text.RegularExpressions.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework needs fix for #26484")]
         public void Match_ExcessPrefix()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 // Should not throw out of memory
                 Assert.False(Regex.IsMatch("a", @"a{2147483647,}"));
index 9ff0448..8e3d1a2 100644 (file)
@@ -1,13 +1,10 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{94B106C2-D574-4392-80AB-3EE308A078DF}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
   <PropertyGroup>
-    <!-- Temporary property to diagnose hanging test
-    <XunitShowProgress>true</XunitShowProgress>
-    <XunitMaxThreads>1</XunitMaxThreads>
-    -->
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="CaptureCollectionTests.cs" />
@@ -30,9 +27,6 @@
     <Compile Include="..\src\System\Text\RegularExpressions\RegexParseError.cs">
       <Link>System\Text\RegularExpressions\RegexParseError.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
     <Compile Include="GroupCollectionReadOnlyDictionaryTests.cs" />
index 9ccbc0b..31343c4 100644 (file)
@@ -4,16 +4,17 @@
 
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tasks.Dataflow.Tests
 {
-    public class EtwTests : RemoteExecutorTestBase
+    public class EtwTests
     {
         [Fact]
         public void TestEtw()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener(new Guid("16F53577-E41D-43D4-B47E-C17025BF4025"), EventLevel.Verbose))
                 {
@@ -88,7 +89,7 @@ namespace System.Threading.Tasks.Dataflow.Tests
                         });
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index b5742f4..4c5f28d 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{72E21903-0FBA-444E-9855-3B4F05DFC1F9}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
       <Link>Common\System\Diagnostics\DebuggerAttributes.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 6776903..789cf6f 100644 (file)
@@ -6,17 +6,17 @@ using System.Collections.Concurrent;
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
 using System.Linq;
-
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tasks.Tests
 {
-    public class EtwTests : RemoteExecutorTestBase
+    public class EtwTests
     {
         [Fact]
         public static void TestEtw()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 var eventSourceName = PlatformDetection.IsFullFramework ? "System.Threading.Tasks.TplEventSource" : "System.Threading.Tasks.Parallel.EventSource";
                 using (var listener = new TestEventListener(eventSourceName, EventLevel.Verbose))
index 09494ec..4aa3d9e 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{DE29C320-2ECA-43FD-9F41-6F4F6C6BACD5}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <PropertyGroup>
@@ -28,9 +29,5 @@
     <Compile Include="$(CommonTestPath)\System\Threading\ThreadPoolHelpers.cs">
       <Link>CommonTest\System\Threading\ThreadPoolHelpers.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
 </Project>
index eb5a0c2..50f9123 100644 (file)
@@ -7,17 +7,18 @@ using System.Diagnostics.Tracing;
 using System.Collections.Concurrent;
 using System.Linq;
 using System.Runtime.CompilerServices;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tasks.Tests
 {
-    public partial class AsyncTaskMethodBuilderTests : RemoteExecutorTestBase
+    public partial class AsyncTaskMethodBuilderTests
     {
         [OuterLoop]
         [Fact]
         public static void DroppedIncompleteStateMachine_RaisesIncompleteAsyncMethodEvent()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("System.Threading.Tasks.TplEventSource", EventLevel.Verbose))
                 {
@@ -45,7 +46,7 @@ namespace System.Threading.Tasks.Tests
                     Assert.Contains("stored data", description);
                 }
 
-                return SuccessExitCode;
+                return RemoteExecutor.SuccessExitCode;
             }).Dispose();
         }
 
index 9346139..1369d8c 100644 (file)
@@ -1,8 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{B6C09633-D161-499A-8FE1-46B2D53A16E7}</ProjectGuid>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="Helpers.cs" />
       <Link>Common\System\Diagnostics\Tracing\TestEventListener.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 82cd7b2..1b617e4 100644 (file)
@@ -2,8 +2,9 @@
   <PropertyGroup>
     <ProjectGuid>{33F5A50E-B823-4FDD-8571-365C909ACEAE}</ProjectGuid>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="CompressedStackTests.cs" />
     <Compile Include="$(CommonTestPath)\System\Threading\ThreadTestHelpers.cs">
       <Link>CommonTest\System\Threading\ThreadPoolHelpers.cs</Link>
     </Compile>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
     <ProjectReference Include="STAMain\STAMain.csproj">
       <Name>STAMain</Name>
     </ProjectReference>
index 8aecbee..9e6f056 100644 (file)
@@ -12,13 +12,14 @@ using System.Security.Claims;
 using System.Security.Principal;
 using System.Threading.Tasks;
 using System.Threading.Tests;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Threads.Tests
 {
-    public class DummyClass : RemoteExecutorTestBase
+    public class DummyClass
     {
-        public static string HostRunnerTest = HostRunner;
+        public static string HostRunnerTest = RemoteExecutor.HostRunner;
     }
 
     public static partial class ThreadTests
@@ -194,7 +195,7 @@ namespace System.Threading.Threads.Tests
         [PlatformSpecific(TestPlatforms.Windows)]
         public static void ApartmentState_NoAttributePresent_DefaultState_Windows()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(ApartmentState.MTA, Thread.CurrentThread.GetApartmentState());
                 Assert.Throws<InvalidOperationException>(() => Thread.CurrentThread.SetApartmentState(ApartmentState.STA));
@@ -208,7 +209,7 @@ namespace System.Threading.Threads.Tests
         [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)]
         public static void ApartmentState_NoAttributePresent_STA_Windows_Desktop()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Throws<InvalidOperationException>(() => Thread.CurrentThread.SetApartmentState(ApartmentState.STA));
                 Thread.CurrentThread.SetApartmentState(ApartmentState.MTA);
@@ -220,7 +221,7 @@ namespace System.Threading.Threads.Tests
         [PlatformSpecific(TestPlatforms.AnyUnix)] 
         public static void ApartmentState_NoAttributePresent_DefaultState_Unix()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(ApartmentState.Unknown, Thread.CurrentThread.GetApartmentState());
                 Assert.Throws<PlatformNotSupportedException>(() => Thread.CurrentThread.SetApartmentState(ApartmentState.MTA));
@@ -231,7 +232,7 @@ namespace System.Threading.Threads.Tests
         [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWindowsNanoServer))]
         public static void ApartmentState_NoAttributePresent_DefaultState_Nano()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Throws<InvalidOperationException>(() => Thread.CurrentThread.SetApartmentState(ApartmentState.STA));
                 Assert.Equal(ApartmentState.MTA, Thread.CurrentThread.GetApartmentState());                
@@ -242,7 +243,7 @@ namespace System.Threading.Threads.Tests
         [PlatformSpecific(TestPlatforms.AnyUnix)] 
         public static void ApartmentState_NoAttributePresent_STA_Unix()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Throws<PlatformNotSupportedException>(() => Thread.CurrentThread.SetApartmentState(ApartmentState.STA));
             }).Dispose();
@@ -506,7 +507,7 @@ namespace System.Threading.Threads.Tests
         {
             // We run test on remote process because we need to set same principal policy
             // On netfx default principal policy is PrincipalPolicy.UnauthenticatedPrincipal
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.NoPrincipal);
 
@@ -1141,7 +1142,7 @@ namespace System.Threading.Threads.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SetPrincipal doesn't work on UAP.")]
         public static void WindowsPrincipalPolicyTest_Windows()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
                 Assert.Equal(Environment.UserDomainName + @"\" + Environment.UserName, Thread.CurrentPrincipal.Identity.Name);
@@ -1152,7 +1153,7 @@ namespace System.Threading.Threads.Tests
         [PlatformSpecific(TestPlatforms.AnyUnix)]
         public static void WindowsPrincipalPolicyTest_Unix()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
                 Assert.Throws<PlatformNotSupportedException>(() => Thread.CurrentPrincipal);
@@ -1162,7 +1163,7 @@ namespace System.Threading.Threads.Tests
         [Fact]
         public static void UnauthenticatedPrincipalTest()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal);
                 Assert.Equal(string.Empty, Thread.CurrentPrincipal.Identity.Name);
@@ -1173,7 +1174,7 @@ namespace System.Threading.Threads.Tests
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Default principal policy on .NET Framework is Unauthenticated Principal")]
         public static void DefaultPrincipalPolicyTest()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Null(Thread.CurrentPrincipal);
             }).Dispose();
@@ -1183,7 +1184,7 @@ namespace System.Threading.Threads.Tests
         [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Default principal policy on .NET Core is No Principal")]
         public static void DefaultPrincipalPolicyTest_Desktop()
         {
-            DummyClass.RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 Assert.Equal(string.Empty, Thread.CurrentPrincipal.Identity.Name);
             }).Dispose();
index 4bac4e1..fe7245c 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{403AD1B8-6F95-4A2E-92A2-727606ABD866}</ProjectGuid>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
   </PropertyGroup>
index 644a799..f542961 100644 (file)
@@ -4,16 +4,17 @@
 
 using System.Diagnostics;
 using System.Diagnostics.Tracing;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tests
 {
-    public class EtwTests : RemoteExecutorTestBase
+    public class EtwTests
     {
         [Fact]
         public void TestEtw()
         {
-            RemoteInvoke(() =>
+            RemoteExecutor.Invoke(() =>
             {
                 using (var listener = new TestEventListener("System.Threading.SynchronizationEventSource", EventLevel.Verbose))
                 {
index ab80812..60869c7 100644 (file)
@@ -3,11 +3,12 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tests
 {
-    public class EventWaitHandleTests : RemoteExecutorTestBase
+    public class EventWaitHandleTests
     {
         [Theory]
         [InlineData(false, EventResetMode.AutoReset)]
@@ -195,12 +196,12 @@ namespace System.Threading.Tests
             // Create the two events and the other process with which to synchronize
             using (var inbound = new EventWaitHandle(true, mode, inboundName))
             using (var outbound = new EventWaitHandle(false, mode, outboundName))
-            using (var remote = RemoteInvoke(PingPong_OtherProcess, mode.ToString(), outboundName, inboundName))
+            using (var remote = RemoteExecutor.Invoke(PingPong_OtherProcess, mode.ToString(), outboundName, inboundName))
             {
                 // Repeatedly wait for one event and then set the other
                 for (int i = 0; i < 10; i++)
                 {
-                    Assert.True(inbound.WaitOne(FailWaitTimeoutMilliseconds));
+                    Assert.True(inbound.WaitOne(RemoteExecutor.FailWaitTimeoutMilliseconds));
                     if (mode == EventResetMode.ManualReset)
                     {
                         inbound.Reset();
@@ -221,7 +222,7 @@ namespace System.Threading.Tests
                 // Repeatedly wait for one event and then set the other
                 for (int i = 0; i < 10; i++)
                 {
-                    Assert.True(inbound.WaitOne(FailWaitTimeoutMilliseconds));
+                    Assert.True(inbound.WaitOne(RemoteExecutor.FailWaitTimeoutMilliseconds));
                     if (mode == EventResetMode.ManualReset)
                     {
                         inbound.Reset();
@@ -230,7 +231,7 @@ namespace System.Threading.Tests
                 }
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
 
         public static TheoryData<string> GetValidNames()
index 7ab65db..22bb79a 100644 (file)
@@ -7,11 +7,12 @@ using System.Diagnostics;
 using System.IO;
 using System.Runtime.InteropServices;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tests
 {
-    public class MutexTests : RemoteExecutorTestBase
+    public class MutexTests : FileCleanupTestBase
     {
         [Fact]
         public void Ctor_ConstructWaitRelease()
@@ -246,11 +247,11 @@ namespace System.Threading.Tests
 
                         IncrementValueInFileNTimes(mutex, f, 10);
                     }
-                    return SuccessExitCode;
+                    return RemoteExecutor.SuccessExitCode;
                 };
 
                 using (var mutex = new Mutex(false, mutexName))
-                using (var remote = RemoteInvoke(otherProcess, mutexName, fileName))
+                using (var remote = RemoteExecutor.Invoke(otherProcess, mutexName, fileName))
                 {
                     SpinWait.SpinUntil(() => File.Exists(fileName), ThreadTestHelpers.UnexpectedTimeoutMilliseconds);
 
index d1fda5f..27774e2 100644 (file)
@@ -5,11 +5,12 @@
 using System;
 using System.Diagnostics;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 
 namespace System.Threading.Tests
 {
-    public class SemaphoreTests : RemoteExecutorTestBase
+    public class SemaphoreTests
     {
         private const int FailedWaitTimeout = 30000;
 
@@ -287,12 +288,12 @@ namespace System.Threading.Tests
             // Create the two semaphores and the other process with which to synchronize
             using (var inbound = new Semaphore(1, 1, inboundName))
             using (var outbound = new Semaphore(0, 1, outboundName))
-            using (var remote = RemoteInvoke(new Func<string, string, int>(PingPong_OtherProcess), outboundName, inboundName))
+            using (var remote = RemoteExecutor.Invoke(new Func<string, string, int>(PingPong_OtherProcess), outboundName, inboundName))
             {
                 // Repeatedly wait for count in one semaphore and then release count into the other
                 for (int i = 0; i < 10; i++)
                 {
-                    Assert.True(inbound.WaitOne(FailWaitTimeoutMilliseconds));
+                    Assert.True(inbound.WaitOne(RemoteExecutor.FailWaitTimeoutMilliseconds));
                     outbound.Release();
                 }
             }
@@ -307,12 +308,12 @@ namespace System.Threading.Tests
                 // Repeatedly wait for count in one semaphore and then release count into the other
                 for (int i = 0; i < 10; i++)
                 {
-                    Assert.True(inbound.WaitOne(FailWaitTimeoutMilliseconds));
+                    Assert.True(inbound.WaitOne(RemoteExecutor.FailWaitTimeoutMilliseconds));
                     outbound.Release();
                 }
             }
 
-            return SuccessExitCode;
+            return RemoteExecutor.SuccessExitCode;
         }
 
         public static TheoryData<string> GetValidNames()
index 6db12d4..5054c23 100644 (file)
@@ -1,8 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{18EF66B3-51EE-46D8-B283-1CB6A1197813}</ProjectGuid>
-    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
     <TestRuntime>true</TestRuntime>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="AsyncLocalTests.cs" />
       <Link>CommonTest\System\Threading\ThreadTestHelpers.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
-  </ItemGroup>
 </Project>
\ No newline at end of file
index 497c298..5f46dd3 100644 (file)
@@ -9,12 +9,13 @@ using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
 using Xunit;
 using Xunit.Abstractions;
 
 namespace System.Transactions.Tests
 {
-    public class AsyncTransactionScopeTests : RemoteExecutorTestBase
+    public class AsyncTransactionScopeTests
     {
         // Number of threads to create
         private const int iterations = 5;
@@ -31,10 +32,9 @@ namespace System.Transactions.Tests
             Transaction.Current = null;
         }
 
-        protected override void Dispose(bool disposing)
+        protected void Dispose(bool disposing)
         {
             Transaction.Current = null;
-            base.Dispose(disposing);
         }
 
         /// <summary>
@@ -99,7 +99,7 @@ namespace System.Transactions.Tests
         [ActiveIssue(31913, TargetFrameworkMonikers.Uap)]
         public void AsyncTSTest(int variation)
         {
-            RemoteInvoke(variationString =>
+            RemoteExecutor.Invoke(variationString =>
             {
                 using (var listener = new TestEventListener(new Guid("8ac2d80a-1f1a-431b-ace4-bff8824aef0b"), System.Diagnostics.Tracing.EventLevel.Verbose))
                 {
index 3f90e01..066f5ac 100644 (file)
@@ -1,8 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <ProjectGuid>{1C397868-9644-48CB-94BF-35805C4AE024}</ProjectGuid>
-    <Configurations>netstandard-Debug;netstandard-Release</Configurations>
     <CoverageSupported>false</CoverageSupported>
+    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+    <Configurations>netstandard-Debug;netstandard-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="NonMsdtcPromoterTests.cs" />
     <Compile Include="HelperFunctions.cs" />
     <Compile Include="TestEnlistments.cs" />
     <Compile Include="TransactionTracingEventListener.cs" />
-    <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj">
-      <Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
-      <Name>RemoteExecutorConsoleApp</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />