[tests] Use test runner for test-internalsvisibleto
[mono.git] / mono / tests / Makefile.am
1 SUBDIRS = gc-descriptors . testing_gac
2
3 check-local:
4         ok=:; \
5         $(MAKE) test-jit || ok=false; \
6         $(MAKE) test-generic-sharing || ok=false; \
7         $(MAKE) test-type-load || ok=false; \
8         $(MAKE) test-multi-netmodule || ok=false; \
9         $(MAKE) test-cattr-type-load || ok=false; \
10         $(MAKE) test-reflection-load-with-context || ok=false; \
11         $(MAKE) test-platform || ok=false; \
12         $(MAKE) test-console-output || ok=false; \
13         $(MAKE) test-env-options || ok=false; \
14         $(MAKE) test-unhandled-exception-2 || ok=false; \
15         $(MAKE) test-appdomain-unload || ok=false; \
16         $(MAKE) test-process-stress || ok=false; \
17         $(MAKE) test-pedump || ok=false; \
18         $(MAKE) test-internalsvisibleto || ok=false; \
19         $(MAKE) rm-empty-logs || ok=false; \
20         $(MAKE) runtest-gac-loading || ok=false; \
21         $$ok
22
23 check-full:
24         ok=; \
25         $(MAKE) test-sgen || ok=false; \
26         $(MAKE) check-local || ok=false; \
27         $$ok
28
29 check-parallel:
30         ok=; \
31         $(MAKE) compile-tests; \
32         $(MAKE) check-full || ok=false; \
33         $$ok
34
35 check-coreclr:
36         $(MAKE) -C $(mono_build_root)/acceptance-tests check-coreclr
37
38 check-stress:
39         $(MAKE) test-stress-sgen
40
41 # for backwards compatibility on Wrench
42 test-wrench: check-parallel
43
44 aotcheck: testaot gshared-aot
45
46 JITTEST_PROG = $(if $(VALGRIND), valgrind $(VALGRIND_ARGS),) $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/mono/mini/mono)
47
48 JITTEST_PROG_RUN = MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(JITTEST_PROG)
49
50
51 RUNTIME_ARGS=--config tests-config --optimize=all --debug
52
53 CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
54
55 with_mono_path = MONO_PATH=$(CLASS)
56
57 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
58 TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build
59
60 MKBUNDLE = \
61         PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
62         $(RUNTIME) $(CLASS)/mkbundle.exe
63
64 if FULL_AOT_TESTS
65 PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP 
66 endif
67
68 if HYBRID_AOT_TESTS
69 PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY 
70 endif
71
72 MCS_NO_LIB = $(TOOLS_RUNTIME) $(CSC) -unsafe -debug:portable \
73         -noconfig -nologo \
74         -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
75         -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
76         -nowarn:0197 $(PROFILE_MCS_FLAGS)
77
78 MCS = $(MCS_NO_LIB)
79
80 ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe
81
82 TEST_RUNNER = ./test-runner.exe --runtime $(top_builddir)/runtime/mono-wrapper --mono-path "$(CLASS)"
83
84 if FULL_AOT_TESTS
85 TEST_RUNNER += --runtime-args "$(AOT_RUN_FLAGS)"
86 endif
87
88 if HYBRID_AOT_TESTS
89 TEST_RUNNER += --runtime-args "$(AOT_RUN_FLAGS)"
90 endif
91
92 if HOST_WIN32
93 TEST_RUNNER += --config tests-config --runtime $(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),mono)
94 else
95 TEST_RUNNER += --config tests-config --runtime $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono)
96 endif
97
98 TEST_RUNNER += $(if $(V), --verbose,)
99
100 TESTS_BENCH_SRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
101
102 TESTS_STRESS_SRC=       \
103         abort-stress-1.cs       \
104         abort-stress-2.cs       \
105         abort-stress-3.cs       \
106         domain-stress.cs        \
107         gchandle-stress.cs      \
108         monitor-stress.cs       \
109         thread-stress.cs        \
110         gc-stress.cs            \
111         gc-copy-stress.cs       \
112         gc-graystack-stress.cs          \
113         exit-stress.cs          \
114         process-stress.cs       \
115         assembly-load-stress.cs
116
117 # Disabled until ?mcs is fixed
118 #       bug-331958.cs
119 TESTS_CS_SRC=           \
120         generic-unloading-sub.2.cs      \
121         create-instance.cs      \
122         bug-2907.cs             \
123         array-init.cs           \
124         arraylist.cs            \
125         assembly-load-remap.cs  \
126         assemblyresolve_event.cs        \
127         assemblyresolve_event3.cs       \
128         assemblyresolve_event4.cs       \
129         assemblyresolve_event5.cs       \
130         checked.cs              \
131         char-isnumber.cs        \
132         field-layout.cs         \
133         pack-layout.cs          \
134         pack-bug.cs             \
135         hash-table.cs           \
136         test-ops.cs             \
137         obj.cs                  \
138         test-dup-mp.cs          \
139         string.cs               \
140         stringbuilder.cs        \
141         switch.cs               \
142         outparm.cs              \
143         delegate.cs             \
144         bitconverter.cs         \
145         exception.cs            \
146         exception2.cs           \
147         exception3.cs           \
148         exception4.cs           \
149         exception5.cs           \
150         exception6.cs           \
151         exception7.cs           \
152         exception8.cs           \
153         exception10.cs          \
154         exception11.cs          \
155         exception12.cs          \
156         exception13.cs          \
157         exception14.cs          \
158         exception15.cs          \
159         exception16.cs          \
160         exception17.cs          \
161         exception18.cs          \
162         typeload-unaligned.cs   \
163         struct.cs               \
164         valuetype-gettype.cs    \
165         typeof-ptr.cs           \
166         static-constructor.cs   \
167         pinvoke.cs              \
168         pinvoke-utf8.cs         \
169         pinvoke3.cs             \
170         pinvoke11.cs            \
171         pinvoke13.cs            \
172         pinvoke17.cs            \
173         invoke.cs               \
174         invoke2.cs              \
175         runtime-invoke.cs               \
176         invoke-string-ctors.cs          \
177         reinit.cs               \
178         box.cs                  \
179         array.cs                \
180         enum.cs                 \
181         enum2.cs                \
182         enum-intrins.cs         \
183         property.cs             \
184         enumcast.cs             \
185         assignable-tests.cs     \
186         array-cast.cs           \
187         array-subtype-attr.cs   \
188         cattr-compile.cs        \
189         cattr-field.cs          \
190         cattr-object.cs         \
191         custom-attr.cs          \
192         double-cast.cs          \
193         newobj-valuetype.cs     \
194         arraylist-clone.cs      \
195         setenv.cs               \
196         vtype.cs                \
197         isvaluetype.cs          \
198         iface6.cs               \
199         iface7.cs               \
200         ipaddress.cs            \
201         array-vt.cs             \
202         interface1.cs           \
203         reflection-enum.cs      \
204         reflection-prop.cs      \
205         reflection4.cs          \
206         reflection5.cs          \
207         reflection-const-field.cs \
208         many-locals.cs          \
209         string-compare.cs       \
210         test-prime.cs           \
211         test-tls.cs             \
212         params.cs               \
213         reflection.cs           \
214         interface.cs            \
215         iface.cs                \
216         iface2.cs               \
217         iface3.cs               \
218         iface4.cs               \
219         iface-large.cs          \
220         virtual-method.cs       \
221         intptrcast.cs           \
222         indexer.cs              \
223         stream.cs               \
224         console.cs              \
225         shift.cs                \
226         jit-int.cs              \
227         jit-uint.cs             \
228         jit-long.cs             \
229         long.cs                 \
230         jit-ulong.cs            \
231         jit-float.cs            \
232         pop.cs                  \
233         time.cs                 \
234         pointer.cs              \
235         hashcode.cs             \
236         delegate1.cs            \
237         delegate2.cs            \
238         delegate3.cs            \
239         delegate5.cs            \
240         delegate6.cs            \
241         delegate7.cs            \
242         delegate8.cs            \
243         delegate10.cs           \
244         delegate11.cs           \
245         delegate12.cs           \
246         delegate13.cs           \
247         largeexp.cs             \
248         largeexp2.cs            \
249         marshalbyref1.cs        \
250         static-ctor.cs          \
251         inctest.cs              \
252         bound.cs                \
253         array-invoke.cs         \
254         test-arr.cs             \
255         decimal.cs              \
256         decimal-array.cs        \
257         marshal.cs              \
258         marshal1.cs             \
259         marshal2.cs             \
260         marshal3.cs             \
261         marshal5.cs             \
262         marshal6.cs             \
263         marshal7.cs             \
264         marshal8.cs             \
265         marshal9.cs             \
266         marshalbool.cs          \
267         test-byval-in-struct.cs \
268         thread.cs               \
269         thread5.cs              \
270         thread-static.cs        \
271         thread-static-init.cs   \
272         context-static.cs       \
273         float-pop.cs            \
274         interfacecast.cs        \
275         array3.cs               \
276         classinit.cs            \
277         classinit2.cs           \
278         classinit3.cs           \
279         synchronized.cs         \
280         async_read.cs           \
281         threadpool.cs           \
282         threadpool1.cs          \
283         threadpool-exceptions1.cs \
284         threadpool-exceptions2.cs \
285         threadpool-exceptions3.cs \
286         threadpool-exceptions4.cs \
287         threadpool-exceptions5.cs \
288         threadpool-exceptions6.cs \
289         base-definition.cs      \
290         bug-27420.cs            \
291         bug-46781.cs            \
292         bug-42136.cs            \
293         bug-59286.cs            \
294         bug-70561.cs            \
295         bug-78311.cs            \
296         bug-78653.cs            \
297         bug-78656.cs            \
298         bug-77127.cs            \
299         bug-323114.cs           \
300         bug-Xamarin-5278.cs     \
301         interlocked.cs          \
302         delegate-async-exit.cs  \
303         delegate-delegate-exit.cs       \
304         delegate-exit.cs        \
305         finalizer-abort.cs      \
306         finalizer-exception.cs  \
307         finalizer-exit.cs       \
308         finalizer-thread.cs     \
309         main-exit.cs    \
310         main-returns-abort-resetabort.cs        \
311         main-returns-background-abort-resetabort.cs     \
312         main-returns-background-resetabort.cs   \
313         main-returns-background.cs      \
314         main-returns-background-change.cs       \
315         main-returns.cs         \
316         subthread-exit.cs       \
317         desweak.cs              \
318         exists.cs               \
319         handleref.cs    \
320         dbnull-missing.cs       \
321         test-type-ctor.cs       \
322         soft-float-tests.cs     \
323         thread-exit.cs          \
324         finalize-parent.cs      \
325         interlocked-2.2.cs      \
326         pinvoke-2.2.cs          \
327         bug-78431.2.cs          \
328         bug-79684.2.cs          \
329         catch-generics.2.cs     \
330         event-get.2.cs          \
331         safehandle.2.cs         \
332         module-cctor-loader.2.cs        \
333         generics-invoke-byref.2.cs      \
334         generic-signature-compare.2.cs  \
335         generics-sharing.2.cs   \
336         shared-generic-methods.2.cs     \
337         shared-generic-synchronized.2.cs        \
338         generic-inlining.2.cs   \
339         generic-initobj.2.cs    \
340         generic-delegate.2.cs   \
341         generic-sizeof.2.cs     \
342         generic-virtual.2.cs    \
343         generic-interface-methods.2.cs  \
344         generic-array-type.2.cs \
345         generic-method-patching.2.cs    \
346         generic-static-methods.2.cs     \
347         generic-null-call.2.cs  \
348         generic-special.2.cs    \
349         generic-special2.2.cs   \
350         generic-exceptions.2.cs \
351         generic-virtual2.2.cs   \
352         generic-valuetype-interface.2.cs        \
353         generic-getgenericarguments.2.cs        \
354         generic-synchronized.2.cs       \
355         generic-delegate-ctor.2.cs      \
356         generic-array-iface-set.2.cs    \
357         generic-typedef.2.cs    \
358         bug-431413.2.cs \
359         bug-459285.2.cs \
360         generic-virtual-invoke.2.cs     \
361         bug-461198.2.cs \
362         generic-sealed-virtual.2.cs     \
363         generic-system-arrays.2.cs      \
364         generic-stack-traces.2.cs       \
365         generic-stack-traces2.2.cs      \
366         bug-472600.2.cs \
367         recursive-generics.2.cs \
368         bug-473482.2.cs \
369         bug-473999.2.cs \
370         bug-479763.2.cs \
371         bug-616463.cs   \
372         bug-80392.2.cs          \
373         bug-82194.2.cs  \
374         anonarray.2.cs  \
375         ienumerator-interfaces.2.cs     \
376         array-enumerator-ifaces.2.cs    \
377         generic_type_definition_encoding.2.cs \
378         bug-333798.2.cs         \
379         bug-348522.2.cs         \
380         bug-340662_bug.cs       \
381         bug-325283.2.cs \
382         thunks.cs \
383         winx64structs.cs \
384         nullable_boxing.2.cs    \
385         valuetype-equals.cs     \
386         custom-modifiers.2.cs   \
387         bug-382986.cs   \
388         test-inline-call-stack.cs       \
389         bug-324535.cs   \
390         modules.cs      \
391         bug-81673.cs    \
392         bug-81691.cs    \
393         bug-415577.cs   \
394         filter-stack.cs \
395         vararg.cs       \
396         vararg2.cs      \
397         bug-461867.cs   \
398         bug-461941.cs   \
399         bug-461261.cs   \
400         bug-400716.cs   \
401         bug-459094.cs   \
402         bug-467456.cs   \
403         bug-508538.cs   \
404         bug-472692.2.cs         \
405         gchandles.cs    \
406         interlocked-3.cs        \
407         interlocked-4.2.cs      \
408         w32message.cs   \
409         gc-altstack.cs  \
410         large-gc-bitmap.cs      \
411         bug-561239.cs   \
412         bug-562150.cs   \
413         bug-599469.cs   \
414         monitor-resurrection.cs \
415         monitor-wait-abort.cs   \
416         monitor-abort.cs        \
417         bug-666008.cs   \
418         bug-685908.cs   \
419         sgen-long-vtype.cs      \
420         delegate-invoke.cs      \
421         bug-696593.cs   \
422         bug-705140.cs   \
423         bug-1147.cs     \
424         mono-path.cs    \
425         bug-bxc-795.cs  \
426         bug-3903.cs     \
427         async-with-cb-throws.cs \
428         bug-6148.cs     \
429         bug-10127.cs    \
430         bug-18026.cs    \
431         allow-synchronous-major.cs      \
432         block_guard_restore_aligment_on_exit.cs \
433         thread_static_gc_layout.cs \
434         sleep.cs \
435         bug-27147.cs    \
436         bug-30085.cs    \
437         bug-17537.cs    \
438         pinvoke_ppcc.cs \
439         pinvoke_ppcs.cs \
440         pinvoke_ppci.cs \
441         pinvoke_ppcf.cs \
442         pinvoke_ppcd.cs \
443         bug-29585.cs    \
444         priority.cs     \
445         abort-cctor.cs  \
446         thread-native-exit.cs \
447         reference-loader.cs \
448         thread-suspend-suspended.cs \
449         thread-suspend-selfsuspended.cs \
450         remoting4.cs    \
451         remoting1.cs    \
452         remoting2.cs    \
453         remoting3.cs    \
454         remoting5.cs    \
455         appdomain.cs    \
456         appdomain-client.cs     \
457         appdomain-unload.cs     \
458         appdomain-async-invoke.cs       \
459         appdomain-thread-abort.cs       \
460         appdomain1.cs   \
461         appdomain2.cs   \
462         appdomain-exit.cs       \
463         appdomain-serialize-exception.cs \
464         assemblyresolve_event2.2.cs     \
465         appdomain-unload-callback.cs    \
466         appdomain-unload-doesnot-raise-pending-events.cs        \
467         appdomain-unload-asmload.cs     \
468         unload-appdomain-on-shutdown.cs \
469         bug-47295.cs    \
470         loader.cs       \
471         pinvoke2.cs     \
472         generic-type-builder.2.cs       \
473         dynamic-generic-size.cs \
474         cominterop.cs   \
475         dynamic-method-access.2.cs      \
476         dynamic-method-finalize.2.cs    \
477         dynamic-method-stack-traces.cs  \
478         generic_type_definition.2.cs    \
479         bug-333798-tb.2.cs      \
480         bug-335131.2.cs \
481         bug-322722_patch_bx.2.cs        \
482         bug-322722_dyn_method_throw.2.cs        \
483         bug-389886-2.cs \
484         bug-349190.2.cs \
485         bug-389886-sre-generic-interface-instances.cs   \
486         bug-462592.cs   \
487         bug-575941.cs   \
488         bug-389886-3.cs \
489         constant-division.cs    \
490         dynamic-method-resurrection.cs  \
491         bug-80307.cs    \
492         assembly_append_ordering.cs     \
493         bug-544446.cs   \
494         bug-36848.cs    \
495         generic-marshalbyref.2.cs       \
496         stackframes-async.2.cs  \
497         transparentproxy.cs     \
498         bug-48015.cs    \
499         delegate9.cs    \
500         marshal-valuetypes.cs   \
501         xdomain-threads.cs      \
502         monitor.cs      \
503         generic-xdomain.2.cs    \
504         threadpool-exceptions7.cs       \
505         cross-domain.cs \
506         generic-unloading.2.cs  \
507         namedmutex-destroy-race.cs      \
508         thread6.cs      \
509         appdomain-threadpool-unload.cs  \
510         process-unref-race.cs   \
511         bug-46661.cs    \
512         w32message.cs \
513         runtime-invoke.gen.cs \
514         imt_big_iface_test.cs
515
516 if AMD64
517 TESTS_CS_SRC += async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs
518 endif
519
520 if X86
521 TESTS_CS_SRC += async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs
522 endif
523
524 TESTS_IL_SRC=                   \
525         field-access.il         \
526         method-access.il        \
527         ldftn-access.il         \
528         cpblkTest.il            \
529         vbinterface.il          \
530         calliTest.il            \
531         calliGenericTest.il             \
532         ckfiniteTest.il         \
533         fault-handler.il                \
534         locallocTest.il         \
535         initblkTest.il          \
536         qt-instance.il          \
537         vararg.il               \
538         bug-29859.il            \
539         bug-78549.il            \
540         static-fields-nonconst.il       \
541         reload-at-bb-end.il     \
542         test-enum-indstoreil.il \
543         filter-bug.il           \
544         even-odd.il             \
545         bug-82022.il    \
546         vt-sync-method.il       \
547         enum_types.il   \
548         invalid-token.il        \
549         call_missing_method.il  \
550         call_missing_class.il   \
551         ldfld_missing_field.il  \
552         ldfld_missing_class.il  \
553         find-method.2.il        \
554         bug-79215.2.il  \
555         bug-79956.2.il  \
556         bug-327438.2.il \
557         bug-387274.2.il \
558         bug-426309.2.il \
559         ldtoken_with_byref_typespec.2.il \
560         resolve_method_bug.2.il \
561         resolve_field_bug.2.il \
562         resolve_type_bug.2.il   \
563         generics-sharing-other-exc.2.il \
564         generic-ldobj.2.il      \
565         generic-mkrefany.2.il   \
566         generic-refanyval.2.il  \
567         generic-ldtoken.2.il    \
568         generic-ldtoken-method.2.il     \
569         generic-ldtoken-field.2.il      \
570         generic-tailcall.2.il   \
571         generic-tailcall2.2.il  \
572         generic-array-exc.2.il  \
573         generic-valuetype-newobj2.2.il  \
574         generic-valuetype-newobj.2.il   \
575         generic-constrained.2.il        \
576         generic-type-load-exception.2.il        \
577         bug-81466.il    \
578         bug457574.il    \
579         bug445361.il    \
580         bug-463303.il   \
581         bug469742.2.il  \
582         bug-528055.il   \
583         array_load_exception.il \
584         bug-481403.il   \
585         interface-with-static-method.il \
586         bug-633291.il   \
587         delegate-with-null-target.il    \
588         bug-318677.il   \
589         gsharing-valuetype-layout.il    \
590         invalid_generic_instantiation.il \
591         bug-45841-fpstack-exceptions.il \
592         instance_tailrec.il
593
594 TESTS_GSHARED_SRC = \
595         generics-sharing.2.cs   \
596         shared-generic-methods.2.cs     \
597         shared-generic-synchronized.2.cs        \
598         generic-initobj.2.cs            \
599         generics-sharing-other-exc.2.cs \
600         generic-box.2.cs                \
601         generic-unbox.2.cs      \
602         generic-delegate.2.cs   \
603         generic-sizeof.2.cs     \
604         generic-ldobj.2.cs      \
605         generic-mkrefany.2.cs                   \
606         generic-refanyval.2.cs  \
607         generic-ldtoken.2.cs                    \
608         generic-ldtoken-method.2.cs     \
609         generic-ldtoken-field.2.cs      \
610         generic-virtual.2.cs    \
611         generic-tailcall.2.cs                   \
612         generic-interface-methods.2.cs  \
613         generic-array-type.2.cs \
614         generic-method-patching.2.cs    \
615         generic-static-methods.2.cs     \
616         generic-null-call.2.cs  \
617         generic-tailcall2.2.cs                  \
618         generic-array-exc.2.cs  \
619         generic-special.2.cs                    \
620         generic-special2.2.cs   \
621         generic-exceptions.2.cs \
622         generic-delegate2.2.cs          \
623         generic-virtual2.2.cs   \
624         generic-valuetype-interface.2.cs        \
625         generic-valuetype-newobj.2.cs   \
626         generic-valuetype-newobj2.2.cs  \
627         generic-getgenericarguments.2.cs        \
628         generic-synchronized.2.cs       \
629         generic-delegate-ctor.2.cs              \
630         generic-constrained.2.cs        \
631         bug-431413.2.cs                 \
632         generic-virtual-invoke.2.cs     \
633         generic-typedef.2.cs            \
634         generic-marshalbyref.2.cs       \
635         bug-459285.2.cs \
636         bug-461198.2.cs \
637         generic-sealed-virtual.2.cs     \
638         generic-system-arrays.2.cs      \
639         generic-stack-traces.2.cs       \
640         generic-stack-traces2.2.cs              \
641         bug-472600.2.cs \
642         bug-473482.2.cs \
643         bug-473999.2.cs         \
644         bug-479763.2.cs                         \
645         generic-type-load-exception.2.cs        \
646         bug-616463.cs   \
647         bug-1147.cs     \
648         generic-type-builder.2.cs
649
650 if AMD64
651 # #651684
652 PLATFORM_DISABLED_TESTS = finally_guard.exe
653
654 if HOST_WIN32
655 PLATFORM_DISABLED_TESTS += w32message.exe
656 endif
657
658 endif
659
660 if X86
661
662 if HOST_WIN32
663 PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe \
664         bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe w32message.exe \
665         unhandled-exception-1.exe unhandled-exception-2.exe unhandled-exception-3.exe unhandled-exception-4.exe \
666         unhandled-exception-5.exe unhandled-exception-6.exe unhandled-exception-7.exe unhandled-exception-8.exe
667 endif
668
669 endif
670
671 if POWERPC
672 # bug #71274
673 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
674 endif
675
676 if POWERPC64
677 # FIXME: These tests hang/fail for unknown reasons
678 PLATFORM_DISABLED_TESTS=monitor.exe threadpool-exceptions5.exe appdomain-thread-abort.exe appdomain-unload.exe \
679         pinvoke2.exe pinvoke3.exe pinvoke11.exe threadpool-exceptions7.exe winx64structs.exe bug-10127.exe pinvoke_ppcc.exe \
680         pinvoke_ppcs.exe pinvoke_ppci.exe pinvoke_ppcf.exe pinvoke_ppcd.exe abort-cctor.exe load-exceptions.exe \
681         sgen-domain-unload-2.exe sgen-weakref-stress.exe sgen-cementing-stress.exe sgen-new-threads-dont-join-stw.exe \
682         sgen-new-threads-dont-join-stw-2.exe sgen-new-threads-collect.exe sgen-bridge.exe
683 endif
684
685 if ARM
686 PLATFORM_DISABLED_TESTS=filter-stack.exe
687 INTERP_DISABLED_TESTS_PLATFORM=finalizer-exception.exe main-returns-abort-resetabort.exe block_guard_restore_aligment_on_exit.exe \
688         delegate-exit.exe delegate-exit.exe delegate-delegate-exit.exe delegate-async-exit.exe delegate3.exe delegate1.exe
689 endif
690
691 if ARM64
692 INTERP_DISABLED_TESTS_PLATFORM=finalizer-exception.exe main-returns-abort-resetabort.exe block_guard_restore_aligment_on_exit.exe
693 endif
694
695 if MIPS
696 # monitor.exe is racy
697 PLATFORM_DISABLED_TESTS=filter-stack.exe monitor.exe
698 endif
699
700 if S390X
701 PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe
702 #PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe exception17.exe
703
704 PLATFORM_DISABLED_TESTS += \
705         sgen-toggleref.exe \
706         sgen-bridge.exe \
707         sgen-bridge-major-fragmentation.exe \
708         sgen-bridge-xref.exe
709 endif
710
711 if ENABLE_COOP
712 COOP_DISABLED_TESTS= thunks.exe
713 else
714 COOP_DISABLED_TESTS= 
715 endif
716
717 PROFILE_DISABLED_TESTS=
718
719 if FULL_AOT_TESTS
720 # Tests which rely on TypeLoadExceptions
721 # In full-aot mode, these cause the relevant methods to be not AOTed.
722 PROFILE_DISABLED_TESTS += \
723         typeload-unaligned.exe \
724         field-access.exe \
725         invalid_generic_instantiation.exe \
726         bug-481403.exe \
727         array_ldelema.exe \
728         array_load_exception.exe \
729         bug445361.exe \
730         generic-type-load-exception.2.exe \
731         invalid-token.exe \
732         call_missing_method.exe \
733         call_missing_class.exe \
734         ldfld_missing_field.exe \
735         ldfld_missing_class.exe \
736         vt-sync-method.exe \
737         resolve_method_bug.2.exe \
738         resolve_field_bug.2.exe \
739         resolve_type_bug.2.exe \
740         bug-81691.exe \
741         bug-327438.2.exe
742
743 # Tests which rely on remoting
744 PROFILE_DISABLED_TESTS += \
745         context-static.exe \
746         bug-415577.exe \
747         generic-marshalbyref.2.exe \
748         unhandled-exception-7.exe
749
750 # Tests which use unsupported pinvoke+full aot
751 # functionality
752 PROFILE_DISABLED_TESTS += \
753         marshal.exe \
754         marshal2.exe \
755         marshal6.exe \
756         marshal7.exe \
757         marshal8.exe \
758         pinvoke-2.2.exe \
759         pinvoke3.exe \
760         thunks.exe
761
762 # Tests which load assemblies which are not
763 # in the testing_aot_full profile
764 PROFILE_DISABLED_TESTS += \
765         assembly-load-remap.exe
766
767 # Test which needs remoting support
768 PROFILE_DISABLED_TESTS += \
769         remoting4.exe   \
770         remoting1.exe   \
771         remoting2.exe   \
772         remoting3.exe   \
773         remoting5.exe
774
775 # Tests which needs AppDomain support
776 PROFILE_DISABLED_TESTS += \
777         appdomain.exe   \
778         appdomain-client.exe    \
779         appdomain-unload.exe    \
780         appdomain-async-invoke.exe      \
781         appdomain-thread-abort.exe      \
782         appdomain1.exe  \
783         appdomain2.exe  \
784         appdomain-exit.exe      \
785         appdomain-unload-asmload.exe \
786         appdomain-unload-callback.exe   \
787         appdomain-unload-doesnot-raise-pending-events.exe       \
788         unload-appdomain-on-shutdown.exe        \
789         assemblyresolve_event2.2.exe    \
790         bug-544446.exe  \
791         bug-36848.exe   \
792         generic-marshalbyref.2.exe      \
793         stackframes-async.2.exe \
794         transparentproxy.exe    \
795         bug-48015.exe   \
796         delegate9.exe   \
797         marshal-valuetypes.exe  \
798         xdomain-threads.exe     \
799         monitor.exe     \
800         generic-xdomain.2.exe   \
801         threadpool-exceptions7.exe      \
802         cross-domain.exe        \
803         generic-unloading.2.exe \
804         appdomain-threadpool-unload.exe
805
806 # Tests which needs System.Reflection.Emit support
807 PROFILE_DISABLED_TESTS += \
808         bug-47295.exe   \
809         loader.exe      \
810         pinvoke2.exe    \
811         generic-type-builder.2.exe      \
812         dynamic-generic-size.exe        \
813         cominterop.exe  \
814         dynamic-method-access.2.exe     \
815         dynamic-method-finalize.2.exe   \
816         dynamic-method-stack-traces.exe \
817         generic_type_definition.2.exe   \
818         bug-333798-tb.2.exe     \
819         bug-335131.2.exe        \
820         bug-322722_patch_bx.2.exe       \
821         bug-322722_dyn_method_throw.2.exe       \
822         bug-389886-2.exe        \
823         bug-349190.2.exe        \
824         bug-389886-sre-generic-interface-instances.exe  \
825         bug-462592.exe  \
826         bug-575941.exe  \
827         bug-389886-3.exe        \
828         constant-division.exe   \
829         dynamic-method-resurrection.exe \
830         assembly_append_ordering.exe \
831         assemblyresolve_event5.exe
832
833 # Test which needs System.Web support
834 PROFILE_DISABLED_TESTS += \
835         bug-80307.exe
836
837 # Tests which needs named Mutex support
838 PROFILE_DISABLED_TESTS += \
839         namedmutex-destroy-race.exe
840
841 # ThreadAbortException doesn't have necessary field for this test
842 PROFILE_DISABLED_TESTS += \
843         thread6.exe
844
845 # can't AOT the TestingReferenceAssembly.dll which is a dependency
846 # of reference-loader.exe because it contains the [ReferenceAssemblyAttribute]
847 # and the runtime errors out with "File does not contain a valid CIL image."
848 PROFILE_DISABLED_TESTS += \
849         reference-loader.exe
850
851 # constraints-load.il: 
852 # Failed to load method 0x6000007 from '..../mono/tests/constraints-load.exe' due to 
853 # Could not resolve type with token 01000002 assembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.BrokenIComparable`1 member:<none>.
854 PROFILE_DISABLED_TESTS += \
855         constraints-load.exe \
856         bug-515884.exe
857
858 PROFILE_DISABLED_TESTS += \
859         generic-type-builder.2.exe
860
861 PROFILE_DISABLED_TESTS += \
862         sgen-domain-unload.exe  \
863         sgen-domain-unload-2.exe
864
865 PROFILE_DISABLED_TESTS += \
866         appdomain-loader.exe \
867         assemblyresolve_event3.exe \
868         appdomain-serialize-exception.exe
869 endif
870
871 if HYBRID_AOT_TESTS
872 PROFILE_DISABLED_TESTS += \
873         bug-80307.exe \
874         namedmutex-destroy-race.exe
875 endif
876
877 AOT_DISABLED_TESTS= \
878         constraints-load.exe
879
880 CI_DISABLED_TESTS = \
881         main-returns-background-resetabort.exe \
882         main-returns-background-abort-resetabort.exe    \
883         assemblyresolve_event3.exe \
884         delegate2.exe   \
885         finally_guard.exe \
886         generic-xdomain.2.exe
887
888 # failing tests which we temporarily disable for PRs
889 # so they don't interfere with other people's work
890 CI_PR_DISABLED_TESTS = \
891         appdomain-threadpool-unload.exe \
892         appdomain-thread-abort.exe
893
894 # appdomain-threadpool-unload.exe creates 100 appdomains, takes too long with llvm
895 LLVM_DISABLED_TESTS = \
896         appdomain-threadpool-unload.exe
897
898 LLVM = $(filter --llvm, $(MONO_ENV_OPTIONS))
899
900 # The two finalizer tests only work under sgen
901 # gc-altstack.exe fails under boehm because it has no support for altstack
902 # bug-459094.exe creates an extremely deep directory tree
903 # delegate-invoke.exe depends on 929c6bc9b6d76a273f251e6f5dfacac36e9c38bd which was
904 # reverted.
905 # bug-Xamarin-5278.exe got broken by 5d26590e79da139a284459299aee95c25f4cd835
906 # appdomain-thread-abort.exe: https://bugzilla.xamarin.com/show_bug.cgi?id=47054
907 KNOWN_FAILING_TESTS = \
908         delegate-async-exception.exe    \
909         bug-348522.2.exe        \
910         bug-459094.exe \
911         delegate-invoke.exe \
912         bug-Xamarin-5278.exe \
913         appdomain-thread-abort.exe
914
915 DISABLED_TESTS = \
916         $(KNOWN_FAILING_TESTS) \
917         $(PLATFORM_DISABLED_TESTS) \
918         $(EXTRA_DISABLED_TESTS) \
919         $(COOP_DISABLED_TESTS) \
920         $(PROFILE_DISABLED_TESTS) \
921         $(if $(AOT),$(AOT_DISABLED_TESTS)) \
922         $(if $(CI),$(CI_DISABLED_TESTS)) \
923         $(if $(CI_PR),$CI_PR_DISABLED_TESTS) \
924         $(if $(LLVM),$(LLVM_DISABLED_TESTS))
925
926 INTERP_DISABLED_TESTS = \
927         $(CI_PR_DISABLED_TESTS) \
928         $(CI_DISABLED_TESTS) \
929         $(KNOWN_FAILING_TESTS) \
930         $(INTERP_DISABLED_TESTS_PLATFORM) \
931         abort-cctor.exe \
932         appdomain-async-invoke.exe \
933         appdomain-exit.exe \
934         appdomain-serialize-exception.exe \
935         appdomain-unload-asmload.exe \
936         appdomain-unload-callback.exe \
937         appdomain-unload-doesnot-raise-pending-events.exe \
938         appdomain-unload.exe \
939         appdomain.exe \
940         appdomain1.exe \
941         appdomain2.exe \
942         array_load_exception.exe \
943         assembly_append_ordering.exe \
944         assemblyresolve_event4.exe \
945         async-exc-compilation.exe \
946         async-with-cb-throws.exe \
947         async_read.exe \
948         bug-18026.exe \
949         bug-2907.exe \
950         bug-323114.exe \
951         bug-327438.2.exe \
952         bug-335131.2.exe \
953         bug-415577.exe \
954         bug-45841-fpstack-exceptions.exe \
955         bug-461867.exe \
956         bug-461941.exe \
957         bug-46661.exe \
958         bug-47295.exe \
959         bug-48015.exe \
960         bug-544446.exe \
961         bug-685908.exe \
962         bug-80307.exe \
963         bug-80392.2.exe \
964         bug-81673.exe \
965         bug-82022.exe \
966         bug445361.exe \
967         call_missing_class.exe \
968         call_missing_method.exe \
969         calliGenericTest.exe \
970         cominterop.exe \
971         context-static.exe \
972         cross-domain.exe \
973         delegate-with-null-target.exe \
974         delegate9.exe \
975         dynamic-method-stack-traces.exe \
976         even-odd.exe \
977         exception18.exe \
978         field-access.exe \
979         finally_block_ending_in_dead_bb.exe \
980         generic-array-exc.2.exe \
981         generic-marshalbyref.2.exe \
982         generic-mkrefany.2.exe \
983         generic-refanyval.2.exe \
984         generic-stack-traces2.2.exe \
985         generic-type-load-exception.2.exe \
986         generic-unloading.2.exe \
987         generics-invoke-byref.2.exe \
988         generics-sharing.2.exe \
989         handleref.exe \
990         invalid-token.exe \
991         invalid_generic_instantiation.exe \
992         ldfld_missing_class.exe \
993         ldfld_missing_field.exe \
994         ldftn-access.exe \
995         main-returns-background-change.exe \
996         marshal-valuetypes.exe \
997         marshal.exe \
998         marshal2.exe \
999         marshal8.exe \
1000         marshal9.exe \
1001         marshalbool.exe \
1002         method-access.exe \
1003         monitor.exe \
1004         nullable_boxing.2.exe \
1005         pinvoke-2.2.exe \
1006         pinvoke-utf8.exe \
1007         pinvoke.exe \
1008         pinvoke11.exe \
1009         pinvoke2.exe \
1010         pinvoke3.exe \
1011         pinvoke_ppcc.exe \
1012         pinvoke_ppcd.exe \
1013         pinvoke_ppcf.exe \
1014         pinvoke_ppci.exe \
1015         pinvoke_ppcs.exe \
1016         process-unref-race.exe \
1017         reload-at-bb-end.exe \
1018         remoting1.exe \
1019         remoting2.exe \
1020         remoting3.exe \
1021         remoting4.exe \
1022         remoting5.exe \
1023         safehandle.2.exe \
1024         stackframes-async.2.exe \
1025         static-constructor.exe \
1026         test-inline-call-stack.exe \
1027         test-type-ctor.exe \
1028         thread6.exe \
1029         threadpool-exceptions1.exe \
1030         threadpool-exceptions2.exe \
1031         threadpool-exceptions3.exe \
1032         threadpool-exceptions4.exe \
1033         threadpool-exceptions5.exe \
1034         threadpool-exceptions6.exe \
1035         threadpool-exceptions7.exe \
1036         threadpool.exe \
1037         threadpool1.exe \
1038         thunks.exe \
1039         transparentproxy.exe \
1040         typeload-unaligned.exe \
1041         unload-appdomain-on-shutdown.exe \
1042         vararg.exe \
1043         vararg2.exe \
1044         vt-sync-method.exe \
1045         winx64structs.exe \
1046         xdomain-threads.exe
1047
1048 TESTS_CS=$(filter-out $(DISABLED_TESTS),$(TESTS_CS_SRC:.cs=.exe))
1049 TESTS_IL=$(filter-out $(DISABLED_TESTS),$(TESTS_IL_SRC:.il=.exe))
1050 TESTS_BENCH=$(filter-out $(DISABLED_TESTS),$(TESTS_BENCH_SRC:.cs=.exe))
1051 TESTS_STRESS=$(filter-out $(DISABLED_TESTS),$(TESTS_STRESS_SRC:.cs=.exe))
1052 TESTS_GSHARED=$(filter-out $(DISABLED_TESTS),$(TESTS_GSHARED_SRC:.cs=.exe))
1053
1054 if FULL_AOT_TESTS
1055 TESTSAOT_CS=$(TESTS_CS:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1056 TESTSAOT_IL=$(TESTS_IL:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1057 TESTSAOT_BENCH=$(TESTS_BENCH:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1058 TESTSAOT_STRESS=$(TESTS_STRESS:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1059 TESTSAOT_GSHARED=$(TESTS_GSHARED:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1060 endif
1061
1062 if HYBRID_AOT_TESTS
1063 TESTSAOT_CS=$(TESTS_CS:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1064 TESTSAOT_IL=$(TESTS_IL:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1065 TESTSAOT_BENCH=$(TESTS_BENCH:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1066 TESTSAOT_STRESS=$(TESTS_STRESS:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1067 TESTSAOT_GSHARED=$(TESTS_GSHARED:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1068 endif
1069
1070 EXTRA_DIST=test-driver test-runner.cs $(TESTS_CS_SRC) $(TESTS_IL_SRC) \
1071         $(TESTS_BENCH_SRC) $(TESTS_STRESS_SRC) stress-runner.pl
1072
1073 %.exe: %.il
1074         $(ILASM) -out:$@ $<
1075
1076 if !FULL_AOT_TESTS
1077 if !HYBRID_AOT_TESTS
1078 TEST_DRIVER_HARD_KILL_FEATURE=-r:$(CLASS)/Mono.Posix.dll
1079 endif
1080 endif
1081
1082 if FULL_AOT_TESTS
1083 TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX)
1084 else
1085 if HYBRID_AOT_TESTS
1086 TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX)
1087 else
1088 TEST_DRIVER_DEPEND=TestDriver.dll
1089 endif
1090 endif
1091
1092 %.exe: %.cs $(TEST_DRIVER_DEPEND)
1093         $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $<
1094
1095 # N.B. test-runner.exe references the TOOLS_RUNTIME versions of the framework assemblies
1096 test-runner.exe: test-runner.cs $(TEST_DRIVER_DEPEND)
1097         $(MCS) -r:System.dll -r:System.Xml.dll -r:System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $<
1098
1099 %.dll: %.cs
1100         $(MCS) -r:$(CLASS)/System.dll -target:library -out:$@ $<
1101 %.dll: %.il
1102         $(ILASM) /dll /output:$@ $<
1103
1104 reference-loader.exe: reference-loader.cs TestingReferenceAssembly.dll TestingReferenceReferenceAssembly.dll $(TEST_DRIVER_DEPEND)
1105         $(MCS) -r:$(CLASS)/System.dll -r:TestDriver.dll -r:TestingReferenceAssembly.dll -r:TestingReferenceReferenceAssembly.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $(srcdir)/reference-loader.cs
1106
1107 TestingReferenceAssembly.dll: TestingReferenceAssembly.cs
1108         $(MCS) -target:library -out:$@ $<
1109
1110 TestingReferenceReferenceAssembly.dll: TestingReferenceReferenceAssembly.cs TestingReferenceAssembly.dll
1111         $(MCS) -r:TestingReferenceAssembly.dll -target:library -out:$@ $<
1112
1113 %.exe$(PLATFORM_AOT_SUFFIX): %.exe 
1114         $(RUNTIME) $(AOT_BUILD_FLAGS) $<
1115
1116 %.dll$(PLATFORM_AOT_SUFFIX): %.dll 
1117         $(RUNTIME) $(AOT_BUILD_FLAGS) $<
1118
1119 # mkbundle works on ppc, but the pkg-config POC doesn't when run with make test
1120 if POWERPC
1121 test-platform:
1122 else
1123 # Can't use mkbundle on win32 since there is no static build there
1124 # Can't run test-unhandled-exception on Windows because of all the debug popups...
1125 if HOST_WIN32
1126 test-platform:
1127 else
1128 # mkbundle uses the installed mono-2.pc so it won't work if there is no system mono
1129 #test-platform: testbundle test-iomap-regression
1130 test-platform:  test-iomap-regression
1131 endif
1132 endif
1133
1134 # Target to precompile the test executables
1135 tests: compile-tests
1136
1137 #
1138 # Test that no symbols are missed in eglib-remap.h
1139 #
1140 if PLATFORM_LINUX
1141 test-platform: test-eglib-remap
1142 else
1143 if PLATFORM_DARWIN
1144 test-platform: test-eglib-remap
1145 endif
1146 endif
1147 # The following regexp describes all symbols that start with "g_" but are not part of eglibc.
1148 # The optional underscore prepending symbol names may or may not appear depending on the
1149 # system and the state of the leading-underscore compiler flag.
1150 OK_G_SYMBOLS='\<_?g_(s?list_(pre|ap)pend_(image|mempool)|concat_dir_and_file|Ctoc)\>'
1151 test-eglib-remap:
1152         @echo "Testing eglib remap..."
1153         @if which nm > /dev/null; then if nm $(top_builddir)/mono/mini/mono | grep -Ev $(OK_G_SYMBOLS) | grep -E 't _?g_'; then exit 1; else exit 0; fi; fi
1154
1155 test-env-options:
1156         MONO_ENV_OPTIONS="--version" $(RUNTIME) array-init.exe | grep -q Architecture:
1157
1158 # Precompile the test assemblies in parallel
1159 compile-tests:
1160         $(MAKE) -j4 $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH) $(TESTS_STRESS) $(TESTS_GSHARED) $(TESTSAOT_CS) $(TESTSAOT_IL) $(TESTSAOT_BENCH) $(TESTSAOT_STRESS) $(TESTSAOT_GSHARED) compile-gac-loading
1161
1162 # Remove empty .stdout and .stderr files for wrench
1163 rm-empty-logs:
1164         @echo "Removing empty logs..."
1165         find . '(' -name "*.stdout" -o -name "*.stderr" ')' -size 0 -exec rm {} \;
1166
1167 TestDriver.dll:
1168         $(MCS) -target:library -out:$@ $(srcdir)/../mini/TestDriver.cs $(srcdir)/../mini/TestHelpers.cs
1169
1170 runtest: compile-tests
1171         @failed=0; \
1172         passed=0; \
1173         failed_tests="";\
1174         if [ "x$$V" = "x1" ]; then dump_action="dump-output"; else dump_action="no-dump"; fi; \
1175         rm -f testlist testlist.sorted; \
1176         for i in $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH); do echo $${i} >> testlist; sort testlist > testlist.sorted; done; \
1177         for i in `cat testlist.sorted`; do \
1178                 rm -f $${i}.so; \
1179                 $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; \
1180                 if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" "$${dump_action}" $(RUNTIME_ARGS); \
1181                 then \
1182                         passed=`expr $${passed} + 1`; \
1183                 else \
1184                         if [ $$? = 2 ]; then break; fi; \
1185                         failed=`expr $${failed} + 1`; \
1186                         failed_tests="$${failed_tests} $$i"; \
1187                 fi \
1188         done; \
1189         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
1190         rm -f testlist testlist.sorted; \
1191         if [ $${failed} != 0 ]; then \
1192           echo -e "\nFailed tests:\n"; \
1193           for i in $${failed_tests}; do \
1194             echo $${i}; \
1195             if [ "x$$V" = "x1" ]; then \
1196               cat $${i}.stdout; \
1197               cat $${i}.stderr; \
1198             fi; \
1199           done; \
1200           exit 1; \
1201         fi
1202
1203 runtest-managed: test-runner.exe compile-tests
1204         $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --testsuite-name "runtime" --timeout 300 --disabled "$(DISABLED_TESTS)" $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH)
1205
1206 runtest-managed-serial: test-runner.exe compile-tests
1207         $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j 1 --testsuite-name "runtime" --disabled "$(DISABLED_TESTS)" $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH)
1208
1209 test-jit:
1210         @if test x$(M) != x0; then $(MAKE) runtest-managed; else $(MAKE) runtest; fi
1211
1212 testaot:
1213         @$(MAKE) AOT=1 runtest
1214
1215 testtrace:
1216         @$(MAKE) RUNTIME_ARGS="$${RUNTIME_ARGS} --trace" runtest
1217
1218 testinterp: test-runner.exe compile-tests
1219         $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --runtime-args "--interpreter" --testsuite-name "runtime-interp" --timeout 300 --disabled "$(INTERP_DISABLED_TESTS)" $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH)
1220
1221 testjitspeed: $(JITTEST_PROG) compile-tests
1222         for i in $(TESTS_BENCH); do     \
1223                 echo $$i;       \
1224                 time $(JITTEST_PROG) $$i;       \
1225         done
1226
1227 test-iomap-regression: exists.exe
1228         @echo "Testing exists.exe..."
1229         @MONO_IOMAP=all $(RUNTIME) exists.exe
1230
1231 stresstest: compile-tests
1232         @failed=0; \
1233         passed=0; \
1234         failed_tests="";\
1235         for i in $(TESTS_STRESS); do    \
1236                 if $(srcdir)/stress-runner.pl $$i ../mini/mono $(RUNTIME_ARGS); \
1237                 then \
1238                         passed=`expr $${passed} + 1`; \
1239                 else \
1240                         if [ $$? = 2 ]; then break; fi; \
1241                         failed=`expr $${failed} + 1`; \
1242                         failed_tests="$${failed_tests} $$i"; \
1243                 fi \
1244         done; \
1245         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
1246         if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
1247           for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
1248
1249 testbundle: console.exe
1250         @echo "Testing mkbundle..."
1251         @$(MKBUNDLE) --static console.exe > mkbundle.stdout
1252         @$(with_mono_path) MONO_CFG_DIR=$(mono_cfg_dir) ./a.out >> mkbundle.stdout
1253         @- rm -rf a.out
1254
1255 EXTRA_DIST += load-missing.il t-missing.cs load-exceptions.cs
1256
1257 load-missing.dll: load-missing.il
1258         $(Q) $(ILASM) /dll /output:$@ $<
1259
1260 load-exceptions.exe t.dll: load-exceptions.cs t-missing.cs load-missing.dll $(TEST_DRIVER_DEPEND)
1261         $(Q) $(MCS) -t:library -out:t.dll -d:FOUND t-missing.cs
1262         $(Q) $(MCS) -r:TestDriver.dll -r:load-missing.dll -r:t.dll -out:$@ $<
1263         $(Q) $(MCS) -t:library -out:t.dll t-missing.cs
1264
1265 test-type-load: load-exceptions.exe
1266 if !POWERPC64
1267         $(Q) $(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr
1268 endif
1269
1270 EXTRA_DIST += test-multi-netmodule-1-netmodule.cs test-multi-netmodule-2-dll1.cs test-multi-netmodule-3-dll2.cs test-multi-netmodule-4-exe.cs
1271
1272 test-multi-netmodule-1-netmodule.netmodule: test-multi-netmodule-1-netmodule.cs
1273         $(Q) $(MCS) -t:module -out:$@ $<
1274 test-multi-netmodule-2-dll1.dll: test-multi-netmodule-2-dll1.cs test-multi-netmodule-1-netmodule.netmodule
1275         $(Q) $(MCS) -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library  -out:$@ $<
1276 test-multi-netmodule-3-dll2.dll: test-multi-netmodule-3-dll2.cs test-multi-netmodule-1-netmodule.netmodule
1277         $(Q) $(MCS) -addmodule:test-multi-netmodule-1-netmodule.netmodule -t:library -out:$@ $<
1278 test-multi-netmodule-4-exe.exe: test-multi-netmodule-4-exe.cs test-multi-netmodule-2-dll1.dll test-multi-netmodule-3-dll2.dll
1279         $(Q) $(MCS) -r:test-multi-netmodule-2-dll1.dll -out:$@ $<
1280
1281 test-multi-netmodule: test-multi-netmodule-4-exe.exe
1282         $(Q) $(RUNTIME) test-multi-netmodule-4-exe.exe > test-multi-netmodule-4-exe.exe.stdout 2> test-multi-netmodule-4-exe.exe.stderr
1283
1284 EXTRA_DIST += custom-attr-errors.cs custom-attr-errors-lib.cs
1285
1286 custom-attr-errors.exe custom-attr-errors-lib.dll: custom-attr-errors.cs custom-attr-errors-lib.cs $(TEST_DRIVER_DEPEND)
1287         $(Q) $(MCS) /t:library -D:WITH_MEMBERS custom-attr-errors-lib.cs
1288         $(Q) $(MCS) -r:TestDriver.dll -r:custom-attr-errors-lib.dll custom-attr-errors.cs
1289         $(Q) $(MCS) /t:library custom-attr-errors-lib.cs
1290
1291 test-cattr-type-load: custom-attr-errors.exe
1292         $(Q) $(RUNTIME) custom-attr-errors.exe > custom-attr-errors.exe.stdout 2> custom-attr-errors.exe.stderr
1293
1294 EXTRA_DIST += reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.cs reflection-load-with-context.cs
1295
1296 reflection-load-with-context-second-lib.dll: reflection-load-with-context-second-lib.cs
1297         $(Q) $(MCS) /t:library -out:$@ $<
1298 reflection-load-with-context-lib.dll: reflection-load-with-context-lib.cs reflection-load-with-context-second-lib.dll
1299         $(Q) $(MCS) /t:library -r:reflection-load-with-context-second-lib.dll -out:$@ $<
1300 reflection-load-with-context.exe: reflection-load-with-context-lib.dll
1301
1302 test-reflection-load-with-context: reflection-load-with-context.exe
1303         $(Q) $(RUNTIME) reflection-load-with-context.exe > reflection-load-with-context.exe.stdout 2> reflection-load-with-context.exe.stderr
1304
1305
1306 EXTRA_DIST += debug-casts.cs
1307 # This depends on TLS, so its not ran by default
1308 debug-casts: debug-casts.exe
1309         $(Q) $(RUNTIME) --debug=casts debug-casts.exe
1310
1311 EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs sgen-domain-unload.cs sgen-weakref-stress.cs sgen-cementing-stress.cs sgen-case-23400.cs      finalizer-wait.cs critical-finalizers.cs sgen-domain-unload-2.cs sgen-suspend.cs sgen-new-threads-dont-join-stw.cs sgen-new-threads-dont-join-stw-2.cs sgen-new-threads-collect.cs sgen-bridge-xref.cs bug-17590.cs sgen-toggleref.cs sgen-bridge-gchandle.cs
1312
1313 test-sgen:
1314         ok=; \
1315         $(MAKE) test-sgen-regular || ok=false; \
1316         $(MAKE) test-sgen-toggleref || ok=false; \
1317         $(MAKE) test-sgen-bridge || ok=false; \
1318         $(MAKE) test-sgen-bridge2 || ok=false; \
1319         $(MAKE) test-sgen-bridge3 || ok=false; \
1320         $$ok
1321
1322 test-stress-sgen:
1323         ok=; \
1324         $(MAKE) test-stress-sgen-regular || ok=false; \
1325         $(MAKE) test-stress-sgen-toggleref || ok=false; \
1326         $(MAKE) test-stress-sgen-bridge || ok=false; \
1327         $(MAKE) test-stress-sgen-bridge2 || ok=false; \
1328         $(MAKE) test-stress-sgen-bridge3 || ok=false; \
1329         $$ok
1330
1331 TESTS_SGEN_REGULAR_SRC =        \
1332         finalizer-wait.cs       \
1333         critical-finalizers.cs  \
1334         sgen-descriptors.cs     \
1335         sgen-gshared-vtype.cs   \
1336         sgen-weakref-stress.cs  \
1337         sgen-cementing-stress.cs        \
1338         sgen-case-23400.cs      \
1339         sgen-new-threads-dont-join-stw.cs       \
1340         sgen-new-threads-dont-join-stw-2.cs     \
1341         sgen-new-threads-collect.cs     \
1342         gc-graystack-stress.cs  \
1343         bug-17590.cs    \
1344         sgen-domain-unload.cs   \
1345         sgen-domain-unload-2.cs
1346
1347 TESTS_SGEN_REGULAR=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_REGULAR_SRC:.cs=.exe))
1348
1349 if FULL_AOT_TESTS
1350 TESTSAOT_SGEN_REGULAR=$(TESTS_SGEN_REGULAR:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1351 endif
1352
1353 if HYBRID_AOT_TESTS
1354 TESTSAOT_SGEN_REGULAR=$(TESTS_SGEN_REGULAR:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1355 endif
1356
1357 test-sgen-regular: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR)
1358         ok=; \
1359         $(MAKE) test-sgen-regular-ms-simple || ok=false; \
1360         $(MAKE) test-sgen-regular-ms-conc-simple || ok=false; \
1361         $$ok
1362
1363 test-stress-sgen-regular: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR)
1364         ok=; \
1365         $(MAKE) test-sgen-regular-ms-simple MONO_TESTS_STRESS=1 || ok=false; \
1366         $(MAKE) test-sgen-regular-ms-conc-simple MONO_TESTS_STRESS=1 || ok=false; \
1367         $(MAKE) test-sgen-regular-ms-conc-par-simple MONO_TESTS_STRESS=1 || ok=false; \
1368         $(MAKE) test-sgen-regular-ms-conc-split MONO_TESTS_STRESS=1 || ok=false; \
1369         $(MAKE) test-sgen-regular-ms-conc-split-95-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \
1370         $(MAKE) test-sgen-regular-ms-conc-par-simple-par-dyn MONO_TESTS_STRESS=1 || ok=false; \
1371         $(MAKE) test-sgen-regular-ms-conc-par-simple-par-512k MONO_TESTS_STRESS=1 || ok=false; \
1372         $(MAKE) test-sgen-regular-ms-conc-par-simple-par-32m MONO_TESTS_STRESS=1 || ok=false; \
1373         $(MAKE) test-sgen-regular-ms-conc-par-simple-par-dyn-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \
1374         $$ok
1375
1376 test-sgen-regular-ms-simple: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1377         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1378 test-sgen-regular-ms-conc-simple: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1379         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1380 test-sgen-regular-ms-conc-par-simple: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1381         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1382 test-sgen-regular-ms-conc-split: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1383         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1384 test-sgen-regular-ms-conc-split-95-clear-at-gc: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1385         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep-conc,minor=split,alloc-ratio=95" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1386 test-sgen-regular-ms-conc-par-simple-par-dyn: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1387         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1388 test-sgen-regular-ms-conc-par-simple-par-512k: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1389         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1390 test-sgen-regular-ms-conc-par-simple-par-32m: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1391         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1392 test-sgen-regular-ms-conc-par-simple-par-dyn-clear-at-gc: $(TESTS_SGEN_REGULAR) $(TESTSAOT_SGEN_REGULAR) test-runner.exe
1393         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_REGULAR)
1394
1395 TESTS_SGEN_TOGGLEREF_SRC=       \
1396         sgen-toggleref.cs
1397
1398 TESTS_SGEN_TOGGLEREF=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_TOGGLEREF_SRC:.cs=.exe))
1399
1400 if FULL_AOT_TESTS
1401 TESTSAOT_SGEN_TOGGLEREF=$(TESTS_SGEN_TOGGLEREF:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1402 endif
1403
1404 if HYBRID_AOT_TESTS
1405 TESTSAOT_SGEN_TOGGLEREF=$(TESTS_SGEN_TOGGLEREF:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1406 endif
1407
1408 test-sgen-toggleref: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF)
1409         ok=; \
1410         $(MAKE) test-sgen-toggleref-ms-simple || ok=false; \
1411         $(MAKE) test-sgen-toggleref-ms-conc-simple || ok=false; \
1412         $$ok
1413
1414 test-stress-sgen-toggleref: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF)
1415         ok=; \
1416         $(MAKE) test-sgen-toggleref-ms-simple MONO_TESTS_STRESS=1 || ok=false; \
1417         $(MAKE) test-sgen-toggleref-ms-conc-simple MONO_TESTS_STRESS=1 || ok=false; \
1418         $(MAKE) test-sgen-toggleref-ms-conc-par-simple MONO_TESTS_STRESS=1 || ok=false; \
1419         $(MAKE) test-sgen-toggleref-ms-conc-split MONO_TESTS_STRESS=1 || ok=false; \
1420         $(MAKE) test-sgen-toggleref-ms-conc-split-95-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \
1421         $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-dyn MONO_TESTS_STRESS=1 || ok=false; \
1422         $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-512k MONO_TESTS_STRESS=1 || ok=false; \
1423         $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-32m MONO_TESTS_STRESS=1 || ok=false; \
1424         $(MAKE) test-sgen-toggleref-ms-conc-par-simple-par-dyn-clear-at-gc MONO_TESTS_STRESS=1 || ok=false; \
1425         $$ok
1426
1427 test-sgen-toggleref-ms-simple: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1428         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1429 test-sgen-toggleref-ms-conc-simple: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1430         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1431 test-sgen-toggleref-ms-conc-par-simple: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1432         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1433 test-sgen-toggleref-ms-conc-split: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1434         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc,minor=split" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1435 test-sgen-toggleref-ms-conc-split-95-clear-at-gc: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1436         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep-conc,minor=split,alloc-ratio=95" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1437 test-sgen-toggleref-ms-conc-par-simple-par-dyn: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1438         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1439 test-sgen-toggleref-ms-conc-par-simple-par-512k: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1440         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,nursery-size=512k" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1441 test-sgen-toggleref-ms-conc-par-simple-par-32m: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1442         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug= --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,nursery-size=32m" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1443 test-sgen-toggleref-ms-conc-par-simple-par-dyn-clear-at-gc: $(TESTS_SGEN_TOGGLEREF) $(TESTSAOT_SGEN_TOGGLEREF) test-runner.exe
1444         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=clear-at-gc --gc-params=toggleref-test,major=marksweep-conc-par,minor=simple-par,dynamic-nursery" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_TOGGLEREF)
1445
1446 TESTS_SGEN_BRIDGE_SRC=  \
1447         sgen-bridge.cs  \
1448         sgen-bridge-major-fragmentation.cs
1449
1450 TESTS_SGEN_BRIDGE=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_BRIDGE_SRC:.cs=.exe))
1451
1452 if FULL_AOT_TESTS
1453 TESTSAOT_SGEN_BRIDGE=$(TESTS_SGEN_BRIDGE:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1454 endif
1455
1456 if HYBRID_AOT_TESTS
1457 TESTSAOT_SGEN_BRIDGE=$(TESTS_SGEN_BRIDGE:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1458 endif
1459
1460 test-sgen-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE)
1461         ok=; \
1462         $(MAKE) test-sgen-bridge-ms-simple-tarjan-bridge || ok=false; \
1463         $(MAKE) test-sgen-bridge-ms-conc-simple-tarjan-bridge || ok=false; \
1464         $$ok
1465
1466 test-stress-sgen-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE)
1467         ok=; \
1468         $(MAKE) test-sgen-bridge-ms-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1469         $(MAKE) test-sgen-bridge-ms-conc-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1470         $(MAKE) test-sgen-bridge-ms-conc-split-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1471         $(MAKE) test-sgen-bridge-ms-conc-simple-new-bridge MONO_TESTS_STRESS=1 || ok=false; \
1472         $(MAKE) test-sgen-bridge-ms-conc-simple-old-bridge MONO_TESTS_STRESS=1 || ok=false; \
1473         $(MAKE) test-sgen-bridge-ms-conc-par-simple-par-dyn-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1474         $(MAKE) test-sgen-bridge-ms-conc-par-simple-par-512k-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1475         $(MAKE) test-sgen-bridge-ms-conc-par-simple-par-32m-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1476         $$ok
1477
1478 test-sgen-bridge-ms-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1479         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1480 test-sgen-bridge-ms-conc-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1481         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1482 test-sgen-bridge-ms-conc-split-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1483         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1484 test-sgen-bridge-ms-conc-simple-new-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1485         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1486 test-sgen-bridge-ms-conc-simple-old-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1487         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=old" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1488 test-sgen-bridge-ms-conc-par-simple-par-dyn-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1489         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1490 test-sgen-bridge-ms-conc-par-simple-par-512k-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1491         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1492 test-sgen-bridge-ms-conc-par-simple-par-32m-tarjan-bridge: $(TESTS_SGEN_BRIDGE) $(TESTSAOT_SGEN_BRIDGE) test-runner.exe
1493         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE)
1494
1495 TESTS_SGEN_BRIDGE2_SRC= \
1496         sgen-bridge-xref.cs
1497
1498 TESTS_SGEN_BRIDGE2=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_BRIDGE2_SRC:.cs=.exe))
1499
1500 if FULL_AOT_TESTS
1501 TESTSAOT_SGEN_BRIDGE2=$(TESTS_SGEN_BRIDGE2:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1502 endif
1503
1504 if HYBRID_AOT_TESTS
1505 TESTSAOT_SGEN_BRIDGE2=$(TESTS_SGEN_BRIDGE2:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1506 endif
1507
1508 test-sgen-bridge2: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2)
1509         ok=; \
1510         $(MAKE) test-sgen-bridge2-ms-simple-tarjan-bridge || ok=false; \
1511         $(MAKE) test-sgen-bridge2-ms-conc-simple-tarjan-bridge || ok=false; \
1512         $$ok
1513
1514 test-stress-sgen-bridge2: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2)
1515         ok=; \
1516         $(MAKE) test-sgen-bridge2-ms-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1517         $(MAKE) test-sgen-bridge2-ms-conc-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1518         $(MAKE) test-sgen-bridge2-ms-conc-split-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1519         $(MAKE) test-sgen-bridge2-ms-conc-simple-new-bridge MONO_TESTS_STRESS=1 || ok=false; \
1520         $(MAKE) test-sgen-bridge2-ms-conc-simple-old-bridge MONO_TESTS_STRESS=1 || ok=false; \
1521         $(MAKE) test-sgen-bridge2-ms-conc-par-simple-par-dyn-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1522         $(MAKE) test-sgen-bridge2-ms-conc-par-simple-par-512k-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1523         $(MAKE) test-sgen-bridge2-ms-conc-par-simple-par-32m-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1524         $$ok
1525
1526 test-sgen-bridge2-ms-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1527         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1528 test-sgen-bridge2-ms-conc-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1529         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1530 test-sgen-bridge2-ms-conc-split-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1531         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1532 test-sgen-bridge2-ms-conc-simple-new-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1533         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1534 test-sgen-bridge2-ms-conc-simple-old-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1535         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=old" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1536 test-sgen-bridge2-ms-conc-par-simple-par-dyn-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1537         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1538 test-sgen-bridge2-ms-conc-par-simple-par-512k-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1539         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1540 test-sgen-bridge2-ms-conc-par-simple-par-32m-tarjan-bridge: $(TESTS_SGEN_BRIDGE2) $(TESTSAOT_SGEN_BRIDGE2) test-runner.exe
1541         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=2Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE2)
1542
1543 TESTS_SGEN_BRIDGE3_SRC= \
1544         sgen-bridge-gchandle.cs
1545
1546 TESTS_SGEN_BRIDGE3=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_BRIDGE3_SRC:.cs=.exe))
1547
1548 if FULL_AOT_TESTS
1549 TESTSAOT_SGEN_BRIDGE3=$(TESTS_SGEN_BRIDGE3:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1550 endif
1551
1552 if HYBRID_AOT_TESTS
1553 TESTSAOT_SGEN_BRIDGE3=$(TESTS_SGEN_BRIDGE3:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1554 endif
1555
1556 test-sgen-bridge3: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3)
1557         ok=; \
1558         $(MAKE) test-sgen-bridge3-ms-simple-tarjan-bridge || ok=false; \
1559         $(MAKE) test-sgen-bridge3-ms-conc-simple-tarjan-bridge || ok=false; \
1560         $$ok
1561
1562 test-stress-sgen-bridge3: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3)
1563         ok=; \
1564         $(MAKE) test-sgen-bridge3-ms-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1565         $(MAKE) test-sgen-bridge3-ms-conc-simple-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1566         $(MAKE) test-sgen-bridge3-ms-conc-split-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1567         $(MAKE) test-sgen-bridge3-ms-conc-simple-new-bridge MONO_TESTS_STRESS=1 || ok=false; \
1568         $(MAKE) test-sgen-bridge3-ms-conc-simple-old-bridge MONO_TESTS_STRESS=1 || ok=false; \
1569         $(MAKE) test-sgen-bridge3-ms-conc-par-simple-par-dyn-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1570         $(MAKE) test-sgen-bridge3-ms-conc-par-simple-par-512k-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1571         $(MAKE) test-sgen-bridge3-ms-conc-par-simple-par-32m-tarjan-bridge MONO_TESTS_STRESS=1 || ok=false; \
1572         $$ok
1573
1574 test-sgen-bridge3-ms-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1575         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1576 test-sgen-bridge3-ms-conc-simple-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1577         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1578 test-sgen-bridge3-ms-conc-split-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1579         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=split,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1580 test-sgen-bridge3-ms-conc-simple-new-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1581         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=new" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1582 test-sgen-bridge3-ms-conc-simple-old-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1583         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc,minor=simple,bridge-implementation=old" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1584 test-sgen-bridge3-ms-conc-par-simple-par-dyn-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1585         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,dynamic-nursery,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1586 test-sgen-bridge3-ms-conc-par-simple-par-512k-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1587         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=512k,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1588 test-sgen-bridge3-ms-conc-par-simple-par-32m-tarjan-bridge: $(TESTS_SGEN_BRIDGE3) $(TESTSAOT_SGEN_BRIDGE3) test-runner.exe
1589         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=bridge=3Bridge --gc-params=major=marksweep-conc-par,minor=simple-par,nursery-size=32m,bridge-implementation=tarjan" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_BRIDGE3)
1590
1591 TESTS_SGEN_OOM_SRC =    \
1592         sgen-oom-cementing-stress.cs    \
1593         sgen-oom-new-threads-dont-join-stw-2.cs \
1594         sgen-oom-bridge-major-fragmentation.cs \
1595         gc-oom-handling.cs      \
1596         gc-oom-handling2.cs
1597
1598 TESTS_SGEN_OOM=$(filter-out $(DISABLED_TESTS),$(TESTS_SGEN_OOM_SRC:.cs=.exe))
1599
1600 if FULL_AOT_TESTS
1601 TESTSAOT_SGEN_OOM=$(TESTS_SGEN_OOM:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1602 endif
1603
1604 if HYBRID_AOT_TESTS
1605 TESTSAOT_SGEN_OOM=$(TESTS_SGEN_OOM:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1606 endif
1607
1608 tests-sgen-oom: $(TESTS_SGEN_OOM) $(TESTSAOT_SGEN_OOM) test-runner.exe sgen-cementing-stress.exe sgen-new-threads-dont-join-stw-2.exe sgen-bridge-major-fragmentation.exe
1609         $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name $@ --runtime-args "--gc=sgen --gc-debug=max-valloc-size=50M,bridge=Bridge" --disabled "$(DISABLED_TESTS)" --timeout 900 $(TESTS_SGEN_OOM)
1610
1611 AOT_CONFIGURATIONS=     \
1612         "|regular"      \
1613         "--gc=boehm|boehm"
1614
1615 #LLVM crashes, got to fix it first.
1616 #       "--llvm|llvm"   \
1617 #       "--llvm --gc=boehm|llvm+boehm"
1618
1619
1620 test-aot:
1621         @failed=0; \
1622         passed=0; \
1623         failed_tests="";\
1624         profile=$(DEFAULT_PROFILE);     \
1625         tmpfile=`mktemp -t mono_aot_outputXXXXXX` || exit 1;    \
1626         rm -f test-aot-$${name}.stdout test-aot-$${name}.stderr; \
1627         for assembly in $(mcs_topdir)/class/lib/$$profile/*.dll ; do    \
1628                 asm_name=`basename $$assembly`; \
1629                 echo "... $$asm_name";  \
1630                 for conf in $(AOT_CONFIGURATIONS); do   \
1631                         name=`echo $$conf | cut -d\| -f 2`;     \
1632                         params=`echo $$conf | cut -d\| -f 1`;   \
1633                         test_name="$${asm_name}|$${name}";      \
1634                         echo "  $$test_name";   \
1635                         if MONO_PATH=$(mcs_topdir)/class/lib/$$profile $(JITTEST_PROG_RUN) $$params --aot=outfile=$$tmpfile $$assembly >> test-aot-$${name}.stdout 2>> test-aot-$${name}.stderr;        \
1636                         then \
1637                                 passed=`expr $${passed} + 1`; \
1638                         else \
1639                                 failed=`expr $${failed} + 1`; \
1640                                 failed_tests="$${failed_tests} $$test_name"; \
1641                         fi \
1642                 done;   \
1643         done;   \
1644         rm      $$tmpfile;      \
1645         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
1646         if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
1647         for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
1648
1649
1650 # Generated tests for runtime invoke
1651 EXTRA_DIST += gen-runtime-invoke.cs
1652
1653 runtime-invoke.gen.cs: gen-runtime-invoke.exe
1654         $(Q) $(RUNTIME) gen-runtime-invoke.exe > runtime-invoke.gen.cs
1655
1656 EXTRA_DIST += make-imt-test.cs
1657
1658 imt_big_iface_test.cs: make-imt-test.exe
1659         $(Q) $(RUNTIME) make-imt-test.exe > imt_big_iface_test.cs
1660
1661 EXTRA_DIST += test-inline-call-stack-library.cs test-inline-call-stack.cs
1662
1663 test-inline-call-stack-library.dll: $(srcdir)/test-inline-call-stack-library.cs
1664         $(MCS) -t:library -out:$@ $<
1665
1666 test-inline-call-stack.exe$(PLATFORM_AOT_SUFFIX): test-inline-call-stack-library.dll$(PLATFORM_AOT_SUFFIX)
1667 test-inline-call-stack.exe: test-inline-call-stack.cs test-inline-call-stack-library.dll $(TEST_DRIVER_DEPEND)
1668         $(MCS) -r:TestDriver.dll -r:test-inline-call-stack-library.dll -out:$@ $<
1669
1670 EXTRA_DIST += unhandled-exception-base-configuration.config
1671 EXTRA_DIST += unhandled-exception-legacy-configuration.config
1672 EXTRA_DIST += appdomain-unload.exe.config
1673 EXTRA_DIST += unhandled-exception-test-case.2.cs
1674 EXTRA_DIST += unhandled-exception-test-runner.2.cs
1675 unhandled-exception-test-case.1.cs: unhandled-exception-test-case.2.cs
1676         cp unhandled-exception-test-case.2.cs unhandled-exception-test-case.1.cs
1677 unhandled-exception-test-case-legacy.1.cs: unhandled-exception-test-case.1.cs
1678         cp unhandled-exception-test-case.1.cs unhandled-exception-test-case-legacy.1.cs
1679 unhandled-exception-test-case-legacy.2.cs: unhandled-exception-test-case.2.cs
1680         cp unhandled-exception-test-case.2.cs unhandled-exception-test-case-legacy.2.cs
1681 unhandled-exception-config_files: unhandled-exception-base-configuration.config unhandled-exception-legacy-configuration.config
1682         cp unhandled-exception-base-configuration.config unhandled-exception-test-case.1.exe.config
1683         cp unhandled-exception-base-configuration.config unhandled-exception-test-case.2.exe.config
1684         cp unhandled-exception-legacy-configuration.config unhandled-exception-test-case-legacy.1.exe.config
1685         cp unhandled-exception-legacy-configuration.config unhandled-exception-test-case-legacy.2.exe.config
1686
1687 unhandled-exception-test-runner.2.exe: unhandled-exception-config_files unhandled-exception-test-case.1.exe unhandled-exception-test-case-legacy.1.exe  unhandled-exception-test-case.2.exe unhandled-exception-test-case-legacy.2.exe
1688
1689 test-unhandled-exception: unhandled-exception-test-runner.2.exe
1690         $(Q) $(RUNTIME) unhandled-exception-test-runner.2.exe RUNTIME:../mini/mono,GTC:F
1691
1692 safehandle.2.exe winx64structs.exe thunks.exe pinvoke3.exe pinvoke2.exe pinvoke-2.2.exe pinvoke17.exe pinvoke13.exe \
1693         pinvoke11.exe pinvoke_ppcs.exe pinvoke_ppci.exe pinvoke_ppcf.exe pinvoke_ppcd.exe pinvoke_ppcc.exe pinvoke.exe \
1694         marshalbool.exe marshal9.exe marshal5.exe marshal.exe handleref.exe cominterop.exe bug-Xamarin-5278.exe: libtest.la
1695
1696 event-get.2.exe$(PLATFORM_AOT_SUFFIX): event-il.exe$(PLATFORM_AOT_SUFFIX)
1697 event-get.2.exe: event-il.exe
1698
1699 module-cctor-loader.2.exe$(PLATFORM_AOT_SUFFIX): module-cctor.exe$(PLATFORM_AOT_SUFFIX)
1700 module-cctor-loader.2.exe: module-cctor.exe
1701
1702 reference-loader.exe$(PLATFORM_AOT_SUFFIX): TestingReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX) TestingReferenceReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX)
1703 reference-loader.exe: TestingReferenceAssembly.dll TestingReferenceReferenceAssembly.dll
1704
1705 assemblyresolve_asm.dll$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX)
1706         MONO_PATH="assemblyresolve_deps:$(CLASS)" $(top_builddir)/runtime/mono-wrapper $(AOT_BUILD_FLAGS) assemblyresolve_asm.dll
1707 assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX)
1708
1709 EXTRA_DIST += assemblyresolve_TestBase.cs assemblyresolve_Test.cs assemblyresolve_asm.cs 
1710 assemblyresolve_deps:
1711         mkdir -p assemblyresolve_deps
1712 assemblyresolve_deps/TestBase.dll: assemblyresolve_deps $(srcdir)/assemblyresolve_TestBase.cs
1713         $(MCS) -target:library -out:assemblyresolve_deps/TestBase.dll $(srcdir)/assemblyresolve_TestBase.cs
1714 assemblyresolve_deps/Test.dll: assemblyresolve_deps assemblyresolve_deps/TestBase.dll $(srcdir)/assemblyresolve_Test.cs
1715         $(MCS) -target:library -r:assemblyresolve_deps/TestBase.dll -out:assemblyresolve_deps/Test.dll $(srcdir)/assemblyresolve_Test.cs
1716 assemblyresolve_asm.dll: assemblyresolve_deps/Test.dll $(srcdir)/assemblyresolve_asm.cs
1717         $(MCS) -target:library -r:assemblyresolve_deps/TestBase.dll -r:assemblyresolve_deps/Test.dll -out:assemblyresolve_asm.dll $(srcdir)/assemblyresolve_asm.cs
1718
1719 assemblyresolve_event3.exe$(PLATFORM_AOT_SUFFIX): assemblyresolve_asm.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX)
1720 assemblyresolve_event3.exe: assemblyresolve_asm.dll assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll
1721
1722 assemblyresolve_event4.exe$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX) assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX)
1723 assemblyresolve_event4.exe: assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll
1724
1725 EXTRA_DIST += assemblyresolve_event5_label.cs assemblyresolve_event5_helper.cs
1726 assemblyresolve_deps/assemblyresolve_event5_label.dll: assemblyresolve_event5_label.cs assemblyresolve_deps 
1727         $(MCS) -target:library -out:assemblyresolve_deps/assemblyresolve_event5_label.dll $(srcdir)/assemblyresolve_event5_label.cs
1728 assemblyresolve_event5_helper.dll: assemblyresolve_event5_helper.cs assemblyresolve_deps/assemblyresolve_event5_label.dll
1729         $(MCS) -target:library -out:assemblyresolve_event5_helper.dll -r:assemblyresolve_deps/assemblyresolve_event5_label.dll $(srcdir)/assemblyresolve_event5_helper.cs
1730 assemblyresolve_event5.exe: assemblyresolve_event5_helper.dll
1731
1732 # We use 'test-support-files' to handle an ordering issue between the 'mono/' and 'runtime/' directories
1733 bug-80307.exe: $(srcdir)/bug-80307.cs
1734         $(MCS) -r:$(CLASS)/System.Web.dll -out:$@ $(srcdir)/bug-80307.cs
1735         cd $(top_builddir)/runtime && $(MAKE) test-support-files
1736
1737 EXTRA_DIST += bug-81673-interface.cs
1738
1739 bug-81673.exe$(PLATFORM_AOT_SUFFIX): bug-81673-interface.dll$(PLATFORM_AOT_SUFFIX)
1740 bug-81673.exe bug-81673-interface.dll: $(srcdir)/bug-81673.cs $(srcdir)/bug-81673-interface.cs
1741         $(MCS) -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
1742         $(MCS) -r:bug-81673-interface.dll -out:bug-81673.exe $(srcdir)/bug-81673.cs
1743         $(MCS) -define:WITH_STOP -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
1744
1745 EXTRA_DIST += bug-36848-a.cs
1746
1747 bug-36848.exe$(PLATFORM_AOT_SUFFIX): bug-36848-a.dll$(PLATFORM_AOT_SUFFIX)
1748 bug-36848.exe bug-36848-a.dll: $(srcdir)/bug-36848.cs $(srcdir)/bug-36848-a.cs
1749         $(MCS) -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs
1750         $(MCS) -r:bug-36848-a.dll -out:bug-36848.exe $(srcdir)/bug-36848.cs
1751         $(MCS) -define:WITH_STOP -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs
1752
1753 EXTRA_DIST += bug-81691-a.cs bug-81691-b.cs
1754
1755 bug-81691.exe$(PLATFORM_AOT_SUFFIX): bug-81691-b.dll$(PLATFORM_AOT_SUFFIX)
1756 bug-81691.exe bug-81691-a.dll bug-81691-b.dll: $(srcdir)/bug-81691.cs $(srcdir)/bug-81691-a.cs $(srcdir)/bug-81691-b.cs
1757         $(MCS) -target:library -out:bug-81691-a.dll $(srcdir)/bug-81691-a.cs 
1758         $(MCS) -r:bug-81691-a.dll -target:library -out:bug-81691-b.dll $(srcdir)/bug-81691-b.cs
1759         $(MCS) -r:bug-81691-b.dll -out:bug-81691.exe $(srcdir)/bug-81691.cs
1760         rm -f bug-81691-a.dll
1761
1762 EXTRA_DIST += bug-81466-lib.il
1763
1764 bug-81466.exe$(PLATFORM_AOT_SUFFIX): bug-81466-lib.dll$(PLATFORM_AOT_SUFFIX)
1765 bug-81466.exe bug-81466-lib.dll: $(srcdir)/bug-81466.il $(srcdir)/bug-81466-lib.il
1766         $(ILASM) /dll /output:bug-81466-lib.dll $(srcdir)/bug-81466-lib.il
1767         $(ILASM) /exe /output:bug-81466.exe $(srcdir)/bug-81466.il
1768
1769 EXTRA_DIST += bug-324535-il.il
1770
1771 bug-324535.exe$(PLATFORM_AOT_SUFFIX): bug-324535-il.dll$(PLATFORM_AOT_SUFFIX)
1772 bug-324535.exe bug-324535-il.dll: $(srcdir)/bug-324535.cs $(srcdir)/bug-324535-il.il
1773         $(ILASM) /dll /output:bug-324535-il.dll $(srcdir)/bug-324535-il.il
1774         $(MCS) -r:bug-324535-il.dll -out:bug-324535.exe $(srcdir)/bug-324535.cs
1775
1776 EXTRA_DIST += custom-modifiers.2.cs custom-modifiers-lib.il
1777
1778 custom-modifiers.2.exe$(PLATFORM_AOT_SUFFIX): custom-modifiers-lib.dll$(PLATFORM_AOT_SUFFIX)
1779 custom-modifiers.2.exe custom-modifiers-lib.dll: $(srcdir)/custom-modifiers.2.cs $(srcdir)/custom-modifiers-lib.il
1780         $(ILASM) /dll /output:custom-modifiers-lib.dll $(srcdir)/custom-modifiers-lib.il
1781         $(MCS) -r:custom-modifiers-lib.dll -out:custom-modifiers.2.exe $(srcdir)/custom-modifiers.2.cs
1782
1783 EXTRA_DIST += bug-382986-lib.cs
1784
1785 bug-382986.exe$(PLATFORM_AOT_SUFFIX): bug-382986-lib.dll$(PLATFORM_AOT_SUFFIX)
1786 bug-382986.exe bug-382986-lib.dll: $(srcdir)/bug-382986.cs $(srcdir)/bug-382986-lib.cs
1787         $(MCS) -target:library -out:bug-382986-lib.dll $(srcdir)/bug-382986-lib.cs
1788         $(MCS) -r:bug-382986-lib.dll -out:bug-382986.exe $(srcdir)/bug-382986.cs
1789
1790 EXTRA_DIST += bug-17537-helper.cs
1791
1792 bug-17537.exe$(PLATFORM_AOT_SUFFIX): bug-17537-helper.exe$(PLATFORM_AOT_SUFFIX)
1793 bug-17537-helper.exe: $(srcdir)/bug-17537-helper.cs
1794         $(MCS) -out:$@ $<
1795         chmod -x $@
1796 bug-17537.exe: bug-17537-helper.exe
1797
1798 EXTRA_DIST += coreclr-security.cs
1799
1800 test-coreclr-security : coreclr-security.exe
1801         @$(RUNTIME_MOONLIGHT) --security=core-clr-test coreclr-security.exe
1802
1803 EXTRA_DIST += generic-unboxing.2.il generic-boxing.2.il
1804
1805 generic-unboxing.2.dll: $(srcdir)/generic-unboxing.2.il
1806         $(ILASM) /dll /output:$@ $<
1807 generic-boxing.2.dll: $(srcdir)/generic-boxing.2.il generic-unboxing.2.dll
1808         $(ILASM) /dll /output:$@ $<
1809
1810 EXTRA_DIST += generic-unbox.2.cs
1811
1812 generic-unbox.2.exe$(PLATFORM_AOT_SUFFIX): generic-unboxing.2.dll$(PLATFORM_AOT_SUFFIX)
1813 generic-unbox.2.exe: $(srcdir)/generic-unbox.2.cs generic-unboxing.2.dll
1814         $(MCS) -r:generic-unboxing.2.dll -out:$@ $<
1815
1816 EXTRA_DIST += generic-box.2.cs
1817
1818 generic-box.2.exe$(PLATFORM_AOT_SUFFIX): generic-unboxing.2.dll$(PLATFORM_AOT_SUFFIX) generic-boxing.2.dll$(PLATFORM_AOT_SUFFIX)
1819 generic-box.2.exe : $(srcdir)/generic-box.2.cs generic-unboxing.2.dll generic-boxing.2.dll
1820         $(MCS) -r:generic-unboxing.2.dll,generic-boxing.2.dll -out:$@ $<
1821
1822 EXTRA_DIST += generic-delegate2.2.cs generic-delegate2-lib.2.il
1823
1824 generic-delegate2-lib.2.dll: $(srcdir)/generic-delegate2-lib.2.il
1825         $(ILASM) /dll /output:$@ $<
1826
1827 generic-delegate2.2.exe$(PLATFORM_AOT_SUFFIX): generic-delegate2-lib.2.dll$(PLATFORM_AOT_SUFFIX)
1828 generic-delegate2.2.exe: $(srcdir)/generic-delegate2.2.cs generic-delegate2-lib.2.dll
1829         $(MCS) -r:generic-delegate2-lib.2.dll -out:$@ $<
1830
1831 bug-3903.exe: bug-3903.cs
1832         $(MCS_NO_LIB)  $(srcdir)/bug-3903.cs -nostdlib -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/mscorlib.dll -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/System.Core.dll -out:$@
1833
1834 gshared:
1835         $(MAKE) test-generic-sharing
1836
1837 gshared-aot:
1838         @$(MAKE) AOT=1 gshared
1839
1840 test-generic-sharing-normal: $(TESTS_GSHARED) $(TESTSAOT_GSHARED)
1841         @for fn in $+ ; do      \
1842                 echo "Testing $$fn ...";        \
1843                 $(RUNTIME) -O=gshared                $$fn > $$fn.stdout || exit 1;      \
1844                 $(RUNTIME) -O=gshared,shared         $$fn > $$fn.stdout || exit 1;      \
1845                 $(RUNTIME) -O=gshared,-inline        $$fn > $$fn.stdout || exit 1;      \
1846                 $(RUNTIME) -O=gshared,-inline,shared $$fn > $fn.stdout || exit 1;       \
1847                 if [ x$(AOT) = x1 ]; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $$fn > /dev/null || exit 1; $(RUNTIME) $$fn > $$fn.stdout || exit 1; fi; \
1848         done
1849
1850 test-generic-sharing-managed: test-runner.exe $(TESTS_GSHARED) $(TESTSAOT_GSHARED) 
1851         $(Q) $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name "gshared" --disabled "$(DISABLED_TESTS)" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(TESTS_GSHARED)
1852
1853 test-generic-sharing:
1854         @if test x$(M) != x0; then $(MAKE) test-generic-sharing-managed; else $(MAKE) test-generic-sharing-normal; fi
1855
1856 EXTRA_DIST += async-exceptions.cs
1857 async-exceptions.exe : async-exceptions.cs
1858         $(MCS) -out:async-exceptions.exe $(srcdir)/async-exceptions.cs
1859 test-async-exceptions : async-exceptions.exe
1860         for i in `echo 0 1 2 3 4 5 6 7 8 9 10`; do $(RUNTIME) --inject-async-exc Tests:foo $$i async-exceptions.exe || exit 1; done
1861         for i in `echo 0 1 2 3 4 5 6 7 8 9 10`; do $(RUNTIME) --inject-async-exc Tests:bar $$i async-exceptions.exe || exit 1; done
1862
1863 EXTRA_DIST += modules.cs modules-m1.cs
1864 modules-m1.netmodule: modules-m1.cs
1865         $(MCS) -out:$@ /target:module $(srcdir)/modules-m1.cs
1866 modules.exe: modules.cs modules-m1.netmodule $(TEST_DRIVER_DEPEND) 
1867         $(MCS) -out:$@ /addmodule:modules-m1.netmodule -r:TestDriver.dll $(srcdir)/modules.cs
1868
1869 # Useful if mono is compiled with --enable-shared=no
1870 patch-libtool:
1871         cp "../../libtool" .
1872         sed -e 's,build_libtool_libs=no,build_libtool_libs=yes,g' libtool > 2; mv 2 libtool
1873         sed -e 's,LIBTOOL =,LIBTOOL2 =,g' Makefile > 2 && echo "LIBTOOL = bash ./libtool" > 1 && cat 1 2 > Makefile
1874         touch libtest.c
1875
1876
1877 EXTRA_DIST += threadpool-in-processexit.cs threadpool-in-processexit.exe.stdout.expected
1878 test-process-exit:
1879         @$(MCS) $(srcdir)/threadpool-in-processexit.cs -out:threadpool-in-processexit.exe
1880         @echo "Testing threadpool-in-processexit.exe..."
1881         @$(RUNTIME) threadpool-in-processexit.exe > threadpool-in-processexit.exe.stdout
1882         @diff -w threadpool-in-processexit.exe.stdout $(srcdir)/threadpool-in-processexit.exe.stdout.expected
1883
1884 # tests that expect a 1 exit code
1885 TESTS_UNHANDLED_EXCEPTION_1_SRC =       \
1886         unhandled-exception-1.cs
1887
1888 # tests that expect a 255 exit code
1889 TESTS_UNHANDLED_EXCEPTION_255_SRC =     \
1890         unhandled-exception-2.cs        \
1891         unhandled-exception-3.cs        \
1892         unhandled-exception-4.cs        \
1893         unhandled-exception-5.cs        \
1894         unhandled-exception-6.cs        \
1895         unhandled-exception-7.cs        \
1896         unhandled-exception-8.cs
1897
1898 TESTS_UNHANDLED_EXCEPTION_1=$(filter-out $(DISABLED_TESTS),$(TESTS_UNHANDLED_EXCEPTION_1_SRC:.cs=.exe))
1899 TESTS_UNHANDLED_EXCEPTION_255=$(filter-out $(DISABLED_TESTS),$(TESTS_UNHANDLED_EXCEPTION_255_SRC:.cs=.exe))
1900
1901 if FULL_AOT_TESTS
1902 TESTSAOT_UNHANDLED_EXCEPTION_1=$(TESTS_UNHANDLED_EXCEPTION_1:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1903 TESTSAOT_UNHANDLED_EXCEPTION_255=$(TESTS_UNHANDLED_EXCEPTION_255:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1904 endif
1905
1906 if HYBRID_AOT_TESTS
1907 TESTSAOT_UNHANDLED_EXCEPTION_1=$(TESTS_UNHANDLED_EXCEPTION_1:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1908 TESTSAOT_UNHANDLED_EXCEPTION_255=$(TESTS_UNHANDLED_EXCEPTION_255:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1909 endif
1910
1911 test-unhandled-exception-2: $(TESTS_UNHANDLED_EXCEPTION_1) $(TESTS_UNHANDLED_EXCEPTION_255) $(TESTSAOT_UNHANDLED_EXCEPTION_1) $(TESTSAOT_UNHANDLED_EXCEPTION_255)
1912         ok=; \
1913         $(MAKE) test-unhandled-exception-2-1-with-managed-handler || ok=false; \
1914         $(MAKE) test-unhandled-exception-2-1-without-managed-handler || ok=false; \
1915         $(MAKE) test-unhandled-exception-2-255-with-managed-handler || ok=false; \
1916         $(MAKE) test-unhandled-exception-2-255-without-managed-handler || ok=false; \
1917         $$ok
1918
1919 test-unhandled-exception-2-1-with-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_1) $(TESTSAOT_UNHANDLED_EXCEPTION_1) test-runner.exe
1920         $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(TESTS_UNHANDLED_EXCEPTION_1)
1921 test-unhandled-exception-2-1-without-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_1) $(TESTSAOT_UNHANDLED_EXCEPTION_1) test-runner.exe
1922         TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 1 $(TESTS_UNHANDLED_EXCEPTION_1)
1923 test-unhandled-exception-2-255-with-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_255) $(TESTSAOT_UNHANDLED_EXCEPTION_255) test-runner.exe
1924         $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(TESTS_UNHANDLED_EXCEPTION_255)
1925 test-unhandled-exception-2-255-without-managed-handler: $(TESTS_UNHANDLED_EXCEPTION_255) $(TESTSAOT_UNHANDLED_EXCEPTION_255) test-runner.exe
1926         TEST_UNHANDLED_EXCEPTION_HANDLER=1 $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --expected-exit-code 255 $(TESTS_UNHANDLED_EXCEPTION_255)
1927
1928 EXTRA_DIST += appdomain-loader.cs appdomain-tester.cs
1929
1930 if FULL_AOT_TESTS
1931 test-appdomain-unload:
1932 else
1933 appdomain-loader.exe: appdomain-tester.exe
1934
1935 test-appdomain-unload: appdomain-loader.exe appdomain-tester.exe
1936         $(RUNTIME) -O=gshared appdomain-loader.exe > appdomain-loader.exe.1.stdout || exit 1;
1937         $(RUNTIME) appdomain-loader.exe > appdomain-loader.exe.2.stdout || exit 1;
1938         MONO_DEBUG_ASSEMBLY_UNLOAD=1 $(RUNTIME) -O=gshared appdomain-loader.exe > appdomain-loader.exe.3.stdout || exit 1;
1939         MONO_DEBUG_ASSEMBLY_UNLOAD=1 $(RUNTIME) appdomain-loader.exe > appdomain-loader.exe.4.stdout || exit 1;
1940 endif
1941
1942 EXTRA_DIST += console-output.cs console-output.exe.stderr.expected console-output.exe.stdout.expected
1943 test-console-output: console-output.exe
1944         @$(RUNTIME) console-output.exe 1>console-output.exe.stdout
1945         @$(RUNTIME) console-output.exe 2>console-output.exe.stderr
1946         @diff -w console-output.exe.stdout $(srcdir)/console-output.exe.stdout.expected \
1947                 && diff -w console-output.exe.stderr $(srcdir)/console-output.exe.stderr.expected
1948
1949 test-pedump: test-runner.exe
1950         $(with_mono_path) $(mono_build_root)/tools/pedump/pedump --verify error test-runner.exe
1951
1952 .PHONY: test-gac-loading test-eglib-remap
1953
1954 runtest-gac-loading: test-runner.exe
1955         $(MAKE) -C testing_gac runtest
1956
1957 compile-gac-loading:
1958         $(MAKE) -C testing_gac compile-tests
1959
1960 TESTS_STRESS_PROCESS_SRC=       \
1961                 process-stress-1.cs     \
1962                 process-stress-2.cs     \
1963                 process-stress-3.cs     \
1964                 process-leak.cs
1965
1966 TESTS_STRESS_PROCESS=$(filter-out $(DISABLED_TESTS),$(TESTS_STRESS_PROCESS_SRC:.cs=.exe))
1967
1968 if FULL_AOT_TESTS
1969 TESTSAOT_STRESS_PROCESS=$(TESTS_STRESS_PROCESS:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1970 endif
1971
1972 if HYBRID_AOT_TESTS
1973 TESTSAOT_STRESS_PROCESS=$(TESTS_STRESS_PROCESS:.exe=.exe$(PLATFORM_AOT_SUFFIX))
1974 endif
1975
1976 test-process-stress: $(TESTS_STRESS_PROCESS) $(TESTSAOT_STRESS_PROCESS) test-runner.exe
1977         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ --disabled "$(DISABLED_TESTS)" --timeout 600 $(TESTS_STRESS_PROCESS)
1978
1979 coreclr-gcstress:
1980         $(MAKE) -C $(mono_build_root)/acceptance-tests coreclr-gcstress
1981
1982 # Tests for the Mono lldb plugin
1983 EXTRA_DIST += test_lldb.py test-lldb.cs
1984 test-lldb: test-lldb.exe
1985         python test_lldb.py $(JITTEST_PROG)
1986
1987 noinst_LTLIBRARIES = libtest.la
1988
1989 AM_CPPFLAGS = $(GLIB_CFLAGS)
1990
1991 if HOST_WIN32
1992 # gcc-3.4.4 emits incorrect code when making indirect calls to stdcall functions using a tail call
1993 # This shows up when compiling mono_test_marshal_delegate ()
1994 libtest_la_CFLAGS=-fno-optimize-sibling-calls
1995 # the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET
1996 # can't find them. So we use --kill-at to remove the @ suffix as well.
1997 libtest_la_LDFLAGS=-no-undefined -rpath `pwd` -Wl,--kill-at
1998 else
1999 libtest_la_LDFLAGS = -rpath `pwd`
2000 endif
2001 libtest_la_SOURCES = libtest.c
2002 libtest_la_LIBADD = $(GLIB_LIBS) $(LIBICONV)
2003
2004 INTERNALSVISIBLETO_TEST_SRC = \
2005         internalsvisibleto-runtimetest.cs \
2006         internalsvisibleto-compilertest.cs
2007
2008 INTERNALSVISIBLETO_TEST_LIB_SRC = \
2009         internalsvisibleto-library.cs
2010
2011 INTERNALSVISIBLETO_TEST = \
2012         $(INTERNALSVISIBLETO_TEST_SRC:.cs=.exe)
2013
2014 EXTRA_DIST += $(INTERNALSVISIBLETO_TEST_SRC) $(INTERNALSVISIBLETO_TEST_LIB_SRC)
2015
2016 test-internalsvisibleto: test-runner.exe $(INTERNALSVISIBLETO_TEST)
2017         $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ $(INTERNALSVISIBLETO_TEST)
2018
2019 internalsvisibleto-runtimetest.exe: internalsvisibleto-runtimetest.cs internalsvisibleto-library.cs
2020         $(Q) $(MCS) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE -d:PERMISSIVE internalsvisibleto-library.cs 
2021         $(Q) $(MCS) -out:internalsvisibleto-wrongcase.dll -target:library -d:WRONG_CASE -d:PERMISSIVE internalsvisibleto-library.cs
2022         $(Q) $(MCS) -out:internalsvisibleto-runtimetest.exe -warn:0 -r:internalsvisibleto-correctcase.dll -r:internalsvisibleto-wrongcase.dll internalsvisibleto-runtimetest.cs
2023         $(Q) $(MCS) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs       
2024         $(Q) $(MCS) -out:internalsvisibleto-wrongcase.dll -target:library -d:WRONG_CASE internalsvisibleto-library.cs
2025
2026 internalsvisibleto-compilertest.exe: internalsvisibleto-compilertest.cs internalsvisibleto-library.cs
2027         $(Q) $(MCS) -out:internalsvisibleto-correctcase-2.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs     
2028         $(Q) $(MCS) -out:internalsvisibleto-wrongcase-2.dll -target:library -d:WRONG_CASE internalsvisibleto-library.cs
2029         $(Q) $(MCS) -out:internalsvisibleto-compilertest.exe -warn:0 -r:internalsvisibleto-correctcase-2.dll -r:internalsvisibleto-wrongcase-2.dll internalsvisibleto-compilertest.cs
2030
2031 CLEANFILES = $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH) $(TESTS_STRESS) $(TESTSAOT_CS) $(TESTSAOT_IL) $(TESTSAOT_BENCH) $(TESTSAOT_STRESS) *.dll *.stdout *.aotlog *.exe stest.dat