[WinForms] Fix #18506 ActiveTracker, do not propagate message to control when it...
[mono-project.git] / mono / unit-tests / Makefile.am
blob85fff692efab5078d567df1e5bebad34ec33b0b4
1 MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules
3 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono -I$(top_srcdir)/samples $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
5 CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
7 TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build
9 MCS_NO_UNSAFE = $(TOOLS_RUNTIME) $(CSC) -debug:portable \
10         -noconfig -nologo \
11         -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
12         -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
13         -nowarn:0197 $(PROFILE_MCS_FLAGS)
14 MCS_NO_LIB = $(MCS_NO_UNSAFE) -unsafe
16 MCS = $(MCS_NO_LIB)
18 if LOADED_LLVM
19 LLVMMONOF=
20 else
21 LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS)
22 endif
24 glib_libs = $(top_builddir)/mono/eglib/libeglib.la
26 test_cflags = $(AM_CFLAGS) $(SGEN_DEFINES)
27 test_ldadd = libtestlib.la \
28         $(LIBGC_LIBS) $(glib_libs) $(LLVMMONOF)
30 if HOST_DARWIN
31 test_ldflags = -framework CoreFoundation -framework Foundation
32 endif
34 monodir=$(top_builddir)
35 sgen_libs = \
36         $(monodir)/mono/metadata/libmonoruntimesgen.la  \
37         $(monodir)/mono/sgen/libmonosgen.la     \
38         $(monodir)/mono/utils/libmonoutils.la \
39         $(glib_libs)
41 mini_libs = \
42         $(monodir)/mono/mini/libmini.la
44 if !DISABLE_INTERPRETER
45 mini_libs += $(monodir)/mono/mini/libmono-ee-interp.la
46 endif
48 if !DISABLE_DEBUGGER_AGENT
49 mini_libs += $(monodir)/mono/mini/libmono-dbg.la
50 endif
52 CFLAGS = $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@)
54 if !CROSS_COMPILE
55 if !HOST_WIN32
57 noinst_LTLIBRARIES = libtestlib.la
58 libtestlib_la_CFLAGS = @CXX_ADD_CFLAGS@
59 libtestlib_la_SOURCES = \
60         test-sgen-qsort.c \
61         test-memfuncs.c \
62         test-mono-linked-list-set.c \
63         test-conc-hashtable.c \
64         test-mono-handle.c \
65         test-mono-callspec.c \
66         test-mono-string.c \
67         test-mono-embed.c \
68         test-embed-invoke.c 
69 libtestlib_la_LIBADD = ../metadata/libmonoruntimesgen.la ../sgen/libmonosgen.la ../utils/libmonoutils.la
71 test_sgen_qsort_SOURCES = main.c
72 test_sgen_qsort_CFLAGS = $(test_cflags) -DMAIN=test_sgen_qsort_main
73 test_sgen_qsort_LDADD = $(test_ldadd) libtestlib_la-test-sgen-qsort.lo
74 test_sgen_qsort_LDFLAGS = $(test_ldflags)
76 test_memfuncs_SOURCES = main.c
77 test_memfuncs_CFLAGS = $(test_cflags) -DMAIN=test_memfuncs_main
78 test_memfuncs_LDADD = $(test_ldadd) libtestlib_la-test-memfuncs.lo
79 test_memfuncs_LDFLAGS = $(test_ldflags)
81 test_mono_linked_list_set_SOURCES = main.c
82 test_mono_linked_list_set_CFLAGS = $(test_cflags) -DMAIN=test_mono_linked_list_set_main
83 test_mono_linked_list_set_LDADD = $(test_ldadd) libtestlib_la-test-mono-linked-list-set.lo
84 test_mono_linked_list_set_LDFLAGS = $(test_ldflags)
86 test_conc_hashtable_SOURCES = main.c
87 test_conc_hashtable_CFLAGS = $(test_cflags) -DMAIN=test_conc_hashtable_main
88 test_conc_hashtable_LDADD = $(test_ldadd) libtestlib_la-test-conc-hashtable.lo
89 test_conc_hashtable_LDFLAGS = $(test_ldflags)
91 test_mono_handle_SOURCES = main.c
92 test_mono_handle_CFLAGS = $(test_cflags) -DMAIN=test_mono_handle_main
93 test_mono_handle_LDADD = $(test_ldadd) libtestlib_la-test-mono-handle.lo
94 test_mono_handle_LDFLAGS = $(test_ldflags)
96 test_mono_callspec_SOURCES = main.c
97 test_mono_callspec_CFLAGS = $(AM_CFLAGS) -DMAIN=test_mono_callspec_main
98 test_mono_callspec_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-mono-callspec.lo
99 test_mono_callspec_LDFLAGS = $(test_ldflags)
100 test_mono_callspec_DEPENDENCIES = callspec.exe
102 test_mono_string_SOURCES = main.c
103 test_mono_string_CFLAGS = $(test_cflags) -DMAIN=test_mono_string_main
104 test_mono_string_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-mono-string.lo
105 test_mono_string_LDFLAGS = $(test_ldflags)
107 test_mono_embed_SOURCES = main.c
108 test_mono_embed_CFLAGS = $(test_cflags) -DMAIN=test_mono_embed_main
109 test_mono_embed_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-mono-embed.lo
110 test_mono_embed_LDFLAGS = $(test_ldflags)
111 test_mono_embed_DEPENDENCIES = test-embed.exe
113 test_path_SOURCES = test-path.c
114 test_path_CFLAGS = $(test-cflags)
115 test_path_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs)
116 test_path_LDFLAGS = $(test_ldflags)
118 test_embed_invoke_SOURCES = main.c
119 test_embed_invoke_CFLAGS = $(test_cflags) -DMAIN=test_mono_embed_invoke_main
120 test_embed_invoke_LDADD = $(test_ldadd) $(mini_libs) $(sgen_libs) libtestlib_la-test-embed-invoke.lo
121 test_embed_invoke_LDFLAGS = $(test_ldflags)
122 test_embed_invoke_DEPENDENCIES = test-embed-invoke-cs.exe
125 check_PROGRAMS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable test-mono-handle   \
126                  test-path \
127                  test-mono-callspec test-mono-string test-mono-embed test-embed-invoke
129 TESTS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable test-mono-handle \
130         test-path \
131         test-mono-callspec test-mono-string test-mono-embed test-embed-invoke
133 AM_TESTS_ENVIRONMENT = export MONO_PATH=$(mcs_topdir)/class/lib/build;
135 test-local: $(check_PROGRAMS)
137 .NOTPARALLEL:
139 check-local:
140         if [ -e test-suite.log ]; then \
141                 if grep -q "# FAIL:  0\|tests passed" test-suite.log; then successbool=True && failures=0; else successbool=False && failures=1; fi; \
142                 echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='$$failures' total='1' not-run='0' name='unit-tests.dummy' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='MonoTests.unit-tests' success='$$successbool' time='0'><results><test-case name='MonoTests.unit-tests.100percentsuccess' executed='True' success='$$successbool' time='0'>" > TestResult-unit-tests.xml; \
143                 if [ $$failures -ne 0 ]; then echo "<failure><message>"'<![CDATA[' >> TestResult-unit-tests.xml && cat test-suite.log >> TestResult-unit-tests.xml && echo "]]></message><stack-trace></stack-trace></failure>" >> TestResult-unit-tests.xml; fi; \
144                 echo "</test-case></results></test-suite></test-results>" >> TestResult-unit-tests.xml; \
145         fi;
147 clean-local:
148         rm -f callspec.exe callspec.pdb 
149         rm -f test-embed.exe test-embed.pdb
150         rm -f test-embed-invoke-cs.exe test-embed-invoke-cs.pdb
152 %.exe: %.cs
153         $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $<
155 test-embed.exe: $(top_srcdir)/samples/embed/test.cs
156         $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -out:$@ $<
157         
158 test-embed-invoke-cs.exe: $(top_srcdir)/samples/embed/invoke.cs
159         $(MCS) -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll  -out:$@ $<
161 endif !HOST_WIN32
162 endif !CROSS_COMPILE