diff options
author | Maxim Lipnin <v-maxlip@microsoft.com> | 2019-12-04 00:40:09 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2019-12-04 00:40:09 +0300 |
commit | e7ef2f3d5fbbbc1c5da8f2fd87a37ad7a2b51013 (patch) | |
tree | e86f7fa5cddc24484e1211cc3386072297e69cee /mcs | |
parent | 174f2f6a70084eced80d4c0284b0a9eb2cf25432 (diff) |
[Wasm] Enable system nunit tests on ci (#17716)
* [wasm][nunit tests] Enable nunit tests for System on CI
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.Mail.SmtpClientTest tests
* Fix test suit name
* [wasm][nunit tests] Exclude MonoTests.System.Net.HttpListenerPrefixCollectionTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.HttpListenerTest nunit tests
* [wasm][nunit tests] Exclude MonoTests.System.Net.NetworkInformation.NetworkInterfaceTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.Sockets.UdpClientTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.ComponentModel.PropertyDescriptorCollectionTests nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Collections.Specialized.NameValueCollectionTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Collections.Concurrent.ConcurrentBagTests nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.ComponentModel.BackgroundWorkerTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.NetworkInformation.IPInterfacePropertiesTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.ComponentModel.EventDescriptorCollectionTests nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.ComponentModel.AsyncOperationManagerTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.HttpListenerRequestTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.ServicePointTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.Sockets.TcpListenerTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.WebClientTestAsync nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.WebProxyTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.WebRequestTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Timers.TimerTest nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.HttpListenerTest.PropertiesWhenClosedSet3 test
* [wasm][nunit tests] Increase timeout for System nunit tests
* [wasm][nunit tests] Exclude failing MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest.Find_FindByIssuerName test
* [wasm][nunit tests] Remove PNSE expectation in MonoTests.System.Net.Mail.SmtpClientTest tests
* [wasm][nunit tests] Remove PNSE expectation in MonoTests.System.Net.HttpListenerPrefixCollectionTest nunit tests
* [wasm][nunit tests] Remove PNSE expectation in MonoTests.System.Net.HttpListenerTest nunit tests
* Increase CI timeout for System.Core nunit tests
* [wasm][nunit tests] Remove PNSE expectation in MonoTests.System.Net.Sockets.UdpClientTest nunit tests
* [wasm][nunit tests] Update NetworkInterface class to throw PNSE
* [wasm][nunit tests] Ignore failing MonoTests.System.ComponentModel.PropertyDescriptorCollectionTests nunit tests
* [wasm][nunit tests] Ignore failing MonoTests.System.Collections.Specialized.NameValueCollectionTest nunit tests
* [wasm][nunit tests] Adjust the use of Ignore attribute
* [wasm][nunit tests] Categorize failing MonoTests.System.Collections.Concurrent.ConcurrentBagTests nunit tests
* [wasm][nunit tests] Categorize failing MonoTests.System.ComponentModel.BackgroundWorkerTest nunit tests
* [wasm][nunit tests] Categorize failing MonoTests.System.Net.NetworkInformation.IPInterfacePropertiesTest nunit tests
* [wasm][nunit tests] Ignore failing MonoTests.System.Net.NetworkInformation.IPInterfacePropertiesTest nunit tests
* [wasm][nunit tests] Remove the category for passing MonoTests.System.Net.HttpListenerRequestTest nunit tests
* [wasm][nunit tests] Exclude failing part of MonoTests.System.Net.ServicePointTest.DnsRefreshTimeout test
* [wasm][nunit tests] Remove PNSE expectation in failing MonoTests.System.Net.Sockets.TcpListenerTest nunit tests.
* [wasm][nunit tests] Exclude failing MonoTests.System.Net.WebProxyTest nunit tests due to libc issue
* [wasm][nunit tests] Remove PNSE expectation in MonoTests.System.Net.WebRequestTest.DefaultWebProxy test
* [wasm][nunit tests] Exclude failing MonoTests.System.Security.Cryptography.X509Certificates.X509Certificate2CollectionTest nunit tests due to compare info issue
Diffstat (limited to 'mcs')
20 files changed, 186 insertions, 68 deletions
diff --git a/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs b/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs index 223c5207dba..0d7f7faa49c 100644 --- a/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs +++ b/mcs/class/System/Test/System.Collections.Concurrent/ConcurrentBagTests.cs @@ -197,6 +197,9 @@ namespace MonoTests.System.Collections.Concurrent } [Test] +#if WASM + [Category ("MultiThreaded")] +#endif public void BasicRemoveEmptyTest () { int result; @@ -205,6 +208,9 @@ namespace MonoTests.System.Collections.Concurrent } [Test] +#if WASM + [Category ("MultiThreaded")] +#endif public void BasicRemoveTwiceTest() { bag.Add (1); diff --git a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs index 03d4b3212d4..2a1f9eb18bf 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs @@ -254,6 +254,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void CaseInsensitive () { // default constructor is case insensitive @@ -347,6 +350,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Remove () { string[] items = { "mono", "MoNo", "mOnO", "MONO" }; @@ -414,6 +420,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Constructor_IEqualityComparer_Null () { NameValueCollection c1 = new NameValueCollection ((IEqualityComparer)null); @@ -423,6 +432,9 @@ namespace MonoTests.System.Collections.Specialized { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Constructor_NameValueCollection () { NameValueCollection c1 = new NameValueCollection (StringComparer.InvariantCultureIgnoreCase); diff --git a/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs b/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs index 1c348dc4881..411f7d176c7 100644 --- a/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs @@ -18,6 +18,7 @@ using NUnit.Framework; namespace MonoTests.System.ComponentModel
{
[TestFixture]
+ [NUnit.Framework.CategoryAttribute ("NotWasm")]
public class AsyncOperationManagerTest
{
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs b/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs index b46c924f41a..d4ee0685ea2 100644 --- a/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/BackgroundWorkerTest.cs @@ -81,6 +81,9 @@ namespace MonoTests.System.ComponentModel } [Test] +#if WASM + [NUnit.Framework.CategoryAttribute ("MultiThreaded")] +#endif public void CancelBackgroundWorker () { BackgroundWorker bw = new BackgroundWorker (); @@ -117,6 +120,9 @@ namespace MonoTests.System.ComponentModel } [Test] +#if WASM + [NUnit.Framework.CategoryAttribute ("MultiThreaded")] +#endif public void ExceptionBackgroundWorker () { BackgroundWorker bw = new BackgroundWorker (); @@ -154,6 +160,9 @@ namespace MonoTests.System.ComponentModel } [Test] +#if WASM + [NUnit.Framework.CategoryAttribute ("MultiThreaded")] +#endif public void CompleteBackgroundWorker () { BackgroundWorker bw = new BackgroundWorker (); diff --git a/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs index 6ae957c9a24..45544f5b9b2 100644 --- a/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs @@ -151,6 +151,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort () +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort1 () { EventDescriptorCollection descriptors; @@ -192,6 +195,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String []) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort2 () { EventDescriptorCollection descriptors; @@ -249,6 +255,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort3 () { EventDescriptorCollection descriptors; @@ -306,6 +315,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String [], IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort4 () { EventDescriptorCollection descriptors; diff --git a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs index 8c4730d7bf9..d7b19e35d01 100644 --- a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs @@ -247,6 +247,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort () +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort1 () { PropertyDescriptorCollection descriptors; @@ -288,6 +291,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String []) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort2 () { PropertyDescriptorCollection descriptors; @@ -345,6 +351,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort3 () { PropertyDescriptorCollection descriptors; @@ -402,6 +411,9 @@ namespace MonoTests.System.ComponentModel } [Test] // Sort (String [], IComparer) +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Sort4 () { PropertyDescriptorCollection descriptors; diff --git a/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs b/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs index 233415074c3..411af2bc6ca 100644 --- a/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs @@ -40,7 +40,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Credentials_Default () @@ -49,7 +49,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DeliveryMethod () @@ -67,7 +67,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void EnableSsl () @@ -80,7 +80,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Host () @@ -99,7 +99,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Host_Value_Null () @@ -116,7 +116,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Host_Value_Empty () @@ -134,7 +134,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PickupDirectoryLocation () @@ -153,7 +153,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Port () @@ -166,7 +166,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Port_Value_Invalid () @@ -195,7 +195,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_Message_Null () @@ -212,7 +212,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_Network_Host_Null () @@ -230,7 +230,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_Network_Host_Whitespace () @@ -249,7 +249,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory () @@ -265,7 +265,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_DirectoryNotFound () @@ -295,7 +295,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_Empty () @@ -317,7 +317,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_IllegalChars () @@ -345,7 +345,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_NotAbsolute () @@ -367,7 +367,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_Null () @@ -388,7 +388,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Timeout () @@ -401,7 +401,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentOutOfRangeException))] @@ -412,7 +412,7 @@ namespace MonoTests.System.Net.Mail } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void UseDefaultCredentials_Default () diff --git a/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs b/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs index 7e693d4e1d2..fbde01c4449 100644 --- a/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs +++ b/mcs/class/System/Test/System.Net.NetworkInformation/IPInterfacePropertiesTest.cs @@ -19,6 +19,9 @@ namespace MonoTests.System.Net.NetworkInformation public class IPInterfacePropertiesTest { [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void AtLeastOneUnicastAddress () { int numUnicastAddresses = 0; @@ -112,10 +115,13 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void DnsEnabled () { if (Environment.OSVersion.Platform == PlatformID.Win32NT) - Assert.Ignore ("IsDnsEnabled is not nessasarily enabled for all interfaces on windows."); + Assert.Ignore ("IsDnsEnabled is not necessarily enabled for all interfaces on windows."); NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); foreach (NetworkInterface adapter in adapters) @@ -126,6 +132,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif // The code works as expected when part of a regular app. It fails when executed from within an NUnit test // Might be a problem with the test suite. To investigate. [Category("AndroidNotWorking")] diff --git a/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs b/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs index b124403e0dd..e42b0f8fc9f 100644 --- a/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs +++ b/mcs/class/System/Test/System.Net.NetworkInformation/NetworkInterfaceTest.cs @@ -19,18 +19,27 @@ namespace MonoTests.System.Net.NetworkInformation public class NetworkInterfaceTest { [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void IsNetworkAvailable () { Assert.IsTrue (NetworkInterface.GetIsNetworkAvailable ()); } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void LoopbackInterfaceIndex () { Assert.IsTrue (NetworkInterface.LoopbackInterfaceIndex > 0); } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void AtLeastOneInterface () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -38,6 +47,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceId () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -45,6 +57,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceName () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -52,6 +67,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceType () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -59,6 +77,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceOperationalStatus () { var adapter = NetworkInterface.GetAllNetworkInterfaces ()[0]; @@ -68,6 +89,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void FirstInterfaceSpeed () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); @@ -75,6 +99,9 @@ namespace MonoTests.System.Net.NetworkInformation } [Test] +#if WASM + [ExpectedException (typeof (PlatformNotSupportedException))] +#endif public void IPv4Mask () { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces (); diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs index 89ac4c971d9..bf63ddb4d6c 100644 --- a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs @@ -93,7 +93,7 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentNullException))] @@ -104,7 +104,7 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentNullException))] @@ -115,7 +115,7 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentOutOfRangeException))] diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs index 557c3292ee1..c2d73619ca5 100644 --- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs @@ -95,7 +95,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (AddressFamily) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor2_Family_Invalid () @@ -176,7 +176,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (Int32) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor3_Port_OutOfRange () @@ -240,7 +240,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (IPEndPoint) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor4_LocalEP_Null () @@ -313,7 +313,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (Int32, AddressFamily) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor5_Family_Invalid () @@ -346,7 +346,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (Int32, AddressFamily) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor5_Port_OutOfRange () @@ -426,7 +426,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (String, Int32) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor6_HostName_Null () @@ -443,7 +443,7 @@ namespace MonoTests.System.Net.Sockets { } [Test] // .ctor (String, Int32) -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Constructor6_Port_OutOfRange () diff --git a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs index 20763df5802..a256846f5be 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs @@ -38,7 +38,7 @@ namespace MonoTests.System.Net { public class HttpListenerPrefixCollectionTest { // NL -> Not listening -> tests when listener.IsListening == false [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_DefaultProperties () @@ -51,7 +51,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DefaultProperties () @@ -100,7 +100,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void EndsWithSlash () @@ -110,7 +110,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DifferentPath () @@ -122,7 +122,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_Clear () @@ -133,7 +133,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_Remove () @@ -144,7 +144,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void NL_RemoveBadUri () @@ -155,7 +155,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentException))] @@ -168,7 +168,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ArgumentException))] @@ -180,7 +180,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void MultipleSlashes () @@ -196,7 +196,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PercentSign () @@ -212,7 +212,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Disposed1 () @@ -226,7 +226,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -240,7 +240,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -254,7 +254,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -268,7 +268,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -283,7 +283,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Disposed6 () @@ -299,7 +299,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Disposed7 () diff --git a/mcs/class/System/Test/System.Net/HttpListenerTest.cs b/mcs/class/System/Test/System.Net/HttpListenerTest.cs index 2683fc6166d..7d14e063782 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerTest.cs @@ -39,7 +39,7 @@ namespace MonoTests.System.Net { [TestFixture] public class HttpListenerTest { [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void DefaultProperties () @@ -55,7 +55,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Start1 () @@ -65,7 +65,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void Stop1 () @@ -75,7 +75,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (InvalidOperationException))] @@ -88,7 +88,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (InvalidOperationException))] @@ -102,7 +102,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (InvalidOperationException))] @@ -115,7 +115,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void BeginGetContext2 () @@ -227,7 +227,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void CloseBeforeStart () @@ -271,7 +271,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void AbortBeforeStart () @@ -292,7 +292,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PropertiesWhenClosed1 () @@ -308,7 +308,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -321,7 +321,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -334,7 +334,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -347,7 +347,8 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS + [Category ("NotWasm")] +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -360,7 +361,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -373,7 +374,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #else [ExpectedException (typeof (ObjectDisposedException))] @@ -386,7 +387,7 @@ namespace MonoTests.System.Net { } [Test] -#if FEATURE_NO_BSD_SOCKETS +#if FEATURE_NO_BSD_SOCKETS && !WASM [ExpectedException (typeof (PlatformNotSupportedException))] #endif public void PropertiesWhenClosed3 () diff --git a/mcs/class/System/Test/System.Net/ServicePointTest.cs b/mcs/class/System/Test/System.Net/ServicePointTest.cs index 506d87a0bf9..1a1a89e0123 100644 --- a/mcs/class/System/Test/System.Net/ServicePointTest.cs +++ b/mcs/class/System/Test/System.Net/ServicePointTest.cs @@ -209,11 +209,13 @@ public class ServicePointTest Assert.AreSame (host0, host1, "HostEntry should result in the same IPHostEntry object."); +#if !WASM Thread.Sleep (dnsRefreshTimeout * 2); host2 = hostEntryProperty.GetValue (sp, null) as IPHostEntry; Assert.AreNotSame(host0, host2, "HostEntry should result in a new IPHostEntry " + "object when DnsRefreshTimeout is reached."); +#endif } // Debug code not used now, but could be useful later diff --git a/mcs/class/System/Test/System.Net/WebClientTestAsync.cs b/mcs/class/System/Test/System.Net/WebClientTestAsync.cs index 549929304ad..3ebb27c22a5 100644 --- a/mcs/class/System/Test/System.Net/WebClientTestAsync.cs +++ b/mcs/class/System/Test/System.Net/WebClientTestAsync.cs @@ -41,6 +41,7 @@ namespace MonoTests.System.Net public class WebClientTestAsync { [Test] + [Category("NotWasm")] [Category("Async")] [Category("AndroidNotWorking")] // Attempts to access the test dll which won't work on Android [Category("BitcodeNotSupported")] diff --git a/mcs/class/System/Test/System.Net/WebProxyTest.cs b/mcs/class/System/Test/System.Net/WebProxyTest.cs index 4fa3b0bfb25..e20c8e319a3 100644 --- a/mcs/class/System/Test/System.Net/WebProxyTest.cs +++ b/mcs/class/System/Test/System.Net/WebProxyTest.cs @@ -66,6 +66,9 @@ namespace MonoTests.System.Net } [Test] +#if WASM + [Ignore ("WASM - libc issue")] +#endif public void BypassArrayList () { Uri proxy1 = new Uri ("http://proxy.contoso.com"); @@ -124,6 +127,9 @@ namespace MonoTests.System.Net } [Test] +#if WASM + [Ignore ("WASM - libc issue")] +#endif public void IsByPassed () { WebProxy p = new WebProxy ("http://proxy.contoso.com", true); diff --git a/mcs/class/System/Test/System.Net/WebRequestTest.cs b/mcs/class/System/Test/System.Net/WebRequestTest.cs index 4493b8ebdf6..51d7a247328 100644 --- a/mcs/class/System/Test/System.Net/WebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/WebRequestTest.cs @@ -267,7 +267,7 @@ namespace MonoTests.System.Net { }
[Test]
-#if FEATURE_NO_BSD_SOCKETS
+#if FEATURE_NO_BSD_SOCKETS && !WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DefaultWebProxy ()
diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs index 3f7ef18e702..ad44b00e9df 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs @@ -579,6 +579,9 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Find_FindByIssuerName () { // empty @@ -692,6 +695,9 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } [Test] +#if WASM + [Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")] +#endif public void Find_FindBySubjectName () { // empty diff --git a/mcs/class/System/Test/System.Timers/TimerTest.cs b/mcs/class/System/Test/System.Timers/TimerTest.cs index 00a238f2e90..6c7206a3903 100644 --- a/mcs/class/System/Test/System.Timers/TimerTest.cs +++ b/mcs/class/System/Test/System.Timers/TimerTest.cs @@ -287,6 +287,7 @@ namespace MonoTests.System.Timers } [Test] // bug https://bugzilla.novell.com/show_bug.cgi?id=325368 + [Category ("NotWasm")] public void EnabledInElapsed () { var elapsedCount = 0; @@ -309,6 +310,7 @@ namespace MonoTests.System.Timers } [Test] + [Category ("NotWasm")] public void AutoResetEventFalseStopsFiringElapsed () { var elapsedCount = 0; diff --git a/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs b/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs index c6dd34f86d7..c2d6c8c0ad8 100644 --- a/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs +++ b/mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs @@ -8,19 +8,31 @@ namespace System.Net.NetworkInformation { /// Returns objects that describe the network interfaces on the local computer. public static NetworkInterface[] GetAllNetworkInterfaces(){ +#if WASM + throw new PlatformNotSupportedException (); +#else #if MONO_FEATURE_CAS (new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand(); #endif return SystemNetworkInterface.GetNetworkInterfaces(); +#endif } public static bool GetIsNetworkAvailable(){ +#if WASM + throw new PlatformNotSupportedException (); +#else return SystemNetworkInterface.InternalGetIsNetworkAvailable(); +#endif } public static int LoopbackInterfaceIndex{ get{ +#if WASM + throw new PlatformNotSupportedException (); +#else return SystemNetworkInterface.InternalLoopbackInterfaceIndex; +#endif } } |