Merge pull request #2338 from BogdanovKirill/httpwritefix3
[mono.git] / mono / tests / Makefile.am
index 735511fb60f9d92536a8848ab8995aa8d025622d..f784c41bfdcb5254988f24156497a91607202c97 100644 (file)
@@ -1,9 +1,12 @@
 SUBDIRS = assemblyresolve gc-descriptors
 
-check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-cattr-type-load test-reflection-load-with-context test_platform test-process-exit test-messages rm-empty-logs
+check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-cattr-type-load test-reflection-load-with-context test_platform test-process-exit test-messages test-env-options test-unhandled-exception-2 test-appdomain-unload rm-empty-logs
 check-full: test-sgen check-local
 check-parallel: compile-tests check-full
 
+check-coreclr:
+       $(MAKE) -C $(mono_build_root)/acceptance-tests check-coreclr
+
 # for backwards compatibility on Wrench
 test-wrench: check-parallel
 
@@ -18,19 +21,21 @@ JITTEST_PROG_RUN = MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode
 
 RUNTIME_ARGS=--config tests-config --optimize=all --debug
 
-with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_4_5
+CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
+
+with_mono_path = MONO_PATH=$(CLASS)
 
 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
 
 MKBUNDLE = \
        PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
-       $(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/mkbundle.exe
+       $(RUNTIME) $(CLASS)/mkbundle.exe
 
 MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -debug \
        -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
        -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
        -nowarn:0197
-ILASM = $(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/ilasm.exe
+ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
 
 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
 
@@ -182,6 +187,8 @@ BASE_TEST_CS_SRC=           \
        delegate9.cs            \
        delegate10.cs           \
        delegate11.cs           \
+       delegate12.cs           \
+       delegate13.cs           \
        remoting1.cs            \
        remoting2.cs            \
        remoting3.cs            \
@@ -329,6 +336,7 @@ BASE_TEST_CS_SRC=           \
        bug-80392.2.cs          \
        dynamic-method-access.2.cs      \
        dynamic-method-finalize.2.cs    \
+       dynamic-method-stack-traces.cs  \
        bug-82194.2.cs  \
        anonarray.2.cs  \
        ienumerator-interfaces.2.cs     \
@@ -413,7 +421,12 @@ BASE_TEST_CS_SRC=          \
        sleep.cs \
        bug-27147.cs    \
        bug-30085.cs    \
-       bug-17537.cs
+       bug-17537.cs    \
+       pinvoke_ppcc.cs \
+       pinvoke_ppcs.cs \
+       pinvoke_ppci.cs \
+       pinvoke_ppcf.cs \
+       pinvoke_ppcd.cs
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
@@ -460,8 +473,8 @@ PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-ex
 endif
 
 if POWERPC64
-# These tests hang
-PLATFORM_DISABLED_TESTS=monitor.exe finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
+# FIXME: These tests hang/fail for unknown reasons
+PLATFORM_DISABLED_TESTS=monitor.exe threadpool-exceptions5.exe
 endif
 
 if ARM
@@ -602,6 +615,7 @@ TEST_IL_SRC=                        \
        cpblkTest.il            \
        vbinterface.il          \
        calliTest.il            \
+       calliGenericTest.il             \
        ckfiniteTest.il         \
        fault-handler.il                \
        locallocTest.il         \
@@ -741,6 +755,9 @@ test-messages: w32message.exe
 endif
 endif
 
+test-env-options:
+       MONO_ENV_OPTIONS="--version" $(RUNTIME) array-init.exe | grep -q Architecture:
+
 if AMD64
 test-sgen : sgen-tests
 else
@@ -851,7 +868,11 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
 
 runtest-managed: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
        @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
-       $(RUNTIME) ./test-runner.exe -j a --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+       $(RUNTIME) ./test-runner.exe -j a --testsuite-name "runtime" --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
+
+runtest-managed-serial: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
+       @if [ "x$$CI" = "x1" ]; then disabled_tests="$(DISABLED_TESTS_WRENCH)"; else disabled_tests="$(DISABLED_TESTS)"; fi; \
+       $(RUNTIME) ./test-runner.exe -j 1 --testsuite-name "runtime" --disabled "$${disabled_tests}" $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
 
 testjit:
        @if test x$(M) != x0; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
@@ -945,6 +966,7 @@ SGEN_TESTS =        \
        sgen-descriptors.exe    \
        sgen-gshared-vtype.exe  \
        sgen-domain-unload.exe  \
+       sgen-domain-unload-2.exe        \
        sgen-weakref-stress.exe \
        sgen-cementing-stress.exe       \
        sgen-case-23400.exe     \
@@ -1092,7 +1114,7 @@ test-aot:
        @failed=0; \
        passed=0; \
        failed_tests="";\
-       profile=net_4_5;        \
+       profile=$(DEFAULT_PROFILE);     \
        tmpfile=`mktemp -t mono_aot_output` || exit 1;  \
        rm -f test-aot-$${name}.stdout test-aot-$${name}.stderr; \
        for assembly in $(mcs_topdir)/class/lib/$$profile/*.dll ; do    \
@@ -1294,7 +1316,7 @@ test-generic-sharing-normal: $(GSHARED_TESTS)
        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)
+       @$(RUNTIME) ./test-runner.exe -j a --testsuite-name "gshared" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(GSHARED_TESTS)
 
 if NACL_CODEGEN
 test-generic-sharing:
@@ -1347,10 +1369,43 @@ test-oom: $(OOM_TESTS)
                MONO_GC_PARAMS=max-heap-size=16m                                                  $(RUNTIME) $$fn > $$fn.stdout || exit 1;      \
        done
 
+if HOST_WIN32
+test-unhandled-exception-2:
+else
+test-unhandled-exception-2: test-unhandled-exception-2-1 test-unhandled-exception-2-2 test-unhandled-exception-2-3 test-unhandled-exception-2-4        \
+                test-unhandled-exception-2-5 test-unhandled-exception-2-6 test-unhandled-exception-2-7 test-unhandled-exception-2-8
+
+test-unhandled-exception-2-1: unhandled-exception-1.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 1 $<
+test-unhandled-exception-2-2: unhandled-exception-2.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 0 $<
+test-unhandled-exception-2-3: unhandled-exception-3.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 255 $<
+test-unhandled-exception-2-4: unhandled-exception-4.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 0 $<
+test-unhandled-exception-2-5: unhandled-exception-5.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 255 $<
+test-unhandled-exception-2-6: unhandled-exception-6.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 0 $<
+test-unhandled-exception-2-7: unhandled-exception-7.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 0 $<
+test-unhandled-exception-2-8: unhandled-exception-8.exe test-runner.exe
+       @$(RUNTIME) ./test-runner.exe --testsuite-name $@ --expected-exit-code 3 $<
+endif
+
+EXTRA_DIST += appdomain-loader.cs appdomain-tester.cs
+test-appdomain-unload: appdomain-loader.exe appdomain-tester.exe
+       $(RUNTIME) -O=gshared appdomain-loader.exe > appdomain-loader.exe.1.stdout || exit 1;
+       $(RUNTIME) appdomain-loader.exe > appdomain-loader.exe.2.stdout || exit 1;
+       MONO_DEBUG_ASSEMBLY_UNLOAD=1 $(RUNTIME) -O=gshared appdomain-loader.exe > appdomain-loader.exe.3.stdout || exit 1;
+       MONO_DEBUG_ASSEMBLY_UNLOAD=1 $(RUNTIME) appdomain-loader.exe > appdomain-loader.exe.4.stdout || exit 1;
+
+coreclr-gcstress:
+       $(MAKE) -C $(mono_build_root)/acceptance-tests coreclr-gcstress
 
 noinst_LTLIBRARIES = libtest.la
 
-AM_CPPFLAGS = $(GLIB_CFLAGS) $(GMODULE_CFLAGS)
+AM_CPPFLAGS = $(GLIB_CFLAGS)
 
 if HOST_WIN32
 # gcc-3.4.4 emits incorrect code when making indirect calls to stdcall functions using a tail call