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