New test.
[mono.git] / mono / tests / Makefile.am
index 33102d1521bbdd4cd6643337fa35d4fb1a0af882..a00d850480e6b665407c30949ae75cac852313fb 100644 (file)
@@ -20,17 +20,17 @@ JITTEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mon
 RUNTIME_ARGS=--config tests-config --optimize=all --debug
 
 with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_2_0
-with_mono_path21 = MONO_PATH=$(mcs_topdir)/class/lib/net_2_1_raw
+with_mono_path_moonlight = MONO_PATH=$(mcs_topdir)/class/lib/moonlight_raw
 
 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
-RUNTIME21 = $(with_mono_path21) $(top_builddir)/runtime/mono-wrapper
+RUNTIME_MOONLIGHT = $(with_mono_path_moonlight) $(top_builddir)/runtime/mono-wrapper
 
 MKBUNDLE = \
        PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
        $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/mkbundle.exe
 
 MCS = $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/gmcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
-SMCS = $(RUNTIME21) --runtime=moonlight --security=temporary-smcs-hack $(mcs_topdir)/class/lib/net_2_1_raw/smcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
+SMCS = $(RUNTIME_MOONLIGHT) --runtime=moonlight --security=temporary-smcs-hack $(mcs_topdir)/class/lib/moonlight_raw/smcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
 ILASM = $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/ilasm.exe
 
 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
@@ -250,7 +250,6 @@ BASE_TEST_CS_SRC=           \
        exists.cs               \
        handleref.cs    \
        transparentproxy.cs \
-       make-imt-test.cs \
        dbnull-missing.cs       \
        test-type-ctor.cs       \
        soft-float-tests.cs     \
@@ -364,7 +363,9 @@ BASE_TEST_CS_SRC=           \
        bug-544446.cs   \
        gc-altstack.cs  \
        large-gc-bitmap.cs      \
-       bug-561239.cs
+       bug-561239.cs   \
+       bug-562150.cs
+
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
@@ -528,7 +529,7 @@ test_messages: w32message.exe
        > test_messages.zero
        $(JITTEST_PROG_RUN) w32message.exe >& w32message.allout && cmp test_messages.zero w32message.allout
 
-if INSTALL_2_1
+if MOONLIGHT
 test_2_1 : test-coreclr-security
 else
 test_2_1 :
@@ -583,7 +584,7 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
        failed_tests="";\
        for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do        \
                rm -f $${i}.so; \
-               if [ x$(AOT) = x1 ]; then if echo $(AOT_DISABLED_TESTS) | grep -v -q $${i}; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > /dev/null || exit 1; fi; fi; \
+               if [ x$(AOT) = x1 ]; then if echo $(AOT_DISABLED_TESTS) | grep -v -q $${i}; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; fi; fi; \
                if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
                then \
                        passed=`expr $${passed} + 1`; \
@@ -601,7 +602,7 @@ runtest-managed: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la
        @$(RUNTIME) ./test-runner.exe -j a --disabled '$(DISABLED_TESTS)' $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjit:
-       @$(MAKE) runtest
+       @if test x$(M) != x; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
 
 testaot:
        @$(MAKE) AOT=1 runtest
@@ -750,13 +751,13 @@ bug-382986.exe: bug-382986.cs bug-382986-lib.dll
 
 EXTRA_DIST += coreclr-security.cs
 
-if INSTALL_2_1
+if MOONLIGHT
 coreclr-security.exe : coreclr-security.cs
        $(SMCS) -out:coreclr-security.exe $(srcdir)/coreclr-security.cs
 
 test-coreclr-security : coreclr-security.exe
        @echo "Testing coreclr-security.exe..."
-       @$(RUNTIME21) --security=core-clr-test coreclr-security.exe
+       @$(RUNTIME_MOONLIGHT) --security=core-clr-test coreclr-security.exe
 endif
 
 EXTRA_DIST += generic-unboxing.2.il
@@ -786,7 +787,8 @@ gshared: test-generic-sharing
 gshared-aot:
        @$(MAKE) AOT=1 gshared
 
-test-generic-sharing : generics-sharing.2.exe shared-generic-methods.2.exe     \
+GSHARED_TESTS = \
+               generics-sharing.2.exe shared-generic-methods.2.exe     \
                shared-generic-synchronized.2.exe generic-initobj.2.exe         \
                generics-sharing-other-exc.2.exe generic-box.2.exe              \
                generic-unbox.2.exe generic-delegate.2.exe generic-sizeof.2.exe \
@@ -811,6 +813,8 @@ test-generic-sharing : generics-sharing.2.exe shared-generic-methods.2.exe  \
                bug-472600.2.exe bug-473482.2.exe bug-473999.2.exe              \
                bug-479763.2.exe generic-xdomain.2.exe                          \
                generic-type-load-exception.2.exe
+
+test-generic-sharing-normal: $(GSHARED_TESTS)
        @for fn in $+ ; do      \
                echo "Testing $$fn ...";        \
                MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared                $$fn > $$fn.stdout || exit 1;     \
@@ -820,6 +824,12 @@ test-generic-sharing : generics-sharing.2.exe shared-generic-methods.2.exe \
                if [ x$(AOT) = x1 ]; then MONO_GENERIC_SHARING=all $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $$fn > /dev/null || exit 1; MONO_GENERIC_SHARING=all $(RUNTIME) $$fn > $$fn.stdout || exit 1; fi; \
        done
 
+test-generic-sharing-managed: test-runner.exe $(GSHARED_TESTS)
+       @$(RUNTIME) ./test-runner.exe -j a --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(GSHARED_TESTS)
+
+test-generic-sharing:
+       @if test x$(M) != x; then $(MAKE) test-generic-sharing-managed; else $(MAKE) test-generic-sharing-normal; fi
+
 EXTRA_DIST += async-exceptions.cs
 async-exceptions.exe : async-exceptions.cs
        $(MCS) -out:async-exceptions.exe $(srcdir)/async-exceptions.cs
@@ -869,4 +879,4 @@ endif
 libtest_la_SOURCES = libtest.c
 libtest_la_LIBADD = $(glib_libs)
 
-CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.exe stest.dat
+CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.aotlog *.exe stest.dat