From bc9ab2e7d862457ee277b717481ffdca07b890cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20K=C3=B6plinger?= Date: Wed, 29 May 2019 16:58:55 +0200 Subject: [PATCH] [bcl] Add nunit exclude categories for monotouch/monodroid profiles (#14695) We didn't set all the categories that the products used in our profiles. Now that the products can consume the exclude categories from mono we need to unify the values. Removed ValueAdd since it's not used anymore and combined MacNotWorking into NotOnMac. (cherry picked from commit f46191114b6f3a8c63fa508f95bd1a04403f1e2c) --- mcs/build/platforms/macos.make | 2 +- mcs/build/profiles/monodroid.make | 2 ++ mcs/build/profiles/monotouch.make | 4 +++- mcs/build/profiles/monotouch_runtime.make | 4 +++- mcs/build/profiles/orbis.make | 4 ++-- mcs/build/profiles/testing_aot_full.make | 2 ++ mcs/build/profiles/winaot.make | 4 ++-- mcs/build/profiles/xammac.make | 2 ++ mcs/class/System.Core/Makefile | 2 -- .../Test/System.Web.Services.Description/ServiceDescriptionTest.cs | 2 +- mcs/class/System/Test/System.Net.Security/SslStreamTest.cs | 2 +- .../System.Security.Cryptography.X509Certificates/X509Cert20Test.cs | 6 +++--- mcs/class/corlib/Makefile | 4 +--- .../X509CertificateTest.cs | 4 ++-- scripts/ci/run-test-mac-sdk.sh | 2 +- sdks/desktop/Makefile | 2 +- sdks/ios/Makefile | 2 +- sdks/wasm/main.cs | 2 +- 18 files changed, 29 insertions(+), 23 deletions(-) diff --git a/mcs/build/platforms/macos.make b/mcs/build/platforms/macos.make index 419f49d0140..0b272b8b1d2 100644 --- a/mcs/build/platforms/macos.make +++ b/mcs/build/platforms/macos.make @@ -6,7 +6,7 @@ PLATFORM_MCS_FLAGS = PLATFORM_RUNTIME = $(RUNTIME) PLATFORM_CORLIB = mscorlib.dll -PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac MacNotWorking +PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac EXTERNAL_MCS = mcs EXTERNAL_MBAS = mbas diff --git a/mcs/build/profiles/monodroid.make b/mcs/build/profiles/monodroid.make index 3ff468cf3f8..4712759d195 100644 --- a/mcs/build/profiles/monodroid.make +++ b/mcs/build/profiles/monodroid.make @@ -38,3 +38,5 @@ NO_CONSOLE = yes ifdef PLATFORM_WIN32 PROFILE_MCS_FLAGS += -d:MOBILE_DESKTOP_HOST -d:WIN_PLATFORM endif + +PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess AndroidNotWorking diff --git a/mcs/build/profiles/monotouch.make b/mcs/build/profiles/monotouch.make index e91db0aebb4..fa63c07bc0a 100644 --- a/mcs/build/profiles/monotouch.make +++ b/mcs/build/profiles/monotouch.make @@ -3,4 +3,6 @@ include $(topdir)/build/profiles/monotouch_runtime.make PROFILE_MCS_FLAGS += \ -d:FULL_AOT_RUNTIME -NO_SRE=1 \ No newline at end of file +NO_SRE = yes + +PROFILE_TEST_HARNESS_EXCLUDES += SRE NotWorkingLinqInterpreter diff --git a/mcs/build/profiles/monotouch_runtime.make b/mcs/build/profiles/monotouch_runtime.make index a05a6aabe98..cde84678bbb 100644 --- a/mcs/build/profiles/monotouch_runtime.make +++ b/mcs/build/profiles/monotouch_runtime.make @@ -39,4 +39,6 @@ NO_CONSOLE = yes PROFILE_DISABLE_BTLS=1 MONO_FEATURE_APPLETLS=1 ONLY_APPLETLS=1 -ENABLE_GSS=1 \ No newline at end of file +ENABLE_GSS=1 + +PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess diff --git a/mcs/build/profiles/orbis.make b/mcs/build/profiles/orbis.make index a3b3947a24c..a32ba8695ef 100644 --- a/mcs/build/profiles/orbis.make +++ b/mcs/build/profiles/orbis.make @@ -40,6 +40,6 @@ MOBILE_PROFILE = yes NO_VTS_TEST = yes NO_CONSOLE = yes PROFILE_DISABLE_BTLS = yes -NO_SRE=1 +NO_SRE = yes -PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS +PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS SRE NotWorkingLinqInterpreter diff --git a/mcs/build/profiles/testing_aot_full.make b/mcs/build/profiles/testing_aot_full.make index bd176be0021..7429dec8c84 100644 --- a/mcs/build/profiles/testing_aot_full.make +++ b/mcs/build/profiles/testing_aot_full.make @@ -14,3 +14,5 @@ NO_SRE = yes ALWAYS_AOT_BCL = yes ALWAYS_AOT_TESTS = yes + +PROFILE_TEST_HARNESS_EXCLUDES += SRE diff --git a/mcs/build/profiles/winaot.make b/mcs/build/profiles/winaot.make index dd40c48b332..58169210b2c 100644 --- a/mcs/build/profiles/winaot.make +++ b/mcs/build/profiles/winaot.make @@ -38,6 +38,6 @@ ALWAYS_AOT_BCL = yes ALWAYS_AOT_TESTS = yes MOBILE_PROFILE = yes NO_VTS_TEST = yes -NO_SRE=1 +NO_SRE = yes -PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS +PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS SRE NotWorkingLinqInterpreter diff --git a/mcs/build/profiles/xammac.make b/mcs/build/profiles/xammac.make index df7ad78b679..3fc70f29f94 100644 --- a/mcs/build/profiles/xammac.make +++ b/mcs/build/profiles/xammac.make @@ -38,3 +38,5 @@ ENABLE_GSS=1 PROFILE_DISABLE_BTLS=1 MONO_FEATURE_APPLETLS=1 ONLY_APPLETLS=1 + +PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS diff --git a/mcs/class/System.Core/Makefile b/mcs/class/System.Core/Makefile index 34df5398bee..9de73edb010 100644 --- a/mcs/class/System.Core/Makefile +++ b/mcs/class/System.Core/Makefile @@ -37,10 +37,8 @@ else MANAGED_INTERP := $(filter orbis winaot monotouch monotouch_tv monotouch_watch, $(PROFILE)) ifdef MANAGED_INTERP LIB_MCS_FLAGS += -d:NO_FEATURE_STATIC_DELEGATE,FEATURE_MAKE_RUN_METHODS - PROFILE_TEST_HARNESS_EXCLUDES := $(PROFILE_TEST_HARNESS_EXCLUDES) NotWorkingLinqInterpreter else LIB_MCS_FLAGS += -d:FEATURE_COMPILE,FEATURE_COMPILE_TO_METHODBUILDER - PROFILE_TEST_HARNESS_EXCLUDES := $(PROFILE_TEST_HARNESS_EXCLUDES) SRE endif endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs index 34d5343747f..3c3ad20130e 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs @@ -26,7 +26,7 @@ namespace MonoTests.System.Web.Services.Description public class ServiceDescriptionTest { [Test] - [Category ("MacNotWorking")] // https://bugzilla.xamarin.com/show_bug.cgi?id=51254 + [Category ("NotOnMac")] // https://bugzilla.xamarin.com/show_bug.cgi?id=51254 public void SimpleWrite () { ServiceDescription sd = new ServiceDescription (); diff --git a/mcs/class/System/Test/System.Net.Security/SslStreamTest.cs b/mcs/class/System/Test/System.Net.Security/SslStreamTest.cs index daad83a288b..efb3672fa7e 100644 --- a/mcs/class/System/Test/System.Net.Security/SslStreamTest.cs +++ b/mcs/class/System/Test/System.Net.Security/SslStreamTest.cs @@ -59,7 +59,7 @@ public class SslStreamTest { } [Test] //bug https://bugzilla.novell.com/show_bug.cgi?id=457120 - [Category ("MacNotWorking")] // Works but launches a prompt on 10.12 that will fail if you don't click in a few seconds + [Category ("NotOnMac")] // Works but launches a prompt on 10.12 that will fail if you don't click in a few seconds [Category ("NotWorking")] // https://github.com/mono/mono/issues/8450 #if FEATURE_NO_BSD_SOCKETS [ExpectedException (typeof (PlatformNotSupportedException))] diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs index 5e097d72282..64d00f3ab7f 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs @@ -582,7 +582,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw== } [Test] - [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 + [Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 [ExpectedException (typeof (CryptographicException))] public void Pkcs12_1_WithoutPassword () { @@ -597,7 +597,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw== } [Test] - [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 + [Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 public void Pkcs12_2_Properties () { CheckPkcs12 (new X509Certificate (farscape_nopwd_pfx)); @@ -729,7 +729,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw== [Test] [ExpectedException (typeof (CryptographicException))] - [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 + [Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 public void Pkcs7_Ctor () { new X509Certificate (farscape_pkcs7); diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index f6f085c465a..243904882a5 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -84,9 +84,7 @@ RESOURCE_FILES = \ REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ENCODINGNLS,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,HAS_CORLIB_CONTRACTS -ifdef NO_SRE -PROFILE_TEST_HARNESS_EXCLUDES := $(PROFILE_TEST_HARNESS_EXCLUDES) SRE -else +ifndef NO_SRE LIB_MCS_FLAGS += -d:MONO_FEATURE_SRE endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs index 764f0b5a8e7..b9f8bb4d30e 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs @@ -494,7 +494,7 @@ public void Certificate6 () // - Bad certificate (will throw an exception) [Test] [Category ("NotWorking")] // this test needs to be reworked -[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 +[Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 public void Certificate7 () { // cannot be loaded - will throw an exception @@ -532,7 +532,7 @@ public void Certificate7 () [Test] [ExpectedException (typeof (CryptographicException))] -[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 +[Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689 public void Certificate7b () { byte[] cert = { 0x30,0x81,0x00,0x30,0x82,0x02,0x08,0xA0,0x03,0x02,0x01,0x02,0x02,0x01,0x02,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,0x05,0x00,0x30,0x58,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x45,0x53,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x09,0x13,0x09,0x43,0x61,0x74,0x61,0x6C,0x75,0x6E,0x79,0x61,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x07,0x13,0x09,0x42,0x61,0x72,0x63,0x65,0x6C,0x6F,0x6E,0x61,0x31,0x0C,0x30,0x0A,0x06,0x03,0x55,0x04,0x0A,0x13,0x03,0x55,0x50,0x43,0x31,0x13,0x30, diff --git a/scripts/ci/run-test-mac-sdk.sh b/scripts/ci/run-test-mac-sdk.sh index de20144b64f..11832420caa 100755 --- a/scripts/ci/run-test-mac-sdk.sh +++ b/scripts/ci/run-test-mac-sdk.sh @@ -13,7 +13,7 @@ zip ${MONO_REPO_ROOT}/msbuild-test-results.zip artifacts/2/TestResults/Release-M # Bundled LLVM cd ${MONO_REPO_ROOT}/external/bockbuild/builds/mono ${TESTCMD} --label="runtime-tests-llvm" --timeout=240m make -C mono/tests -k test-wrench MONO_ENV_OPTIONS=--llvm V=1 M=1 -${TESTCMD} --label="corlib-tests-llvm" --timeout=60m make -C mcs/class/corlib run-test PLATFORM_TEST_HARNESS_EXCLUDES="NotOnMac MacNotWorking LLVMNotWorking" MONO_ENV_OPTIONS=--llvm +${TESTCMD} --label="corlib-tests-llvm" --timeout=60m make -C mcs/class/corlib run-test PLATFORM_TEST_HARNESS_EXCLUDES="NotOnMac LLVMNotWorking" MONO_ENV_OPTIONS=--llvm # Bundled libgdiplus ${TESTCMD} --label="System.Drawing" --timeout=60m make -C mcs/class/System.Drawing run-test diff --git a/sdks/desktop/Makefile b/sdks/desktop/Makefile index 718d0ace5d3..3a533828e01 100644 --- a/sdks/desktop/Makefile +++ b/sdks/desktop/Makefile @@ -2,7 +2,7 @@ TOP=$(realpath $(CURDIR)/../..) include $(TOP)/sdks/paths.mk run: $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll $(TOP)/sdks/out/desktop-x86_64/bin/mono-sgen - MONO_TESTS_IN_PROGRESS="yes" MONO_PATH="$(CURDIR)/../out/desktop-bcl/net_4_x" $(TOP)/sdks/out/desktop-x86_64/bin/mono-sgen --debug $(CURDIR)/../out/desktop-bcl/net_4_x/nunit-lite-console.exe $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll -exclude=NotOnMac,MacNotWorking,NotWorking,CAS -format:nunit2 + MONO_TESTS_IN_PROGRESS="yes" MONO_PATH="$(CURDIR)/../out/desktop-bcl/net_4_x" $(TOP)/sdks/out/desktop-x86_64/bin/mono-sgen --debug $(CURDIR)/../out/desktop-bcl/net_4_x/nunit-lite-console.exe $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll -exclude=NotOnMac,NotWorking,CAS -format:nunit2 .PHONY: $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll $(CURDIR)/net_4_x_Mono.Debugger.Soft_test.dll: $(TOP)/mcs/class/lib/net_4_x/tests/net_4_x_Mono.Debugger.Soft_test.dll diff --git a/sdks/ios/Makefile b/sdks/ios/Makefile index 6b6dc775608..ee50d2cdef5 100644 --- a/sdks/ios/Makefile +++ b/sdks/ios/Makefile @@ -177,7 +177,7 @@ stop-sim: xcrun simctl shutdown $(SIM_NAME) # CONNSTR will be replace by the harness with the real connection string -NUNIT = test-runner.exe CONNSTR -exclude:MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter -labels +NUNIT = test-runner.exe CONNSTR -exclude:MobileNotWorking,NotOnMac,NotWorking,CAS,InetAccess,NotWorkingLinqInterpreter -labels TESTDIR = $(BCL_DIR)/tests # Options for each test diff --git a/sdks/wasm/main.cs b/sdks/wasm/main.cs index f737430bf38..d791312a7d5 100644 --- a/sdks/wasm/main.cs +++ b/sdks/wasm/main.cs @@ -220,7 +220,7 @@ public class Driver { // if (test_name != null) // testRunner.RunTest (test_name); - testRunner.Exclude ("NotWasm,WASM,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingRuntimeInterpreter,MultiThreaded,StackWalk,GetCallingAssembly,LargeFileSupport,MobileNotWorking," + excludes); + testRunner.Exclude ("NotWasm,WASM,NotWorking,CAS,InetAccess,NotWorkingRuntimeInterpreter,MultiThreaded,StackWalk,GetCallingAssembly,LargeFileSupport,MobileNotWorking," + excludes); testRunner.Add (Assembly.LoadFrom (baseDir + "/" + testsuite_name)); // testRunner.RunOnly ("MonoTests.System.Threading.AutoResetEventTest.MultipleSet"); -- 2.11.4.GIT