[runtime] Use HOST_ defines instead of PLATFORM_ defines. (#5362)
[mono.git] / mono / unit-tests / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
2
3 test_cflags = $(AM_CFLAGS) $(SGEN_DEFINES)
4 test_ldadd = libtestlib.la \
5         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV)
6 if HOST_DARWIN
7 test_ldflags = -framework CoreFoundation -framework Foundation
8 endif
9
10 if !CROSS_COMPILE
11 if !HOST_WIN32
12 if SUPPORT_BOEHM
13 if SUPPORT_SGEN
14
15 noinst_LTLIBRARIES = libtestlib.la
16 libtestlib_la_SOURCES =
17 libtestlib_la_LIBADD = ../metadata/libmonoruntimesgen.la ../sgen/libmonosgen.la ../utils/libmonoutils.la
18
19 test_sgen_qsort_SOURCES = test-sgen-qsort.c
20 test_sgen_qsort_CFLAGS = $(test_cflags)
21 test_sgen_qsort_LDADD = $(test_ldadd)
22 test_sgen_qsort_LDFLAGS = $(test_ldflags)
23
24 test_memfuncs_SOURCES = test-memfuncs.c
25 test_memfuncs_CFLAGS = $(test_cflags)
26 test_memfuncs_LDADD = $(test_ldadd)
27 test_memfuncs_LDFLAGS = $(test_ldflags)
28
29 test_mono_linked_list_set_SOURCES = test-mono-linked-list-set.c
30 test_mono_linked_list_set_CFLAGS = $(test_cflags)
31 test_mono_linked_list_set_LDADD = $(test_ldadd)
32 test_mono_linked_list_set_LDFLAGS = $(test_ldflags)
33
34 test_conc_hashtable_SOURCES = test-conc-hashtable.c
35 test_conc_hashtable_CFLAGS = $(test_cflags)
36 test_conc_hashtable_LDADD = $(test_ldadd)
37 test_conc_hashtable_LDFLAGS = $(test_ldflags)
38
39 test_mono_handle_SOURCES = test-mono-handle.c
40 test_mono_handle_CFLAGS = $(test_cflags)
41 test_mono_handle_LDADD = $(test_ldadd)
42 test_mono_handle_LDFLAGS = $(test_ldflags)
43
44 noinst_PROGRAMS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable test-mono-handle
45
46 TESTS = test-sgen-qsort test-memfuncs test-mono-linked-list-set test-conc-hashtable test-mono-handle
47
48 .NOTPARALLEL:
49
50 check-local:
51         if [ -e test-suite.log ]; then \
52                 if grep -q "# FAIL:  0\|tests passed" test-suite.log; then successbool=True && failures=0; else successbool=False && failures=1; fi; \
53                 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; \
54                 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; \
55                 echo "</test-case></results></test-suite></test-results>" >> TestResult-unit-tests.xml; \
56         fi;
57
58 endif SUPPORT_SGEN
59 endif SUPPORT_BOEHM
60 endif !HOST_WIN32
61 endif !CROSS_COMPILE
62