[bcl] Deprecate old NUnit 2.4 framework shipped with Mono
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 11 Nov 2016 01:55:05 +0000 (02:55 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 13 Nov 2016 13:00:55 +0000 (14:00 +0100)
Print a message when running nunit-console about the deprecation.
Additionally, throw a compilation error if compiling against the
TestFixtureAttribute from old NUnit.

Needed changes in ms-test-suite as well since it was still using NUnit.

acceptance-tests/SUBMODULES.json
acceptance-tests/ms-test-suite.mk
mcs/nunit24/ConsoleRunner/nunit-console-exe/Class1.cs
mcs/nunit24/NUnitFramework/framework/TestFixtureAttribute.cs

index 01faee39c981b1215ef68e84e38aa97446d09c14..9df7b8a5811328aafe3a0a58c0def29cf80ec5bb 100644 (file)
@@ -18,7 +18,7 @@
   {
     "name": "ms-test-suite", 
     "url": "git@github.com:xamarin/ms-test-suite.git", 
-    "rev": "eb7cd709549bffe170653a50805f1593d66ea81e", 
+    "rev": "55b6637eb1de61c743323ec82db1e0cadfee5b32", 
     "remote-branch": "origin/master", 
     "branch": "master", 
     "directory": "ms-test-suite"
@@ -31,4 +31,4 @@
     "branch": "master", 
     "directory": "benchmarker"
   }
-]
+]
\ No newline at end of file
index bd85bd494bd3b5e960de1e90ffc6c07330dbeb88..318fe2c2328c1afea1642f4ca9ada3d1a3b0faf4 100644 (file)
@@ -1,7 +1,7 @@
 check-ms-test-suite:
        @if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:nunit.framework" && \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-console.exe -nologo -exclude=MonoBug,BadTest" NUNIT_XML_RESULT=$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml || EXIT_CODE=1; \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:nunitlite.dll" && \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml" || EXIT_CODE=1; \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug -warn:1" && \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
                exit $$EXIT_CODE; \
index 4c55206a32b037e0e3f1e0da3e5e4b813702e430..ff2129e0ca0e6d86b79e6bf697e2e02ed95d3de8 100644 (file)
@@ -19,6 +19,9 @@ namespace NUnit.ConsoleRunner
                [STAThread]\r
                public static int Main(string[] args)\r
                {\r
+                       Console.ForegroundColor = ConsoleColor.Red;\r
+                       Console.WriteLine ("Note: nunit-console shipped with Mono is deprecated, please use the NUnit NuGet package or some other form of acquiring NUnit.");\r
+                       Console.ResetColor ();\r
                        return Runner.Main( args );\r
                }\r
        }\r
index 06794aa8b128d0533ecc6aedff760cf286f00f61..9fb55fb9d965b19a5f6b84321738cbd96ff886f9 100644 (file)
@@ -14,6 +14,7 @@ namespace NUnit.Framework
        /// {}\r
        /// </example>\r
        [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]\r
+       [Obsolete ("The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.", true)]\r
        public class TestFixtureAttribute : Attribute\r
        {\r
                private string description;\r