Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2017-11-16 04:50:43 +0300
committerLudovic Henry <luhenry@microsoft.com>2017-11-16 04:50:43 +0300
commitbcaca2dbafcfaad7096ff9fe64bcf81e4d9bddb5 (patch)
treee9ee286c5f065031a96aa4ef1c4786723cbf989d /mcs
parent401ed4d16c161de39c8105b25ddff52a614cc244 (diff)
[bcl] Add a Mono.Runtime.Tests assembly which can be used to run the JIT regression tests using nunit. (#6015)
Diffstat (limited to 'mcs')
-rw-r--r--mcs/build/tests.make5
-rw-r--r--mcs/class/Makefile1
-rw-r--r--mcs/class/Mono.Runtime.Tests/Makefile16
-rw-r--r--mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests.dll.sources0
-rw-r--r--mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests_test.dll.sources23
-rw-r--r--mcs/class/Mono.Runtime.Tests/Test/JitTests.cs82
6 files changed, 126 insertions, 1 deletions
diff --git a/mcs/build/tests.make b/mcs/build/tests.make
index 5d3796be7af..0de56b3debe 100644
--- a/mcs/build/tests.make
+++ b/mcs/build/tests.make
@@ -51,7 +51,10 @@ test_sourcefile_excludes = $(test_lib).exclude.sources
test_pdb = $(test_lib:.dll=.pdb)
test_response = $(depsdir)/$(test_lib).response
test_makefrag = $(depsdir)/$(test_lib).makefrag
-test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
+test_flags = $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
+ifndef NO_BUILD
+test_flags += -r:$(the_assembly)
+endif
tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index cdd2706e345..57fa33adaa3 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -335,6 +335,7 @@ net_4_x_parallel_dirs := \
System.Workflow.Runtime \
System.Reflection.Context \
Mono.Profiler.Log \
+ Mono.Runtime.Tests \
legacy/Mono.Cecil \
$(pcl_facade_dirs)
diff --git a/mcs/class/Mono.Runtime.Tests/Makefile b/mcs/class/Mono.Runtime.Tests/Makefile
new file mode 100644
index 00000000000..dddaf4a4124
--- /dev/null
+++ b/mcs/class/Mono.Runtime.Tests/Makefile
@@ -0,0 +1,16 @@
+thisdir = class/Mono.Runtime.Tests
+SUBDIRS =
+include ../../build/rules.make
+
+#
+# This directory is used to run the JIT regression tests in mini/ using the
+# standard nunit-lite test runner.
+#
+LIBRARY = Mono.Runtime.Tests.dll
+NO_BUILD = 1
+NO_INSTALL = 1
+LIB_REFS = System System.Core System.Numerics System.Numerics.Vectors Mono.Simd
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -unsafe -d:__MOBILE__ -nowarn:CS0169,CS0649,CS0414,CS0618,CS0219,CS0168
+
+include ../../build/library.make
+
diff --git a/mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests.dll.sources b/mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests.dll.sources
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests.dll.sources
diff --git a/mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests_test.dll.sources b/mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests_test.dll.sources
new file mode 100644
index 00000000000..022dc9bee17
--- /dev/null
+++ b/mcs/class/Mono.Runtime.Tests/Mono.Runtime.Tests_test.dll.sources
@@ -0,0 +1,23 @@
+JitTests.cs
+../../../../mono/mini/TestDriver.cs
+../../../../mono/mini/basic.cs
+../../../../mono/mini/basic-calls.cs
+../../../../mono/mini/basic-long.cs
+../../../../mono/mini/bench.cs
+../../../../mono/mini/builtin-types.cs
+../../../../mono/mini/objects.cs
+../../../../mono/mini/arrays.cs
+../../../../mono/mini/basic-float.cs
+../../../../mono/mini/basic-math.cs
+../../../../mono/mini/basic.cs
+../../../../mono/mini/exceptions.cs
+../../../../mono/mini/devirtualization.cs
+../../../../mono/mini/generics.cs
+../../../../mono/mini/basic-simd.cs
+../../../../mono/mini/basic-vectors.cs
+../../../../mono/mini/aot-tests.cs
+../../../../mono/mini/gc-test.cs
+../../../../mono/mini/gshared.cs
+
+
+
diff --git a/mcs/class/Mono.Runtime.Tests/Test/JitTests.cs b/mcs/class/Mono.Runtime.Tests/Test/JitTests.cs
new file mode 100644
index 00000000000..e490e9ab09a
--- /dev/null
+++ b/mcs/class/Mono.Runtime.Tests/Test/JitTests.cs
@@ -0,0 +1,82 @@
+using System;
+using NUnit.Framework;
+
+//
+// This test suite is used to run the JIT regression tests using nunit
+//
+
+namespace MonoTests.Runtime {
+
+[TestFixture]
+public class JitTests {
+ static string[] args = new string[] { "--exclude", "!FULLAOT", "--verbose" };
+
+ [Test]
+ public void Basic () {
+ Console.WriteLine ("AAA");
+ int res = TestDriver.RunTests (typeof (BasicTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Arrays () {
+ int res = TestDriver.RunTests (typeof (ArrayTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Calls () {
+ int res = TestDriver.RunTests (typeof (CallsTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Float () {
+ int res = TestDriver.RunTests (typeof (FloatTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Long () {
+ int res = TestDriver.RunTests (typeof (LongTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Math () {
+ int res = TestDriver.RunTests (typeof (MathTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Objects () {
+ int res = TestDriver.RunTests (typeof (ObjectTests.Tests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Generics () {
+ int res = TestDriver.RunTests (typeof (GenericsTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void GShared () {
+ int res = TestDriver.RunTests (typeof (GSharedTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Exceptions () {
+ int res = TestDriver.RunTests (typeof (ExceptionTests), args);
+ Assert.AreEqual (0, res);
+ }
+
+ [Test]
+ public static void Aot () {
+ int res = TestDriver.RunTests (typeof (AotTests), args);
+ Assert.AreEqual (0, res);
+ }
+}
+
+}