Test for bug #82635.
[mono.git] / mono / tests / Makefile.am
1 SUBDIRS = cas
2
3 check-local: test
4
5 TEST_PROG = ../interpreter/mint
6 JITTEST_PROG = ../mini/mono
7
8 TEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(TEST_PROG)
9 JITTEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mono_build_root)/runtime/etc $(LIBTOOL) --mode=execute $(JITTEST_PROG)
10
11 RUNTIME_ARGS=--config tests-config --optimize=all
12
13 with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/default
14 with_mono_path2 = MONO_PATH=$(mcs_topdir)/class/lib/net_2_0
15 with_mono_path21 = MONO_PATH=$(mcs_topdir)/class/lib/net_2_1
16
17 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
18 RUNTIME2 = $(with_mono_path2) $(top_builddir)/runtime/mono-wrapper
19 RUNTIME21 = $(with_mono_path21) $(top_builddir)/runtime/mono-wrapper
20
21 MKBUNDLE = \
22         PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
23         $(RUNTIME) $(mcs_topdir)/class/lib/default/mkbundle.exe
24
25 MCS = $(RUNTIME) $(mcs_topdir)/class/lib/default/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
26 GMCS = $(RUNTIME2) $(mcs_topdir)/class/lib/net_2_0/gmcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
27 SMCS = $(RUNTIME21) $(mcs_topdir)/class/lib/net_2_1/smcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219
28 ILASM = $(RUNTIME) $(mcs_topdir)/class/lib/default/ilasm.exe
29 ILASM2 = $(RUNTIME2) $(mcs_topdir)/class/lib/net_2_0/ilasm.exe
30
31 BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
32
33 STRESS_TESTS_SRC=       \
34         abort-stress-1.cs       \
35         abort-stress-2.cs       \
36         abort-stress-3.cs       \
37         domain-stress.cs        \
38         gchandle-stress.cs      \
39         monitor-stress.cs       \
40         thread-stress.cs        \
41         gc-stress.cs
42
43 TEST_CS_SRC=                    \
44         array-init.cs           \
45         arraylist.cs            \
46         checked.cs              \
47         char-isnumber.cs        \
48         create-instance.cs      \
49         field-layout.cs         \
50         pack-layout.cs          \
51         pack-bug.cs             \
52         hash-table.cs           \
53         test-ops.cs             \
54         obj.cs                  \
55         test-dup-mp.cs          \
56         string.cs               \
57         stringbuilder.cs        \
58         switch.cs               \
59         outparm.cs              \
60         delegate.cs             \
61         bitconverter.cs         \
62         exception.cs            \
63         exception2.cs           \
64         exception3.cs           \
65         exception4.cs           \
66         exception5.cs           \
67         exception6.cs           \
68         exception7.cs           \
69         exception8.cs           \
70         exception10.cs          \
71         exception11.cs          \
72         exception12.cs          \
73         exception13.cs          \
74         exception14.cs          \
75         exception15.cs          \
76         exception16.cs          \
77         typeload-unaligned.cs   \
78         struct.cs               \
79         valuetype-gettype.cs    \
80         typeof-ptr.cs           \
81         static-constructor.cs   \
82         pinvoke.cs              \
83         pinvoke2.cs             \
84         pinvoke3.cs             \
85         pinvoke11.cs            \
86         pinvoke13.cs            \
87         pinvoke17.cs            \
88         invoke.cs               \
89         invoke2.cs              \
90         runtime-invoke.cs               \
91         invoke-string-ctors.cs          \
92         reinit.cs               \
93         box.cs                  \
94         array.cs                \
95         enum.cs                 \
96         enum2.cs                \
97         property.cs             \
98         enumcast.cs             \
99         assignable-tests.cs     \
100         array-cast.cs           \
101         array-subtype-attr.cs   \
102         cattr-compile.cs        \
103         cattr-field.cs          \
104         cattr-object.cs         \
105         custom-attr.cs          \
106         double-cast.cs          \
107         newobj-valuetype.cs     \
108         arraylist-clone.cs      \
109         setenv.cs               \
110         vtype.cs                \
111         isvaluetype.cs          \
112         iface6.cs               \
113         iface7.cs               \
114         ipaddress.cs            \
115         array-vt.cs             \
116         interface1.cs           \
117         reflection-enum.cs      \
118         reflection-prop.cs      \
119         reflection4.cs          \
120         reflection5.cs          \
121         reflection-const-field.cs \
122         many-locals.cs          \
123         string-compare.cs       \
124         test-prime.cs           \
125         params.cs               \
126         reflection.cs           \
127         interface.cs            \
128         iface.cs                \
129         iface2.cs               \
130         iface3.cs               \
131         iface4.cs               \
132         iface-large.cs          \
133         virtual-method.cs       \
134         intptrcast.cs           \
135         indexer.cs              \
136         stream.cs               \
137         console.cs              \
138         shift.cs                \
139         jit-int.cs              \
140         jit-uint.cs             \
141         jit-long.cs             \
142         long.cs                 \
143         jit-ulong.cs            \
144         jit-float.cs            \
145         pop.cs                  \
146         time.cs                 \
147         appdomain.cs        \
148         appdomain1.cs           \
149         appdomain2.cs           \
150         appdomain-client.cs     \
151         appdomain-unload.cs \
152         loader.cs       \
153         pointer.cs              \
154         hashcode.cs             \
155         delegate1.cs            \
156         delegate2.cs            \
157         delegate3.cs            \
158         delegate5.cs            \
159         delegate6.cs            \
160         delegate7.cs            \
161         delegate8.cs            \
162         remoting1.cs            \
163         remoting2.cs            \
164         remoting3.cs            \
165         remoting4.cs            \
166         remoting5.cs            \
167         nonvirt.cs              \
168         largeexp.cs             \
169         largeexp2.cs            \
170         marshalbyref1.cs        \
171         static-ctor.cs          \
172         inctest.cs              \
173         bound.cs                \
174         array-invoke.cs         \
175         test-arr.cs             \
176         decimal.cs              \
177         decimal-array.cs        \
178         marshal.cs              \
179         marshal1.cs             \
180         marshal2.cs             \
181         marshal3.cs             \
182         marshal5.cs             \
183         marshal6.cs             \
184         marshal7.cs             \
185         marshal8.cs             \
186         marshal9.cs             \
187         test-byval-in-struct.cs \
188         thread.cs               \
189         thread5.cs              \
190         thread6.cs              \
191         thread-static.cs        \
192         thread-static-init.cs   \
193         context-static.cs       \
194         float-pop.cs            \
195         interfacecast.cs        \
196         array3.cs               \
197         classinit.cs            \
198         classinit2.cs           \
199         synchronized.cs         \
200         async_read.cs           \
201         threadpool.cs           \
202         threadpool1.cs          \
203         base-definition.cs      \
204         bug-27420.cs            \
205         bug-47295.cs            \
206         bug-46781.cs            \
207         bug-48015.cs            \
208         bug-42136.cs            \
209         bug-59286.cs            \
210         bug-70561.cs            \
211         bug-78311.cs            \
212         bug-78653.cs            \
213         bug-78656.cs            \
214         bug-77127.cs            \
215         interlocked.cs          \
216         cross-domain.cs         \
217         appdomain-exit.cs       \
218         delegate-async-exit.cs  \
219         delegate-delegate-exit.cs       \
220         delegate-exit.cs        \
221         finalizer-abort.cs      \
222         finalizer-exception.cs  \
223         finalizer-exit.cs       \
224         main-exit.cs    \
225         main-returns-abort-resetabort.cs        \
226         main-returns-background-abort-resetabort.cs     \
227         main-returns-background-resetabort.cs   \
228         main-returns-background.cs      \
229         main-returns-background-change.cs       \
230         main-returns.cs         \
231         subthread-exit.cs       \
232         desweak.cs              \
233         cominterop.cs           \
234         exists.cs               \
235         handleref.cs    \
236         transparentproxy.cs
237
238 if X86
239 # bug #71274
240 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
241 endif
242
243 if POWERPC
244 # bug #71274
245 PLATFORM_DISABLED_TESTS=finalizer-abort.exe finalizer-exception.exe finalizer-exit.exe
246 endif
247
248 DISABLED_TESTS=                 \
249         delegate-async-exception.exe    \
250         delegate-delegate-exception.exe \
251         appdomain-unload.exe            \
252         $(PLATFORM_DISABLED_TESTS)
253
254 # These only compile with MS CSC
255 TEST_CSC_SRC=                   \
256         vararg.cs
257
258 TEST_IL_SRC=                    \
259         field-access.il         \
260         method-access.il        \
261         ldftn-access.il         \
262         cpblkTest.il            \
263         vbinterface.il          \
264         jmpTest.il              \
265         calliTest.il            \
266         ckfiniteTest.il         \
267         fault-handler.il                \
268         locallocTest.il         \
269         long-shift-regalloc.il          \
270         initblkTest.il          \
271         qt-instance.il          \
272         vararg.il               \
273         bug-29859.il            \
274         bug-78549.il            \
275         static-fields-nonconst.il       \
276         reload-at-bb-end.il     \
277         test-enum-indstoreil.il \
278         filter-bug.il           \
279         even-odd.il             \
280         bug-82022.il    \
281         enum_types.il
282
283 TEST_CS2_SRC = \
284         interlocked-2.2.cs      \
285         pinvoke-2.2.cs          \
286         bug-78431.2.cs          \
287         bug-79684.2.cs          \
288         catch-generics.2.cs     \
289         event-get.2.cs          \
290         safehandle.2.cs         \
291         stackframes-async.2.cs          \
292         module-cctor-loader.2.cs        \
293         generics-invoke-byref.2.cs      \
294         generic-signature-compare.2.cs  \
295         bug-80392.2.cs          \
296         bug-82194.2.cs
297
298 TEST_IL2_SRC = find-method.2.il \
299         bug-79215.2.il  \
300         bug-79956.2.il  \
301         ldtoken_with_byref_typespec.2.il
302
303 # pre-requisite test sources: files that are not test themselves
304 # but that need to be compiled
305 PREREQ_IL_SRC=event-il.il module-cctor.il
306 PREREQ_CS_SRC=
307 PREREQ_IL_DLL_SRC=event-il.il module-cctor.il
308 PREREQ_CS_DLL_SRC=
309
310 PREREQSI_IL=$(PREREQ_IL_SRC:.il=.exe)
311 PREREQSI_CS=$(PREREQ_CS_SRC:.cs=.exe)
312 TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
313 TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
314 TESTSI_CS2=$(TEST_CS2_SRC:.2.cs=.exe)
315 TESTSI_IL2=$(TEST_IL2_SRC:.2.il=.exe)
316 TESTBS=$(BENCHSRC:.cs=.exe)
317 STRESS_TESTS=$(STRESS_TESTS_SRC:.cs=.exe)
318
319 EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_CS2_SRC) $(TEST_IL_SRC) $(TEST_IL2_SRC) \
320         $(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl $(PREREQ_IL_SRC) $(PREREQ_CS_SRC)
321
322 %.exe: %.2.il
323         $(ILASM2) -out:$@ $<
324
325 %.exe: %.il
326         $(ILASM) -out:$@ $<
327
328 %.exe: %.2.cs TestDriver.dll
329         $(GMCS) -r:TestDriver.dll -out:$@ $<
330
331 %.exe: %.cs TestDriver.dll
332         $(MCS) -r:TestDriver.dll -out:$@ $<
333
334 # mkbundle works on ppc, but the pkg-config POC doesn't when run with make test
335 if POWERPC
336 test:   testjit test-type-load test-inline-call-stack test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466
337 else
338 # Can't use mkbundle on win32 since there is no static build there
339 if PLATFORM_WIN32
340 test:   testjit test-type-load test-inline-call-stack test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466
341 else
342 test:   testjit testbundle test-type-load test-inline-call-stack test-iomap-regression test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466
343 endif
344 endif
345
346 if INSTALL_2_1
347 test : test-coreclr-security
348 endif
349
350 TestDriver.dll:
351         $(MCS) -target:library -out:$@ $(srcdir)/../mini/TestDriver.cs
352
353 test_cs: $(TEST_PROG) $(TESTSI_CS) libtest.la
354         @failed=0; \
355         passed=0; \
356         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
357         for i in $(TESTSI_CS); do       \
358                 if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
359                 then \
360                         passed=`expr $${passed} + 1`; \
361                 else \
362                         if [ $$? = 2 ]; then break; fi; \
363                         failed=`expr $${failed} + 1`; \
364                 fi \
365         done; \
366         echo; echo ".cs: $${passed} test(s) passed. $${failed} test(s) did not pass."; echo
367
368 test_il: $(TEST_PROG) $(TESTSI_IL) libtest.la
369         @failed=0; \
370         passed=0; \
371         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
372         for i in $(TESTSI_IL); do       \
373                 if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
374                 then \
375                         passed=`expr $${passed} + 1`; \
376                 else \
377                         if [ $$? = 2 ]; then break; fi; \
378                         failed=`expr $${failed} + 1`; \
379                 fi \
380         done; \
381         echo; echo ".il: $${passed} test(s) passed. $${failed} test(s) did not pass."; echo
382
383 testb: $(TEST_PROG) $(TESTBS)
384         for i in $(TESTBS); do  \
385                 $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS);     \
386         done
387
388 testjit: testjit-default testjit-net_2_0
389
390 testjit-default: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
391         @failed=0; \
392         passed=0; \
393         failed_tests="";\
394         for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do        \
395                 rm -f $${i}.so; \
396                 if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
397                 then \
398                         passed=`expr $${passed} + 1`; \
399                 else \
400                         if [ $$? = 2 ]; then break; fi; \
401                         failed=`expr $${failed} + 1`; \
402                         failed_tests="$${failed_tests} $$i"; \
403                 fi \
404         done; \
405         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
406         if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
407           for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
408
409 testjit-net_2_0: $(TESTSI_CS2) $(TESTSI_IL2) libtest.la
410         @failed=0; \
411         passed=0; \
412         failed_tests="";\
413         for i in $(TESTSI_CS2) $(TESTSI_IL2); do        \
414                 rm -f $${i}.so; \
415                 if $(srcdir)/test-driver '$(with_mono_path2) $(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' $(RUNTIME_ARGS); \
416                 then \
417                         passed=`expr $${passed} + 1`; \
418                 else \
419                         if [ $$? = 2 ]; then break; fi; \
420                         failed=`expr $${failed} + 1`; \
421                         failed_tests="$${failed_tests} $$i"; \
422                 fi \
423         done; \
424         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
425         if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
426           for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
427
428 testaot: $(TESTSI_CS) $(TESTBS) libtest.la
429         @failed=0; \
430         passed=0; \
431         failed_tests="";\
432         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
433         for i in $(TESTSI_CS) $(TESTBS); do     \
434                 rm -f $${i}.so; \
435                 $(JITTEST_PROG_RUN) --aot $${i} > /dev/null; \
436                 if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
437                 then \
438                         passed=`expr $${passed} + 1`; \
439                 else \
440                         if [ $$? = 2 ]; then break; fi; \
441                         failed=`expr $${failed} + 1`; \
442                         failed_tests="$${failed_tests} $$i"; \
443                 fi \
444         done; \
445         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
446         if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
447           for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
448
449 testtrace:
450         $(MAKE) RUNTIME_ARGS="$${RUNTIME_ARGS} --trace" testjit
451
452 testinterp: $(TESTSI_CS) $(TESTSI_IL) libtest.la
453         @failed=0; \
454         passed=0; \
455         failed_tests="";\
456         export LD_LIBRARY_PATH="`pwd`/.libs:$${LD_LIBRARY_PATH}"; \
457         for i in $(TESTSI_CS) $(TESTSI_IL); do \
458                 if $(srcdir)/test-driver '$(with_mono_path) $(TEST_PROG_RUN)' $$i "$(DISABLED_TESTS)" $(RUNTIME_ARGS); \
459                 then \
460                         passed=`expr $${passed} + 1`; \
461                 else \
462                         if [ $$? = 2 ]; then break; fi; \
463                         failed=`expr $${failed} + 1`; \
464                         failed_tests="$${failed_tests} $$i"; \
465                 fi \
466         done; \
467         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
468         if [ $$failed != 0 ]; then echo -e "\nFailed tests:\n"; \
469           for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
470
471 testjitspeed: $(JITTEST_PROG) $(TESTBS)
472         for i in $(TESTBS); do  \
473                 echo $$i;       \
474                 time $(JITTEST_PROG) $$i;       \
475         done
476
477 test-iomap-regression: exists.cs
478         $(MCS) $(srcdir)/exists.cs -out:exists.exe
479         MONO_IOMAP=all $(RUNTIME) exists.exe
480
481 stresstest: $(STRESS_TESTS)
482         @failed=0; \
483         passed=0; \
484         failed_tests="";\
485         for i in $(STRESS_TESTS); do    \
486                 if $(srcdir)/stress-runner.pl $$i ../mini/mono $(RUNTIME_ARGS); \
487                 then \
488                         passed=`expr $${passed} + 1`; \
489                 else \
490                         if [ $$? = 2 ]; then break; fi; \
491                         failed=`expr $${failed} + 1`; \
492                         failed_tests="$${failed_tests} $$i"; \
493                 fi \
494         done; \
495         echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
496         if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
497           for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
498
499 testbundle: console.exe
500         $(MKBUNDLE) --static console.exe
501         $(with_mono_path) MONO_CFG_DIR=$(mono_cfg_dir) MONO_SHARED_DIR=$(mono_build_root)/runtime ./a.out
502         - rm -rf a.out
503
504 EXTRA_DIST += load-missing.il t-missing.cs load-exceptions.cs
505 test-type-load: TestDriver.dll
506         $(ILASM) /dll /output:load-missing.dll $(srcdir)/load-missing.il
507         $(MCS) -t:library -out:t.dll -d:FOUND $(srcdir)/t-missing.cs
508         $(MCS) -r:TestDriver.dll -r:load-missing.dll -r:t.dll -out:load-exceptions.exe $(srcdir)/load-exceptions.cs
509         $(MCS) -t:library -out:t.dll $(srcdir)/t-missing.cs
510         $(RUNTIME) load-exceptions.exe
511
512 EXTRA_DIST += test-inline-call-stack-library.cs test-inline-call-stack.cs
513 test-inline-call-stack-library.dll: TestDriver.dll $(srcdir)/test-inline-call-stack-library.cs
514         $(MCS) -t:library -out:test-inline-call-stack-library.dll $(srcdir)/test-inline-call-stack-library.cs
515 test-inline-call-stack.exe: TestDriver.dll test-inline-call-stack-library.dll $(srcdir)/test-inline-call-stack.cs
516         $(MCS) -r:TestDriver.dll -r:test-inline-call-stack-library.dll -out:test-inline-call-stack.exe $(srcdir)/test-inline-call-stack.cs
517 test-inline-call-stack: TestDriver.dll test-inline-call-stack-library.dll test-inline-call-stack.exe
518         $(RUNTIME) test-inline-call-stack.exe
519
520 EXTRA_DIST += bug-80307.cs
521 bug-80307.exe: $(srcdir)/bug-80307.cs
522         $(MCS) -r:System.Web -out:$@ $(srcdir)/bug-80307.cs
523
524 # We use 'test-support-files' to handle an ordering issue between the 'mono/' and 'runtime/' directories
525 test-bug-80307: bug-80307.exe
526         cd $(top_builddir)/runtime && $(MAKE) test-support-files
527         $(RUNTIME) bug-80307.exe
528
529 EXTRA_DIST += bug-81673.cs bug-81673-interface.cs
530 bug-81673.exe bug-81673-interface.dll: $(srcdir)/bug-81673.cs $(srcdir)/bug-81673-interface.cs
531         $(MCS) -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
532         $(MCS) -out:bug-81673.exe -r:bug-81673-interface.dll $(srcdir)/bug-81673.cs
533         $(MCS) -define:WITH_STOP -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
534
535 test-bug-81673 : bug-81673.exe bug-81673-interface.dll
536         $(RUNTIME) bug-81673.exe
537
538 EXTRA_DIST += bug-81691.cs bug-81691-a.cs bug-81691-b.cs
539 bug-81691.exe bug-81691-b.dll: $(srcdir)/bug-81691.cs $(srcdir)/bug-81691-a.cs $(srcdir)/bug-81691-b.cs
540         $(GMCS) -target:library -out:bug-81691-a.dll $(srcdir)/bug-81691-a.cs
541         $(GMCS) -target:library -out:bug-81691-b.dll -r:bug-81691-a.dll $(srcdir)/bug-81691-b.cs
542         $(GMCS) -r:bug-81691-b.dll -out:bug-81691.exe $(srcdir)/bug-81691.cs
543         rm -f bug-81691-a.dll
544
545 test-bug-81691 : bug-81691.exe bug-81691-b.dll
546         $(RUNTIME) bug-81691.exe
547
548 EXTRA_DIST += bug-81466.il bug-81466-lib.il
549 bug-81466-lib.dll: bug-81466-lib.il
550         $(ILASM) /dll /output:bug-81466-lib.dll $(srcdir)/bug-81466-lib.il
551 bug-81466.exe: bug-81466.il bug-81466-lib.dll
552         $(ILASM) /exe /output:bug-81466.exe $(srcdir)/bug-81466.il
553 test-bug-81466: bug-81466.exe bug-81466-lib.dll
554         $(RUNTIME) bug-81466.exe
555
556 if INSTALL_2_1
557 EXTRA_DIST += coreclr-security.cs
558 coreclr-security.exe : coreclr-security.cs
559         $(SMCS) -out:coreclr-security.exe $(srcdir)/coreclr-security.cs
560
561 test-coreclr-security : coreclr-security.exe
562         $(RUNTIME21) --security=core-clr-test coreclr-security.exe
563 endif
564
565 # Useful if mono is compiled with --enable-shared=no
566 patch-libtool:
567         cp "../../libtool" .
568         sed -e 's,build_libtool_libs=no,build_libtool_libs=yes,g' libtool > 2; mv 2 libtool
569         sed -e 's,LIBTOOL =,LIBTOOL2 =,g' Makefile > 2 && echo "LIBTOOL = bash ./libtool" > 1 && cat 1 2 > Makefile
570         touch libtest.c
571
572 noinst_LTLIBRARIES = libtest.la
573
574 INCLUDES = $(GLIB_CFLAGS)
575
576 if PLATFORM_WIN32
577 # gcc-3.4.4 emits incorrect code when making indirect calls to stdcall functions using a tail call
578 # This shows up when compiling mono_test_marshal_delegate ()
579 libtest_la_CFLAGS=-fno-optimize-sibling-calls
580 # the exported names created by gcc for stdcall functions are missing the leading _, so MS.NET
581 # can't find them. So we use --kill-at to remove the @ suffix as well.
582 libtest_la_LDFLAGS=-no-undefined -rpath `pwd` -Wl,--kill-at
583 else
584 libtest_la_LDFLAGS = -rpath `pwd`
585 endif
586 libtest_la_SOURCES = libtest.c
587 libtest_la_LIBADD = $(GLIB_LIBS)
588
589 CLEANFILES = $(TESTSI_CS) $(TESTSI_IL) $(STRESS_TESTS) *.dll *.stdout *.exe stest.dat