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