Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -19,7 +19,7 @@ namespace System.IO.Ports.Tests
/// <summary>
/// Check that all ports either open correctly or fail with UnauthorizedAccessException (which implies they're already open)
/// </summary>
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
private void OpenEveryPortName()
{
foreach (string portName in SerialPort.GetPortNames())
@@ -40,7 +40,7 @@ namespace System.IO.Ports.Tests
/// Test that SerialPort.GetPortNames finds every port that the test helpers have found.
/// (On Windows, the latter uses a different technique to SerialPort to find ports).
/// </summary>
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
private void AllHelperPortsAreInGetPortNames()
{
string[] serialPortNames = SerialPort.GetPortNames();
@@ -55,7 +55,7 @@ namespace System.IO.Ports.Tests
/// Test that the test helpers have found every port that SerialPort.GetPortNames has found
/// This catches regressions in the test helpers, eg GH #18928 / #20668
/// </summary>
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
private void AllGetPortNamesAreInHelperPorts()
{
string[] helperPortNames = PortHelper.GetPorts();

View File

@@ -12,7 +12,7 @@ namespace System.IO.Ports.Tests
{
public class OpenDevices : PortsTest
{
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29756
[ActiveIssue("https://github.com/dotnet/corefx/issues/23294", TargetFrameworkMonikers.Uap)]
public void OpenDevices01()
{

View File

@@ -32,6 +32,12 @@ namespace Legacy.Support
private static void InitializeSerialInfo()
{
if (PlatformDetection.IsWindowsNanoServer)
{
s_localMachineSerialPortRequirements = SerialPortRequirements.None;
return;
}
GenerateSerialInfo();
if (s_localMachineSerialInfo.LoopbackPortName != null)