]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/Makefile.in
ICU-59152.0.1.tar.gz
[apple/icu.git] / icuSources / test / Makefile.in
CommitLineData
b75a7d8f 1## Makefile.in for ICU tests
f3c0d7a5
A
2## Copyright (C) 2016 and later: Unicode, Inc. and others.
3## License & terms of use: http://www.unicode.org/copyright.html
57a6839d 4## Copyright (c) 1999-2014, International Business Machines Corporation and
b75a7d8f
A
5## others. All Rights Reserved.
6
7## Source directory information
8srcdir = @srcdir@
9top_srcdir = @top_srcdir@
10
11top_builddir = ..
12
13include $(top_builddir)/icudefs.mk
14
b75a7d8f
A
15## Build directory information
16subdir = test
17
374ca955 18@ICUIO_TRUE@IOTEST = iotest
b331163b
A
19
20# the letest directory depends on layoutex.
21# If you have layoutex but not layout, you will be using
22# harfbuzz.
23@LAYOUTEX_TRUE@LETEST = letest
57a6839d
A
24
25# status dir
26STATUS_TMP = tmp
27STATUS_FULL = $(shell pwd)/$(STATUS_TMP)
374ca955 28
b75a7d8f 29## Files to remove for 'make clean'
57a6839d 30CLEANFILES = *~ $(STATUS_TMP)
b75a7d8f 31
57a6839d 32SUBDIRS = testdata intltest $(IOTEST) cintltst $(LETEST)
b75a7d8f
A
33
34## List of phony targets
35.PHONY : everything all all-local all-recursive install install-local \
36install-recursive clean clean-local clean-recursive distclean \
37distclean-local distclean-recursive dist dist-recursive dist-local \
4388f060
A
38check check-recursive check-local xcheck xcheck-recursive xcheck-local \
39check-exhaustive check-exhaustive-recursive
b75a7d8f
A
40
41## Clear suffix list
42.SUFFIXES :
43
44## List of standard targets
45everything: all-recursive all-local
46all:
47ifneq ($(RECURSIVE),YES)
48 @echo simply use \`make\' \(or \`make everything\'\) to do all
49endif
50
51install: install-recursive install-local
52clean: clean-recursive clean-local
53distclean : distclean-recursive distclean-local
374ca955 54 $(RMV) hdrtst/Makefile
46f4442e 55 $(RMV) perf/convperf/Makefile
57a6839d 56 $(RMV) $(STATUS_TMP)
374ca955 57
b75a7d8f
A
58dist: dist-recursive dist-local
59check: everything check-recursive check-local
374ca955 60check-recursive: all-recursive
729e4ab9
A
61# the xcheck targets create a ../test-*.xml file in JUnit format.
62xcheck: everything xcheck-recursive xcheck-local
63xcheck-recursive: all-recursive
4388f060 64check-exhaustive: everything check-exhaustive-recursive check-local
b75a7d8f
A
65
66## Recursive targets
46f4442e 67all-recursive install-recursive clean-recursive distclean-recursive dist-recursive:
b75a7d8f
A
68 @dot_seen=no; \
69 target=`echo $@ | sed s/-recursive//`; \
70 list='$(SUBDIRS)'; for subdir in $$list; do \
71 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
72 if test "$$subdir" = "."; then \
73 dot_seen=yes; \
74 local_target="$$target-local"; \
75 else \
76 local_target="$$target"; \
77 fi; \
78 (cd $$subdir && $(MAKE) $$local_target) || exit; \
79 done; \
80 if test "$$dot_seen" = "no"; then \
81 $(MAKE) "$$target-local" || exit; \
82 fi
83
4388f060 84xcheck-recursive check-recursive check-exhaustive-recursive:
57a6839d
A
85 @$(MKINSTALLDIRS) $(STATUS_TMP)
86 @mystatus=$(STATUS_FULL)/status.$$$$.deleteme ; \
87 $(RMV) "$$mystatus".* ; \
46f4442e
A
88 @goods=; \
89 bads=; \
90 target=`echo $@ | sed s/-recursive//`; \
91 list='$(SUBDIRS)'; for subdir in $$list; do \
92 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
93 local_target="$$target"; \
57a6839d 94 if (cd $$subdir && $(MAKE) $$local_target TEST_STATUS_FILE="$$mystatus.$$subdir" ); then \
46f4442e
A
95 goods="$$goods $$subdir"; \
96 else \
97 bads="$$bads $$subdir"; \
98 fi; \
99 done; \
57a6839d
A
100 for subdir in $$list; do \
101 if [ -f "$$mystatus.$$subdir" ]; then \
102 echo "-------------" ; \
103 echo "| *** FAILING TEST SUMMARY FOR: $$subdir " ; \
104 cat "$$mystatus.$$subdir" ; \
105 echo "| *** END FAILING TEST SUMMARY FOR: $$subdir" ; \
106 $(RMV) "$$mystatus.$$subdir" ; \
107 fi; \
108 done; \
46f4442e
A
109 echo "---------------"; \
110 echo "ALL TESTS SUMMARY:"; \
111 if test ! "x$$bads" = "x"; then \
112 echo "ok: $$goods"; \
113 echo "===== ERRS: $$bads"; exit 1; \
114 else \
115 echo "All tests OK: $$goods"; \
116 fi
117
57a6839d
A
118# pcheck = parallel check. We don't care about the output interleaving,
119# just run it as fast as possible.
120# todo would be to merge this code into the above non-parallel check.
121STATUS_NUM:=$(shell echo $$$$)
122MYSTATUS_R=$(STATUS_FULL)/status.$(STATUS_NUM).deleteme
123STATUS_FILES=$(SUBDIRS:%=$(MYSTATUS_R).%)
124
125pcheck_setup: testdata
126 @$(MKINSTALLDIRS) $(STATUS_TMP)
127 $(RMV) "$(MYSTATUS_R)".*
128 @echo Beginning parallel make. Output may be interleaved!
129
130$(STATUS_FULL)/status.$(STATUS_NUM).deleteme.%: pcheck_setup
131 -@$(MAKE) -C $* TEST_STATUS_FILE=$@ check || ( echo "FAILED: $* (other tests may still be running..)" ; touch $@ ; cp $@ $@.FAIL ; false )
132 -@[ ! -f $@.FAIL ] && touch $@.PASS && echo "PASSED: $* (other tests may still be running..)"
133 -@touch $@
134
135# print out status
136pcheck: $(STATUS_FILES)
137 @goods= ; \
138 bads= ; \
139 echo "----------------------------------------"; \
140 for subdir in $(SUBDIRS); do \
141 if [ -s "$(MYSTATUS_R).$$subdir" ]; then \
142 echo "-------------" ; \
143 echo "| *** FAILING TEST SUMMARY FOR: $$subdir " ; \
144 cat "$(MYSTATUS_R).$$subdir" ; \
145 echo "| *** END FAILING TEST SUMMARY FOR: $$subdir" ; \
146 $(RMV) "$(MYSTATUS_R).$$subdir" ; \
147 fi; \
148 done; \
149 for subdir in $(SUBDIRS); do \
150 if [ -f "$(MYSTATUS_R).$$subdir.FAIL" ]; \
151 then \
152 bads="$$bads $$subdir" ; \
153 elif [ -f "$(MYSTATUS_R).$$subdir.PASS" ]; \
154 then \
155 goods="$$goods $$subdir" ; \
156 else \
157 echo "*** subtest did not complete - $$subdir" ; \
158 bads="$$bads $$subdir" ; \
159 fi ; \
160 done ; \
161 echo "ALL TESTS SUMMARY:"; \
162 if test ! "x$$bads" = "x"; then \
163 echo "(to get non-interleaved err output, use \"$(MAKE) check\" instead.)" ; \
164 echo "ok: $$goods"; \
165 echo "===== ERRS: $$bads"; exit 1; \
166 else \
167 echo "All tests OK: $$goods"; \
168 fi
169 -@$(RMV) "$(MYSTATUS_R)".*
170
b75a7d8f
A
171all-local:
172
173install-local:
174
175dist-local:
176
177clean-local:
178 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
179
180distclean-local: clean-local
181 $(RMV) Makefile
182
729e4ab9 183xcheck-local check-local: all-local
b75a7d8f
A
184
185Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
186 cd $(top_builddir) \
187 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
188