From: Viktor Date: Fri, 29 Mar 2019 17:15:10 +0000 (+0100) Subject: Update src folder X-Git-Tag: submit/tizen/20210909.063632~11031^2~1986 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e4b5f9b0138b67a8595df60de9270806cf784f5;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Update src folder Commit migrated from https://github.com/dotnet/corefx/commit/817c36a05ef2d92e59ce6f5a37e2be50076361b3 --- diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj index 83b8b06..3a69e0c 100644 --- a/src/libraries/Common/tests/Common.Tests.csproj +++ b/src/libraries/Common/tests/Common.Tests.csproj @@ -2,8 +2,9 @@ {C72FD34C-539A-4447-9796-62A229571199} true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release false + true + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release @@ -145,10 +146,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - 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 index df6c7b2..0000000 --- a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/AssemblyAttributes.cs +++ /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 index 581054d..0000000 --- a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/Configurations.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - netstandard; - - - \ 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 index c4919af..0000000 --- a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs +++ /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 -{ - /// - /// Provides an entry point in a new process that will load a specified method and invoke it. - /// - 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(); - - // 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 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(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 index a5d0e21..0000000 --- a/src/libraries/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - {8DE22889-A6CB-41EC-B807-D44A2C184719} - Exe - - .exe - RemoteExecutorConsoleApp - RemoteExecutorConsoleApp - true - false - netstandard-Debug;netstandard-Release - - - - - - - - Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAssemblyAttribute.cs - - - \ No newline at end of file diff --git a/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs b/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs index 26e9fba..d573575 100644 --- a/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs +++ b/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs @@ -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) { diff --git a/src/libraries/Common/tests/Tests/System/StringTests.cs b/src/libraries/Common/tests/Tests/System/StringTests.cs index 63698a6..2e23f79 100644 --- a/src/libraries/Common/tests/Tests/System/StringTests.cs +++ b/src/libraries/Common/tests/Tests/System/StringTests.cs @@ -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 = ""; - 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(); } diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj b/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj index 5c5b091..dbb78ee 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj @@ -1,6 +1,7 @@ {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8} + true netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -34,12 +35,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/StringsTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/StringsTests.cs index ede77c8..747c9a8 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/StringsTests.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/StringsTests.cs @@ -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 diff --git a/src/libraries/System.Buffers/tests/ArrayPool/ArrayPoolTest.cs b/src/libraries/System.Buffers/tests/ArrayPool/ArrayPoolTest.cs index 8f2bd45..c9ec3e1 100644 --- a/src/libraries/System.Buffers/tests/ArrayPool/ArrayPoolTest.cs +++ b/src/libraries/System.Buffers/tests/ArrayPool/ArrayPoolTest.cs @@ -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 method, bool trim = false, int timeout = FailWaitTimeoutMilliseconds) + protected static void RemoteInvokeWithTrimming(Func 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(); } } } diff --git a/src/libraries/System.Buffers/tests/ArrayPool/CollectionTests.cs b/src/libraries/System.Buffers/tests/ArrayPool/CollectionTests.cs index 6cb4fa4..2427dc7 100644 --- a/src/libraries/System.Buffers/tests/ArrayPool/CollectionTests.cs +++ b/src/libraries/System.Buffers/tests/ArrayPool/CollectionTests.cs @@ -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); } } diff --git a/src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj b/src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj index 032b92a..a5c019c 100644 --- a/src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj +++ b/src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj @@ -2,8 +2,9 @@ {62E2AD5F-C8D0-45FB-B6A5-AED2C77F198C} true - netstandard-Debug;netstandard-Release true + true + netstandard-Debug;netstandard-Release @@ -11,11 +12,4 @@ - - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.CodeDom/tests/System.CodeDom.Tests.csproj b/src/libraries/System.CodeDom/tests/System.CodeDom.Tests.csproj index 6fe3a50..20459e2 100644 --- a/src/libraries/System.CodeDom/tests/System.CodeDom.Tests.csproj +++ b/src/libraries/System.CodeDom/tests/System.CodeDom.Tests.csproj @@ -1,6 +1,7 @@  {0D1E2954-A5C7-4B8C-932A-31EB4A96A726} + true netstandard-Debug;netstandard-Release @@ -111,15 +112,5 @@ Common\System\IO\TempFile.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - \ No newline at end of file diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs index 5ce6188..2c84bf5 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CSharpCodeGenerationTests.cs @@ -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; diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGenerationTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGenerationTests.cs index 0a7a9fa..a0cd304 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGenerationTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGenerationTests.cs @@ -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() diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGeneratorTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGeneratorTests.cs index b9baabf..d80ab31 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGeneratorTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/CodeGeneratorTests.cs @@ -11,7 +11,7 @@ using Xunit; namespace System.CodeDom.Compiler.Tests { - public class CodeGeneratorTests : RemoteExecutorTestBase + public class CodeGeneratorTests { public class Generator : CodeGenerator { diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/ExecutorTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/ExecutorTests.cs index c46fa5a..8fdafcd 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/ExecutorTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/ExecutorTests.cs @@ -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)) { diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs index b2ec2ab..30c515e 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/VBCodeGenerationTests.cs @@ -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; diff --git a/src/libraries/System.Collections.Concurrent/tests/EtwTests.cs b/src/libraries/System.Collections.Concurrent/tests/EtwTests.cs index 4c669c3..2b09763 100644 --- a/src/libraries/System.Collections.Concurrent/tests/EtwTests.cs +++ b/src/libraries/System.Collections.Concurrent/tests/EtwTests.cs @@ -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)) { diff --git a/src/libraries/System.Collections.Concurrent/tests/System.Collections.Concurrent.Tests.csproj b/src/libraries/System.Collections.Concurrent/tests/System.Collections.Concurrent.Tests.csproj index 73a4226..017692f 100644 --- a/src/libraries/System.Collections.Concurrent/tests/System.Collections.Concurrent.Tests.csproj +++ b/src/libraries/System.Collections.Concurrent/tests/System.Collections.Concurrent.Tests.csproj @@ -1,8 +1,9 @@ {9574CEEC-5554-411B-B44C-6CA9EC1CEB08} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -105,9 +106,5 @@ Common\System\Collections\IEnumerable.Generic.Serialization.Tests.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - \ No newline at end of file diff --git a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs index 4728a33..578c1fc 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs @@ -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 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(); } diff --git a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs index e9a28fd..9e58035 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs @@ -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(); } } diff --git a/src/libraries/System.Collections.NonGeneric/tests/ComparerTests.cs b/src/libraries/System.Collections.NonGeneric/tests/ComparerTests.cs index 8d59c47..070289d 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/ComparerTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/ComparerTests.cs @@ -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(); } diff --git a/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs b/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs index 847022d..9d164ae 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/HashtableTests.cs @@ -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(); } diff --git a/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs b/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs index 164fd19..b5c725b 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/SortedListTests.cs @@ -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(); } diff --git a/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj b/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj index cb576bf..5c57658 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj +++ b/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj @@ -1,6 +1,7 @@ {EE95AE39-845A-42D3-86D0-8065DBE56612} + true netstandard-Debug;netstandard-Release @@ -50,10 +51,4 @@ Common\System\Collections\IEnumerable.NonGeneric.Serialization.Tests.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj b/src/libraries/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj index 19df07f..6114fdb 100644 --- a/src/libraries/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj +++ b/src/libraries/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj @@ -1,6 +1,7 @@ {6E48765E-D6AC-4A79-9C2E-B5EE67EEDECF} + true netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -42,10 +43,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs index 8900349..76493af 100644 --- a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs +++ b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/RangeAttributeTests.cs @@ -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"); diff --git a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs index d0717a0..1944164 100644 --- a/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs +++ b/src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/ValidationAttributeTestBase.cs @@ -9,7 +9,7 @@ using Xunit; namespace System.ComponentModel.DataAnnotations.Tests { - public abstract class ValidationAttributeTestBase : RemoteExecutorTestBase + public abstract class ValidationAttributeTestBase { protected abstract IEnumerable ValidValues(); protected abstract IEnumerable InvalidValues(); diff --git a/src/libraries/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj b/src/libraries/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj index b8aa7e4..0092ef9 100644 --- a/src/libraries/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj +++ b/src/libraries/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj @@ -2,6 +2,7 @@ {59F4682D-C41D-45A7-9798-16C75525BB1D} + true netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -183,9 +184,5 @@ content PreserveNewest - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs index 2f844ee..08ba948 100644 --- a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs +++ b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs @@ -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 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(); } diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationFinalizerTests.cs b/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationFinalizerTests.cs index 1a7b979..c4152b7 100644 --- a/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationFinalizerTests.cs +++ b/src/libraries/System.ComponentModel.EventBasedAsync/tests/AsyncOperationFinalizerTests.cs @@ -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(); } diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj b/src/libraries/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj index 0b5d23b0..9dcb29d 100644 --- a/src/libraries/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj +++ b/src/libraries/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj @@ -4,6 +4,7 @@ adding this xunit so it runs in one AppDomain --> true {59E9B218-81D0-4A80-A4B7-66C716136D82} + true netstandard-Debug;netstandard-Release @@ -17,10 +18,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs index 19e9879..a1cc384 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs @@ -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; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs index 535464e..b3d6780 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs @@ -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; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/ConverterTestBase.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/ConverterTestBase.cs index d29f064..a41a582 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/ConverterTestBase.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/ConverterTestBase.cs @@ -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) { diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs index 64e6708..1c61e2a 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs @@ -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; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeConverterTests.cs index 462dde8..b7a6318 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeConverterTests.cs @@ -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(); } } diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeOffsetConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeOffsetConverterTests.cs index 3bea6a9..ee4136f 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeOffsetConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/DateTimeOffsetConverterTests.cs @@ -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(); } } diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs index 3f29e37..38f3175 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs @@ -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; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/MultilineStringConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/MultilineStringConverterTests.cs index a357b88..1738d28 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/MultilineStringConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/MultilineStringConverterTests.cs @@ -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; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/ReferenceConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/ReferenceConverterTests.cs index c74ed16..86d1668 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/ReferenceConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/ReferenceConverterTests.cs @@ -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; diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj b/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj index 12f2e9e..2341294 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj @@ -2,9 +2,8 @@ {3F0326A1-9E19-4A6C-95CE-63E65C9D2030} $(DefineConstants);FUNCTIONAL_TESTS - {2E36F1D4-B23C-435D-AB41-18E608940038} - - + true + 9.9.9.9 netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release @@ -151,13 +150,7 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - - + %(RecursiveDir)%(Filename)%(Extension) diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs index f1e4664..39ff28f 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs @@ -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 ConvertToTestData() => Enumerable.Empty(); @@ -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(() => 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(); } }); diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTests.cs index e328003..dcc48ae 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeConverterTests.cs @@ -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(); } diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeListConverterTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeListConverterTests.cs index 4940f7c..1da23a6 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeListConverterTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeListConverterTests.cs @@ -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; diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj b/src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj index 2087438..56b455d 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj @@ -3,6 +3,7 @@ {7669C397-C21C-4C08-83F1-BE6691911E88} true + true netstandard-Debug;netstandard-Release @@ -111,10 +112,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs index 89fe0e0..acbf450 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs @@ -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; diff --git a/src/libraries/System.Console/tests/CancelKeyPress.Unix.cs b/src/libraries/System.Console/tests/CancelKeyPress.Unix.cs index fa0fb79..e4aaa4f 100644 --- a/src/libraries/System.Console/tests/CancelKeyPress.Unix.cs +++ b/src/libraries/System.Console/tests/CancelKeyPress.Unix.cs @@ -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(); @@ -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(); @@ -93,7 +94,7 @@ public partial class CancelKeyPressTests : RemoteExecutorTestBase Console.CancelKeyPress -= handler; } - return SuccessExitCode; + return RemoteExecutor.SuccessExitCode; }, signalOuter.ToString()).Dispose(); } diff --git a/src/libraries/System.Console/tests/CancelKeyPress.cs b/src/libraries/System.Console/tests/CancelKeyPress.cs index a4197bf..a9178ba 100644 --- a/src/libraries/System.Console/tests/CancelKeyPress.cs +++ b/src/libraries/System.Console/tests/CancelKeyPress.cs @@ -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(); } } diff --git a/src/libraries/System.Console/tests/ConsoleEncoding.Windows.cs b/src/libraries/System.Console/tests/ConsoleEncoding.Windows.cs index 002cc95..041a2ed 100644 --- a/src/libraries/System.Console/tests/ConsoleEncoding.Windows.cs +++ b/src/libraries/System.Console/tests/ConsoleEncoding.Windows.cs @@ -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(); } diff --git a/src/libraries/System.Console/tests/ConsoleEncoding.cs b/src/libraries/System.Console/tests/ConsoleEncoding.cs index 99fa225..b4bacd9 100644 --- a/src/libraries/System.Console/tests/ConsoleEncoding.cs +++ b/src/libraries/System.Console/tests/ConsoleEncoding.cs @@ -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 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(); } diff --git a/src/libraries/System.Console/tests/NonStandardConfiguration.Unix.cs b/src/libraries/System.Console/tests/NonStandardConfiguration.Unix.cs index 03c681b..a705756 100644 --- a/src/libraries/System.Console/tests/NonStandardConfiguration.Unix.cs +++ b/src/libraries/System.Console/tests/NonStandardConfiguration.Unix.cs @@ -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) diff --git a/src/libraries/System.Console/tests/ReadKey.cs b/src/libraries/System.Console/tests/ReadKey.cs index bc3d7d5..3e1445a 100644 --- a/src/libraries/System.Console/tests/ReadKey.cs +++ b/src/libraries/System.Console/tests/ReadKey.cs @@ -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(); } } diff --git a/src/libraries/System.Console/tests/RedirectedStream.cs b/src/libraries/System.Console/tests/RedirectedStream.cs index c48d19d..31db009 100644 --- a/src/libraries/System.Console/tests/RedirectedStream.cs +++ b/src/libraries/System.Console/tests/RedirectedStream.cs @@ -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(); } } diff --git a/src/libraries/System.Console/tests/System.Console.Tests.csproj b/src/libraries/System.Console/tests/System.Console.Tests.csproj index c1e1811..a661cac 100644 --- a/src/libraries/System.Console/tests/System.Console.Tests.csproj +++ b/src/libraries/System.Console/tests/System.Console.Tests.csproj @@ -2,6 +2,7 @@ {3ED7BCF1-34B9-49B7-9C25-0BC3304C0858} true + true netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release @@ -50,12 +51,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - \ No newline at end of file diff --git a/src/libraries/System.Console/tests/WindowAndCursorProps.cs b/src/libraries/System.Console/tests/WindowAndCursorProps.cs index e6e81e7..c467893 100644 --- a/src/libraries/System.Console/tests/WindowAndCursorProps.cs +++ b/src/libraries/System.Console/tests/WindowAndCursorProps.cs @@ -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(); } diff --git a/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj b/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj index d286aa1..0b42549 100644 --- a/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj +++ b/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj @@ -2,6 +2,7 @@ {B473F77D-4168-4123-932A-E88020B768FA} 0168,0169,0414,0219,0649 + true netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -120,12 +121,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - \ No newline at end of file diff --git a/src/libraries/System.Data.Common/tests/System/Data/DataCommonEventSourceTest.cs b/src/libraries/System.Data.Common/tests/System/Data/DataCommonEventSourceTest.cs index 9c2eddb..a546417 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/DataCommonEventSourceTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/DataCommonEventSourceTest.cs @@ -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)) { diff --git a/src/libraries/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs b/src/libraries/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs index 3f169b6..5cf6022 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs @@ -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 = @" @@ -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(); } diff --git a/src/libraries/System.Data.Common/tests/System/Data/DataSetTest.cs b/src/libraries/System.Data.Common/tests/System/Data/DataSetTest.cs index 70fa58f..a2b5255 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/DataSetTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/DataSetTest.cs @@ -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("", 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(); } diff --git a/src/libraries/System.Data.Common/tests/System/Data/DataSetTest2.cs b/src/libraries/System.Data.Common/tests/System/Data/DataSetTest2.cs index 1dce32f..651aab3 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/DataSetTest2.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/DataSetTest2.cs @@ -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(); } diff --git a/src/libraries/System.Data.Common/tests/System/Data/DataTableReadXmlSchemaTest.cs b/src/libraries/System.Data.Common/tests/System/Data/DataTableReadXmlSchemaTest.cs index 2669ee9..2d1f800 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/DataTableReadXmlSchemaTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/DataTableReadXmlSchemaTest.cs @@ -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(); diff --git a/src/libraries/System.Data.Common/tests/System/Data/DataTableTest.cs b/src/libraries/System.Data.Common/tests/System/Data/DataTableTest.cs index dfe43c6..2aa4d13 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/DataTableTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/DataTableTest.cs @@ -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(() => 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("", 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(); } diff --git a/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlStringTest.cs b/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlStringTest.cs index 7be8cf7..9a3db1d 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlStringTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlStringTest.cs @@ -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(); } diff --git a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs index 361836c..ae68d28 100644 --- a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs +++ b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs @@ -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(); } diff --git a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj index 49d59c3..27f7640 100644 --- a/src/libraries/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj +++ b/src/libraries/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj @@ -1,6 +1,7 @@ {F3E72F35-0351-4D67-9388-725BCAD807BA} + true netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release @@ -44,9 +45,5 @@ TDS - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs index 80d3fa2..f9d1eb1 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs @@ -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")) diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs index 83349b2..8de2481 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs @@ -17,7 +17,7 @@ namespace System.Diagnostics.Tests { using Configuration = System.Net.Test.Common.Configuration; - public class HttpHandlerDiagnosticListenerTests : RemoteExecutorTestBase + public class HttpHandlerDiagnosticListenerTests { /// /// A simple test to make sure the Http Diagnostic Source is added into the list of DiagnosticListeners. diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj index 4c2e347..132284da 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj @@ -1,6 +1,7 @@ {A7922FA3-306A-41B9-B8DC-CC4DBE685A85} + true 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 @@ -22,10 +23,4 @@ Common\System\Net\Configuration.Http.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceDataTests.cs b/src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceDataTests.cs index 9d8e821..c4a6d5c 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceDataTests.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceDataTests.cs @@ -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 + public class PerformanceDataTests : IClassFixture { 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)) diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/tests/System.Diagnostics.PerformanceCounter.Tests.csproj b/src/libraries/System.Diagnostics.PerformanceCounter/tests/System.Diagnostics.PerformanceCounter.Tests.csproj index 2662250..b301abd 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/tests/System.Diagnostics.PerformanceCounter.Tests.csproj +++ b/src/libraries/System.Diagnostics.PerformanceCounter/tests/System.Diagnostics.PerformanceCounter.Tests.csproj @@ -1,8 +1,9 @@  {296074B7-1CC9-497E-8C1E-FC5C985C75C6} - netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release provider.res + true + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release @@ -19,12 +20,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - Always diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs index 63da4ad7..1c6f06f 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessModuleTests.cs @@ -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(), m => m.FileName.Contains(HostRunnerName)); + Assert.Contains(modules.Cast(), m => m.FileName.Contains(RemoteExecutor.HostRunnerName)); } [Fact] diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index e736b6b..788c824 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -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().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)] diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs index 86afa60..933616e 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs @@ -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; } } diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.NonUap.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.NonUap.cs index 3ce842e..4ebc3d8 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.NonUap.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.NonUap.cs @@ -11,8 +11,6 @@ namespace System.Diagnostics.Tests { partial class ProcessTestBase { - protected static readonly string RunnerName = HostRunner; - protected Process CreateProcessLong() { return CreateSleepProcess(RemotelyInvokable.WaitInMS); diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.cs index 91f9ae8..8fc6801 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTestBase.cs @@ -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 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 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> 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; diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs index 73d0486..94de927 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs @@ -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 == "") { @@ -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)) { } } diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs index 290d763..fe0897f 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs @@ -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 testProcessIds = Process.GetProcessesByName(HostRunnerName).Select(p => p.Id); + IEnumerable 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)RemotelyInvokable.ConcatThreeArguments, inputArguments, options)) + using (RemoteInvokeHandle handle = RemoteExecutor.InvokeRaw((Func)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(); } diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs index 55fafcd..e827ddc 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.netcoreapp.cs @@ -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) diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessWaitingTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessWaitingTests.cs index f650472..89c9843 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessWaitingTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessWaitingTests.cs @@ -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] diff --git a/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj b/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj index f53b3e8..c3c4e27 100644 --- a/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj +++ b/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj @@ -3,6 +3,7 @@ {E1114510-844C-4BB2-BBAD-8595BD16E24B} true $(DefineConstants);TargetsWindows + true 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 @@ -42,12 +43,6 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/ConsoleTraceListenerTests.cs b/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/ConsoleTraceListenerTests.cs index 7c7d507..40cbf2d 100644 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/ConsoleTraceListenerTests.cs +++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/ConsoleTraceListenerTests.cs @@ -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(); } } diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj b/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj index 00ad28d..5652238 100644 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj +++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj @@ -1,6 +1,7 @@  {92A9467A-9F7E-4294-A7D5-7B59F2E54ABE} + true netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release @@ -15,10 +16,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.cs b/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.cs index 3104592..36bc7a7 100644 --- a/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.cs +++ b/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.cs @@ -8,7 +8,7 @@ using Xunit; namespace System.Diagnostics.TraceSourceTests { - public partial class DefaultTraceListenerClassTests : RemoteExecutorTestBase + public partial class DefaultTraceListenerClassTests : FileCleanupTestBase { private class TestDefaultTraceListener : DefaultTraceListener { diff --git a/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.netcoreapp.cs b/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.netcoreapp.cs index 6655ce2..0dacf4e 100644 --- a/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.netcoreapp.cs +++ b/src/libraries/System.Diagnostics.TraceSource/tests/DefaultTraceListenerClassTests.netcoreapp.cs @@ -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(); diff --git a/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj b/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj index ff8c22b..799ca21 100644 --- a/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj +++ b/src/libraries/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj @@ -1,8 +1,7 @@ - System.Diagnostics.TraceSourceTests - System.Diagnostics.TraceSource.Tests {7B32D24D-969A-4F7F-8461-B43E15E5D553} + true 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 @@ -29,10 +28,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Drawing.Common/tests/BitmapTests.cs b/src/libraries/System.Drawing.Common/tests/BitmapTests.cs index cd396d6..af38839 100644 --- a/src/libraries/System.Drawing.Common/tests/BitmapTests.cs +++ b/src/libraries/System.Drawing.Common/tests/BitmapTests.cs @@ -33,7 +33,7 @@ using Xunit; namespace System.Drawing.Tests { - public class BitmapTests : RemoteExecutorTestBase + public class BitmapTests : FileCleanupTestBase { public static IEnumerable Ctor_FilePath_TestData() { diff --git a/src/libraries/System.Drawing.Common/tests/IconTests.cs b/src/libraries/System.Drawing.Common/tests/IconTests.cs index 3bed03b..f01f72d 100644 --- a/src/libraries/System.Drawing.Common/tests/IconTests.cs +++ b/src/libraries/System.Drawing.Common/tests/IconTests.cs @@ -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 diff --git a/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj b/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj index fa48906..a420ded 100644 --- a/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj +++ b/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj @@ -2,8 +2,9 @@ {4B93E684-0630-45F4-8F63-6C7788C9892F} true - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release 1.0.7 + true + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release @@ -107,10 +108,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs b/src/libraries/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs index 14dba56..fe1736e 100644 --- a/src/libraries/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs +++ b/src/libraries/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs @@ -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) diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs index 2882ab6..86856ef 100644 --- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs +++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs @@ -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(); } diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoDateTimeFormat.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoDateTimeFormat.cs index c10e86d..93e7b4d 100644 --- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoDateTimeFormat.cs +++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoDateTimeFormat.cs @@ -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 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(); } diff --git a/src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrentInfo.cs b/src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrentInfo.cs index 655cf93..f47ba59 100644 --- a/src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrentInfo.cs +++ b/src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrentInfo.cs @@ -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 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(); } diff --git a/src/libraries/System.Globalization/tests/System.Globalization.Tests.csproj b/src/libraries/System.Globalization/tests/System.Globalization.Tests.csproj index 9261d20..dbf50eb 100644 --- a/src/libraries/System.Globalization/tests/System.Globalization.Tests.csproj +++ b/src/libraries/System.Globalization/tests/System.Globalization.Tests.csproj @@ -1,9 +1,10 @@  - true {484C92C6-6D2C-45BC-A5E2-4A12BA228E1E} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + true true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -111,10 +112,6 @@ Common\System\RandomDataGenerator.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - diff --git a/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs b/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs index 830b89a..9586135 100644 --- a/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs +++ b/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs @@ -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(); } diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs b/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs index 0afa64c..080df4e 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs @@ -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(); diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs b/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs index 01402a2..d9b5b8e 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs @@ -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(); } } diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/SetCurrentDirectory.cs b/src/libraries/System.IO.FileSystem/tests/Directory/SetCurrentDirectory.cs index df3fd27..1638886 100644 --- a/src/libraries/System.IO.FileSystem/tests/Directory/SetCurrentDirectory.cs +++ b/src/libraries/System.IO.FileSystem/tests/Directory/SetCurrentDirectory.cs @@ -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(); } } diff --git a/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs b/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs index 2bc2313..046bfcc 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileInfo/Exists.cs @@ -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); diff --git a/src/libraries/System.IO.FileSystem/tests/FileStream/Dispose.cs b/src/libraries/System.IO.FileSystem/tests/FileStream/Dispose.cs index edee857..ba88324 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileStream/Dispose.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileStream/Dispose.cs @@ -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(); } diff --git a/src/libraries/System.IO.FileSystem/tests/FileStream/LockUnlock.cs b/src/libraries/System.IO.FileSystem/tests/FileStream/LockUnlock.cs index 68e7a56..7773169 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileStream/LockUnlock.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileStream/LockUnlock.cs @@ -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(() => 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(); } } diff --git a/src/libraries/System.IO.FileSystem/tests/FileStream/Name.cs b/src/libraries/System.IO.FileSystem/tests/FileStream/Name.cs index d4dde6e..ad6c44a 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileStream/Name.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileStream/Name.cs @@ -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; diff --git a/src/libraries/System.IO.FileSystem/tests/FileStream/ctor_str_fm_fa_fs.cs b/src/libraries/System.IO.FileSystem/tests/FileStream/ctor_str_fm_fa_fs.cs index c3e0adf..e722773 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileStream/ctor_str_fm_fa_fs.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileStream/ctor_str_fm_fa_fs.cs @@ -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(); } diff --git a/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs b/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs index ff21035..1e9e23b 100644 --- a/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs +++ b/src/libraries/System.IO.FileSystem/tests/FileSystemTest.cs @@ -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 }; diff --git a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj index 982e47c..6ee7fdc 100644 --- a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj +++ b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj @@ -2,6 +2,7 @@ {F0D49126-6A1C-42D5-9428-4374C868BAF8} true + true 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 @@ -174,10 +175,6 @@ Common\System\IO\PathFeatures.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs index 1916d09..8ab08e3 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs @@ -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(DataShared_OtherProcess), file.Path).Dispose(); + RemoteExecutor.Invoke(new Func(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; } } diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj b/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj index 732c139..9f28726 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj +++ b/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj @@ -2,6 +2,7 @@ {9D6F6254-B5A3-40FF-8925-68AA8D1CE933} true + true netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release @@ -23,10 +24,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs b/src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs index 25bc4bd..0b6ff5d 100644 --- a/src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs +++ b/src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs @@ -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(ChildFunc), outbound.GetClientHandleAsString(), inbound.GetClientHandleAsString())) + using (var remote = RemoteExecutor.Invoke(new Func(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(ChildFunc), pipe.GetClientHandleAsString())) + using (var remote = RemoteExecutor.Invoke(new Func(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(ChildFunc), pipe.GetClientHandleAsString(), new RemoteInvokeOptions { CheckExitCode = false })) + using (var remote = RemoteExecutor.Invoke(new Func(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; } } } diff --git a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs index 929f00e..acb736a 100644 --- a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs +++ b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs @@ -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(ChildFunc), client.SafePipeHandle.DangerousGetHandle().ToString())) + using (RemoteExecutor.Invoke(new Func(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(PingPong_OtherProcess), outName, inName)) + using (RemoteExecutor.Invoke(new Func(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(PingPong_OtherProcess), outName, inName)) + using (RemoteExecutor.Invoke(new Func(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() diff --git a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs index ee4d54d..f9a34c5 100644 --- a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs +++ b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs @@ -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 { /// /// Negative tests for PipeOptions.CurrentUserOnly in Unix. /// - 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(ConnectClientFromRemoteInvoker), pipeName, clientPipeOptions == PipeOptions.CurrentUserOnly ? "true" : "false", @@ -59,7 +60,7 @@ namespace System.IO.Pipes.Tests client.Connect(); } - return SuccessExitCode; + return RemoteExecutor.SuccessExitCode; } } } diff --git a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs index fd3e9b6..6fd9943 100644 --- a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs +++ b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs @@ -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(ServerConnectAsId), pipeName, pairID.ToString()).Dispose(); + RemoteExecutor.Invoke(new Func(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(ClientConnectAsID), pipeName, pairIDString)) + using (var handle = RemoteExecutor.Invoke(new Func(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; } } } diff --git a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs index 479b01c..4bf966c 100644 --- a/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs +++ b/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs @@ -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)] diff --git a/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj b/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj index 78276e7..ab1ee92 100644 --- a/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj +++ b/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj @@ -2,9 +2,9 @@ {142469EC-D665-4FE2-845A-FDA69F9CC557} true + true 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 - @@ -52,10 +52,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.IO/tests/StringWriter/StringWriterTests.cs b/src/libraries/System.IO/tests/StringWriter/StringWriterTests.cs index 4c05030..0d7daa9 100644 --- a/src/libraries/System.IO/tests/StringWriter/StringWriterTests.cs +++ b/src/libraries/System.IO/tests/StringWriter/StringWriterTests.cs @@ -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(); diff --git a/src/libraries/System.IO/tests/System.IO.Tests.csproj b/src/libraries/System.IO/tests/System.IO.Tests.csproj index dec2d2d..af89d8e 100644 --- a/src/libraries/System.IO/tests/System.IO.Tests.csproj +++ b/src/libraries/System.IO/tests/System.IO.Tests.csproj @@ -1,11 +1,11 @@ - System.IO - System.IO.Tests {492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02} + System.IO true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -77,12 +77,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - \ No newline at end of file diff --git a/src/libraries/System.Json/tests/System.Json.Tests.csproj b/src/libraries/System.Json/tests/System.Json.Tests.csproj index ed168cb..3fec442 100644 --- a/src/libraries/System.Json/tests/System.Json.Tests.csproj +++ b/src/libraries/System.Json/tests/System.Json.Tests.csproj @@ -2,6 +2,7 @@ {DC683D60-34EC-4D85-B6E0-E97FDB37A583} true + true netstandard-Debug;netstandard-Release @@ -9,9 +10,5 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - \ No newline at end of file diff --git a/src/libraries/System.Json/tests/System/Json/JsonValueTests.cs b/src/libraries/System.Json/tests/System/Json/JsonValueTests.cs index fe3460b..f9f2947 100644 --- a/src/libraries/System.Json/tests/System/Json/JsonValueTests.cs +++ b/src/libraries/System.Json/tests/System/Json/JsonValueTests.cs @@ -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" }) diff --git a/src/libraries/System.Linq.Parallel/tests/EtwTests.cs b/src/libraries/System.Linq.Parallel/tests/EtwTests.cs index 80e7a31..3656c76 100644 --- a/src/libraries/System.Linq.Parallel/tests/EtwTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/EtwTests.cs @@ -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)) { diff --git a/src/libraries/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj b/src/libraries/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj index 943546d..b4f438f 100644 --- a/src/libraries/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj +++ b/src/libraries/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj @@ -1,11 +1,11 @@ {A7074928-82C3-4739-88FE-9B528977950C} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release - Common\System\Diagnostics\Tracing\TestEventListener.cs @@ -79,9 +79,5 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - \ No newline at end of file diff --git a/src/libraries/System.Memory/tests/System.Memory.Tests.csproj b/src/libraries/System.Memory/tests/System.Memory.Tests.csproj index f535f50..213fa81 100644 --- a/src/libraries/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/libraries/System.Memory/tests/System.Memory.Tests.csproj @@ -3,8 +3,9 @@ true {15DB0DCC-68B4-4CFB-8BD2-F26BCCAF5A3F} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release @@ -269,10 +270,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index 1a7e0ef..2b07e41 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -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(); } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs index 080b25b..312d8bd 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs @@ -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(); } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs index c6f0416..e9326bd 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs @@ -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) { diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs index eb38f93..5eaa250 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs @@ -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(() => client.GetAsync(Url)); } - return SuccessExitCode; + return RemoteExecutor.SuccessExitCode; }, UseSocketsHttpHandler.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); } } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs index f92740d..2216045 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs @@ -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 diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 0fa242d..63a68da 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -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(); } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs index a50f627..27639e8 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs @@ -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; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs index a7f5de0..9e76fc2 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs @@ -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(() => 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(() => 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(); } } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index fc134b6..c11693c 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -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(); 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(); } } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 9d3a466..8f4ce48 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -4,6 +4,7 @@ $(DefineConstants);TargetsWindows $(DefineConstants);SYSNETHTTP_NO_OPENSSL true + true 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 @@ -168,12 +169,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - diff --git a/src/libraries/System.Net.Http/tests/UnitTests/Headers/CacheControlHeaderValueTest.cs b/src/libraries/System.Net.Http/tests/UnitTests/Headers/CacheControlHeaderValueTest.cs index af7443d..37cb432 100644 --- a/src/libraries/System.Net.Http/tests/UnitTests/Headers/CacheControlHeaderValueTest.cs +++ b/src/libraries/System.Net.Http/tests/UnitTests/Headers/CacheControlHeaderValueTest.cs @@ -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() { diff --git a/src/libraries/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs b/src/libraries/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs index 34a555f..7cdbddf 100644 --- a/src/libraries/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs +++ b/src/libraries/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs @@ -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(); } } diff --git a/src/libraries/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs b/src/libraries/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs index 74e995e..2ee7c63 100644 --- a/src/libraries/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs +++ b/src/libraries/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs @@ -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(); } } diff --git a/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index 458abfd..1dd4c62 100644 --- a/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -3,6 +3,7 @@ {5F9C3C9F-652E-461E-B2D6-85D264F5A733} ../../src/Resources/Strings.resx true + true netcoreapp-Debug;netcoreapp-Release @@ -424,10 +425,4 @@ ProductionCode\System\Net\Http\WinInetProxyHelper.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - diff --git a/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs b/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs index 2723d24..cb015d2 100644 --- a/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs +++ b/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs @@ -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(); } } diff --git a/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj b/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj index 7cec78f..be74e4a 100644 --- a/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj +++ b/src/libraries/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj @@ -1,6 +1,7 @@  {A26D88B7-6EF6-4C8C-828B-7B57732CCE38} + true netstandard-Debug;netstandard-Release @@ -33,10 +34,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs index 3a904d1..0305e4b 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs @@ -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(); } } diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj b/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj index 24e2aff..2566817 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj @@ -1,6 +1,7 @@ {E671BC9F-A64C-4504-8B00-7A3215B99AF9} + true 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 @@ -32,12 +33,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - diff --git a/src/libraries/System.Net.Requests/tests/AuthenticationManagerTest.cs b/src/libraries/System.Net.Requests/tests/AuthenticationManagerTest.cs index 8baf87e..b669737 100644 --- a/src/libraries/System.Net.Requests/tests/AuthenticationManagerTest.cs +++ b/src/libraries/System.Net.Requests/tests/AuthenticationManagerTest.cs @@ -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(); } diff --git a/src/libraries/System.Net.Requests/tests/GlobalProxySelectionTest.cs b/src/libraries/System.Net.Requests/tests/GlobalProxySelectionTest.cs index 7947624..fd7bf4c 100644 --- a/src/libraries/System.Net.Requests/tests/GlobalProxySelectionTest.cs +++ b/src/libraries/System.Net.Requests/tests/GlobalProxySelectionTest.cs @@ -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(); } diff --git a/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs b/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs index 310e31c..44e2e95 100644 --- a/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs +++ b/src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs @@ -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; diff --git a/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj b/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj index b101f87..376dec3 100644 --- a/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj +++ b/src/libraries/System.Net.Requests/tests/System.Net.Requests.Tests.csproj @@ -2,6 +2,7 @@ {E520B5FD-C6FF-46CF-8079-6C8098013EA3} ../src/Resources/Strings.resx + true netstandard-Debug;netstandard-Release $(DefineConstants);NETSTANDARD @@ -31,10 +32,6 @@ Common\System\Threading\Tasks\TaskTimeoutExtensions.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - diff --git a/src/libraries/System.Net.Requests/tests/WebRequestTest.cs b/src/libraries/System.Net.Requests/tests/WebRequestTest.cs index 861a3d4..4acc29f 100644 --- a/src/libraries/System.Net.Requests/tests/WebRequestTest.cs +++ b/src/libraries/System.Net.Requests/tests/WebRequestTest.cs @@ -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(); } diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs index 31fedb4..0f216af 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs @@ -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(); } } diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj index b686645..5e2b1dc 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj @@ -1,6 +1,7 @@ {A55A2B9A-830F-4330-A0E7-02A9FB30ABD2} + true 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 @@ -148,10 +149,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - diff --git a/src/libraries/System.Net.ServicePoint/tests/ServicePointManagerTest.cs b/src/libraries/System.Net.ServicePoint/tests/ServicePointManagerTest.cs index f9ab985..df9bdae 100644 --- a/src/libraries/System.Net.ServicePoint/tests/ServicePointManagerTest.cs +++ b/src/libraries/System.Net.ServicePoint/tests/ServicePointManagerTest.cs @@ -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"); diff --git a/src/libraries/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj b/src/libraries/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj index 0eca285..43d9e76 100644 --- a/src/libraries/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj +++ b/src/libraries/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj @@ -1,6 +1,7 @@ {DC3BBD1F-37C8-40B2-B248-E12E8D0D146B} + true netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -10,10 +11,4 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Net.ServicePoint/tests/TlsSystemDefault.cs b/src/libraries/System.Net.ServicePoint/tests/TlsSystemDefault.cs index 67ee162..42d83da 100644 --- a/src/libraries/System.Net.ServicePoint/tests/TlsSystemDefault.cs +++ b/src/libraries/System.Net.ServicePoint/tests/TlsSystemDefault.cs @@ -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(); } } } diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs index 48f6cea..819344d 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs @@ -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)) { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs index 7bfb114..e006933 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs @@ -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(); } } diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs index c90b3bf..83fb63b 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs @@ -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); diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs index e4f93fc..23f523a 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs @@ -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[] { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj b/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj index 8466b69..cac7453 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj @@ -2,6 +2,7 @@ {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6} true + true 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 @@ -112,12 +113,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - - \ No newline at end of file diff --git a/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs b/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs index 4270fa7..3172544 100644 --- a/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs +++ b/src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs @@ -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(); diff --git a/src/libraries/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj b/src/libraries/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj index 21b756ff..22ccb67 100644 --- a/src/libraries/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj +++ b/src/libraries/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj @@ -2,9 +2,10 @@ {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1} System.Resources.Tests - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release - true true + true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -46,12 +47,6 @@ - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - @@ -30,9 +27,6 @@ System\Text\RegularExpressions\RegexParseError.cs - - RemoteExecutorConsoleApp - diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/EtwTests.cs b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/EtwTests.cs index 9ccbc0b..31343c4 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/EtwTests.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/EtwTests.cs @@ -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(); } diff --git a/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj b/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj index b5742f4..4c5f28d 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj +++ b/src/libraries/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj @@ -1,6 +1,7 @@ {72E21903-0FBA-444E-9855-3B4F05DFC1F9} + true netstandard-Debug;netstandard-Release @@ -28,10 +29,4 @@ Common\System\Diagnostics\DebuggerAttributes.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/EtwTests.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/EtwTests.cs index 6776903..789cf6f 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/EtwTests.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/EtwTests.cs @@ -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)) diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj b/src/libraries/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj index 09494ec..4aa3d9e 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj @@ -1,6 +1,7 @@ {DE29C320-2ECA-43FD-9F41-6F4F6C6BACD5} + true netstandard-Debug;netstandard-Release @@ -28,9 +29,5 @@ CommonTest\System\Threading\ThreadPoolHelpers.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - diff --git a/src/libraries/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.netcoreapp.cs b/src/libraries/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.netcoreapp.cs index eb5a0c2..50f9123 100644 --- a/src/libraries/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.netcoreapp.cs +++ b/src/libraries/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.netcoreapp.cs @@ -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(); } diff --git a/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj b/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj index 9346139..1369d8c 100644 --- a/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj +++ b/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj @@ -1,8 +1,9 @@ {B6C09633-D161-499A-8FE1-46B2D53A16E7} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -64,10 +65,4 @@ Common\System\Diagnostics\Tracing\TestEventListener.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj b/src/libraries/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj index 82cd7b2..1b617e4 100644 --- a/src/libraries/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj +++ b/src/libraries/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj @@ -2,8 +2,9 @@ {33F5A50E-B823-4FDD-8571-365C909ACEAE} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release @@ -18,10 +19,6 @@ CommonTest\System\Threading\ThreadPoolHelpers.cs - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - STAMain diff --git a/src/libraries/System.Threading.Thread/tests/ThreadTests.cs b/src/libraries/System.Threading.Thread/tests/ThreadTests.cs index 8aecbee..9e6f056 100644 --- a/src/libraries/System.Threading.Thread/tests/ThreadTests.cs +++ b/src/libraries/System.Threading.Thread/tests/ThreadTests.cs @@ -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(() => 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(() => 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(() => 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(() => 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(() => 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(() => 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(); diff --git a/src/libraries/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj b/src/libraries/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj index 4bac4e1..fe7245c 100644 --- a/src/libraries/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj +++ b/src/libraries/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj @@ -1,6 +1,7 @@ {403AD1B8-6F95-4A2E-92A2-727606ABD866} + true netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release true diff --git a/src/libraries/System.Threading/tests/EtwTests.cs b/src/libraries/System.Threading/tests/EtwTests.cs index 644a799..f542961 100644 --- a/src/libraries/System.Threading/tests/EtwTests.cs +++ b/src/libraries/System.Threading/tests/EtwTests.cs @@ -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)) { diff --git a/src/libraries/System.Threading/tests/EventWaitHandleTests.cs b/src/libraries/System.Threading/tests/EventWaitHandleTests.cs index ab80812..60869c7 100644 --- a/src/libraries/System.Threading/tests/EventWaitHandleTests.cs +++ b/src/libraries/System.Threading/tests/EventWaitHandleTests.cs @@ -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 GetValidNames() diff --git a/src/libraries/System.Threading/tests/MutexTests.cs b/src/libraries/System.Threading/tests/MutexTests.cs index 7ab65db..22bb79a 100644 --- a/src/libraries/System.Threading/tests/MutexTests.cs +++ b/src/libraries/System.Threading/tests/MutexTests.cs @@ -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); diff --git a/src/libraries/System.Threading/tests/SemaphoreTests.cs b/src/libraries/System.Threading/tests/SemaphoreTests.cs index d1fda5f..27774e2 100644 --- a/src/libraries/System.Threading/tests/SemaphoreTests.cs +++ b/src/libraries/System.Threading/tests/SemaphoreTests.cs @@ -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(PingPong_OtherProcess), outboundName, inboundName)) + using (var remote = RemoteExecutor.Invoke(new Func(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 GetValidNames() diff --git a/src/libraries/System.Threading/tests/System.Threading.Tests.csproj b/src/libraries/System.Threading/tests/System.Threading.Tests.csproj index 6db12d4..5054c23 100644 --- a/src/libraries/System.Threading/tests/System.Threading.Tests.csproj +++ b/src/libraries/System.Threading/tests/System.Threading.Tests.csproj @@ -1,8 +1,9 @@ {18EF66B3-51EE-46D8-B283-1CB6A1197813} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release true + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release @@ -41,10 +42,4 @@ CommonTest\System\Threading\ThreadTestHelpers.cs - - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp - - \ No newline at end of file diff --git a/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs b/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs index 497c298..5f46dd3 100644 --- a/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs +++ b/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs @@ -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); } /// @@ -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)) { diff --git a/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj b/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj index 3f90e01..066f5ac 100644 --- a/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj +++ b/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj @@ -1,8 +1,9 @@ {1C397868-9644-48CB-94BF-35805C4AE024} - netstandard-Debug;netstandard-Release false + true + netstandard-Debug;netstandard-Release @@ -16,10 +17,6 @@ - - {69e46a6f-9966-45a5-8945-2559fe337827} - RemoteExecutorConsoleApp -