1 | # $Id: Makefile 2076 2005-06-25 22:42:04Z bird $
|
---|
2 |
|
---|
3 |
|
---|
4 | # default rule
|
---|
5 | all: tests-logged
|
---|
6 |
|
---|
7 | #
|
---|
8 | # Basic setup.
|
---|
9 | #
|
---|
10 | OUTDIR = ./out
|
---|
11 | TS = $(shell date '+"%Y-%m-%d-%H-%M-%S"')
|
---|
12 | LOG = $(OUTDIR)/$(1)-$(TS).log
|
---|
13 | CC = gcc
|
---|
14 | LDFLAGS=
|
---|
15 | CFLAGS = -O -D_GNU_SOURCE -std=gnu99 -DOBJPFX=\"$(OUTDIR)/\"
|
---|
16 | ifeq ($(shell uname -m),amd64)
|
---|
17 | CFLAGS+= -I sysdeps/x86_64 -I .
|
---|
18 | else
|
---|
19 | CFLAGS+= -I sysdeps/i386/i686 -I sysdeps/i386 -I .
|
---|
20 | endif
|
---|
21 |
|
---|
22 |
|
---|
23 | #
|
---|
24 | # Skipped tests, Expected failures.
|
---|
25 | #
|
---|
26 | ifeq ($(TARGET),)
|
---|
27 | TARGET := innoteklibc
|
---|
28 | endif
|
---|
29 |
|
---|
30 | ifeq ($(TARGET),glibc)
|
---|
31 | SKIPPED :=
|
---|
32 | EXPECTED :=
|
---|
33 | _TARGET_OK := ok
|
---|
34 | CFLAGS += \
|
---|
35 | -DHAVE_STRNLEN \
|
---|
36 | -DHAVE_STPNCPY \
|
---|
37 | -DHAVE_STRCHRNUL \
|
---|
38 | -DHAVE_RAWMEMCHR \
|
---|
39 | -DHAVE_MEMRCHR \
|
---|
40 | -DHAVE_STRSEP \
|
---|
41 | -DHAVE_STRNDUP \
|
---|
42 | -DHAVE_MEMPCPY \
|
---|
43 | -DHAVE_NEWLOCALE
|
---|
44 | endif
|
---|
45 |
|
---|
46 | ifeq ($(TARGET),innoteklibc)
|
---|
47 | SKIPPED := \
|
---|
48 | \
|
---|
49 | string/test-ffs.c \
|
---|
50 | string/test-stpncpy.c \
|
---|
51 | string/tst-bswap.c \
|
---|
52 | string/tst-strfry.c \
|
---|
53 | \
|
---|
54 | time/tst_wcsftime.c \
|
---|
55 | time/tst-ftime_l.c \
|
---|
56 | time/tst-getdate.c \
|
---|
57 | \
|
---|
58 | timezone/test-tz.c \
|
---|
59 | timezone/tst-timezone.c \
|
---|
60 | \
|
---|
61 | wcsmbs/tst-wcpncpy.c \
|
---|
62 | wcsmbs/tst-wcsnlen.c \
|
---|
63 |
|
---|
64 | EXPECTED := \
|
---|
65 | wcsmbs/tst-mbrtowc.c \
|
---|
66 | wcsmbs/tst-wcrtomb.c \
|
---|
67 | time/tst-posixtz.c
|
---|
68 |
|
---|
69 | CFLAGS += -Zomf -g \
|
---|
70 | -DHAVE_STRNLEN \
|
---|
71 | -DHAVE_MEMPCPY
|
---|
72 | LDFLAGS += -Zstack 512
|
---|
73 | _TARGET_OK := ok
|
---|
74 | endif
|
---|
75 |
|
---|
76 | ifeq ($(TARGET),bsd)
|
---|
77 | SKIPPED := \
|
---|
78 | argp/tst-argp1.c \
|
---|
79 | argp/argp-test.c \
|
---|
80 | \
|
---|
81 | assert/test-assert-perr.c \
|
---|
82 | \
|
---|
83 | crypt/cert.c \
|
---|
84 | \
|
---|
85 | iconv/tst-iconv1.c \
|
---|
86 | iconv/tst-iconv2.c \
|
---|
87 | iconv/tst-iconv3.c \
|
---|
88 | iconv/tst-iconv5.c \
|
---|
89 | \
|
---|
90 | inet/tst-ether_aton.c \
|
---|
91 | \
|
---|
92 | intl/tst-ngettext.c \
|
---|
93 | \
|
---|
94 | string/test-mempcpy.c \
|
---|
95 | string/test-stpncpy.c \
|
---|
96 | string/tst-bswap.c \
|
---|
97 | string/tst-strfry.c
|
---|
98 | EXCEPTIONS := \
|
---|
99 | catgets/test-gencat.c
|
---|
100 | _TARGET_OK := ok
|
---|
101 | CFLAGS += -I sysdeps/unix/bsd -D__BSD__
|
---|
102 | endif
|
---|
103 |
|
---|
104 | ifndef _TARGET_OK
|
---|
105 | $(error Invalid TARGET definition '$(TARGET)'. valid: glibc, innoteklibc, bsd)
|
---|
106 | endif
|
---|
107 |
|
---|
108 |
|
---|
109 | nothing:
|
---|
110 | @echo TS=$(TS)
|
---|
111 |
|
---|
112 |
|
---|
113 | #
|
---|
114 | # The test.
|
---|
115 | #
|
---|
116 |
|
---|
117 | ARGP := \
|
---|
118 | argp/tst-argp1.c \
|
---|
119 | argp/argp-test.c
|
---|
120 |
|
---|
121 | ASSERT := \
|
---|
122 | assert/test-assert-perr.c \
|
---|
123 | assert/test-assert.c
|
---|
124 |
|
---|
125 | CATGETS := \
|
---|
126 | catgets/test-gencat.c
|
---|
127 |
|
---|
128 | #CONFORM - separate.
|
---|
129 |
|
---|
130 | CRYPT := \
|
---|
131 | crypt/md5c-test.c \
|
---|
132 | crypt/cert.c
|
---|
133 |
|
---|
134 | crypt/md5c-test.c_LDFLAGS = -lcrypt
|
---|
135 | crypt/cert.c_LDFLAGS = -lcrypt
|
---|
136 | crypt/cert.c_INPUT = crypt/cert.input
|
---|
137 |
|
---|
138 | CSU := \
|
---|
139 | csu/tst-empty.c
|
---|
140 | # csu/tst-atomic.c \
|
---|
141 | # csu/tst-atomic-long.c \
|
---|
142 |
|
---|
143 | CTYPE := \
|
---|
144 | ctype/test_ctype.c
|
---|
145 |
|
---|
146 | DEBUG := # skipped
|
---|
147 |
|
---|
148 | DIRENT := \
|
---|
149 | dirent/list.c \
|
---|
150 | dirent/bug-readdir1.c \
|
---|
151 | dirent/opendir-tst1.c \
|
---|
152 | dirent/tst-seekdir.c
|
---|
153 |
|
---|
154 | DLFCN := # postponed
|
---|
155 | ELF := # postponed
|
---|
156 | GMON := # postponed
|
---|
157 |
|
---|
158 | GNULIB := \
|
---|
159 | gnulib/tst-gcc.c
|
---|
160 |
|
---|
161 | GRP := \
|
---|
162 | grp/testgrp.c
|
---|
163 | # grp/tst_fgetgrent.c
|
---|
164 |
|
---|
165 | ICONV := \
|
---|
166 | iconv/tst-iconv1.c \
|
---|
167 | iconv/tst-iconv2.c \
|
---|
168 | iconv/tst-iconv3.c \
|
---|
169 | iconv/tst-iconv5.c
|
---|
170 |
|
---|
171 | ICONVDATA := # skipped
|
---|
172 |
|
---|
173 | INET := \
|
---|
174 | inet/bug-if1.c \
|
---|
175 | inet/htontest.c \
|
---|
176 | inet/test-ifaddrs.c \
|
---|
177 | inet/test_ifindex.c \
|
---|
178 | inet/tst-ether_aton.c \
|
---|
179 | inet/tst-gethnm.c \
|
---|
180 | inet/tst-network.c \
|
---|
181 | inet/tst-ntoa.c
|
---|
182 |
|
---|
183 | INTL := \
|
---|
184 | intl/tst-ngettext.c
|
---|
185 | # more intl todo
|
---|
186 | IO := \
|
---|
187 | io/bug-ftw1.c \
|
---|
188 | io/bug-ftw2.c \
|
---|
189 | io/bug-ftw3.c \
|
---|
190 | io/bug-ftw4.c \
|
---|
191 | io/ftwtest.c \
|
---|
192 | io/test-lfs.c \
|
---|
193 | io/test-stat.c \
|
---|
194 | io/test-stat2.c \
|
---|
195 | io/test-utime.c \
|
---|
196 | io/tst-fcntl.c \
|
---|
197 | io/tst-getcwd.c \
|
---|
198 | io/tst-statvfs.c
|
---|
199 | # todo io/ftwtest.sh
|
---|
200 |
|
---|
201 | LIBIO := \
|
---|
202 | libio/bug-fopena+.c \
|
---|
203 | libio/bug-fseek.c \
|
---|
204 | libio/bug-ftell.c \
|
---|
205 | libio/bug-mmap-fflush.c \
|
---|
206 | libio/bug-rewind.c \
|
---|
207 | libio/bug-rewind2.c \
|
---|
208 | libio/bug-ungetc.c \
|
---|
209 | libio/bug-ungetc2.c \
|
---|
210 | libio/bug-ungetc3.c \
|
---|
211 | libio/bug-ungetc4.c \
|
---|
212 | libio/bug-ungetwc1.c \
|
---|
213 | libio/bug-ungetwc2.c \
|
---|
214 | libio/bug-wfflush.c \
|
---|
215 | libio/test-fmemopen.c \
|
---|
216 | libio/test-freopen.c \
|
---|
217 | libio/tst-atime.c \
|
---|
218 | libio/tst-eof.c \
|
---|
219 | libio/tst-ext.c \
|
---|
220 | libio/tst-fgetws.c \
|
---|
221 | libio/tst-fopenloc.c \
|
---|
222 | libio/tst-freopen.c \
|
---|
223 | libio/tst-mmap-eofsync.c \
|
---|
224 | libio/tst-mmap-fflushsync.c \
|
---|
225 | libio/tst-mmap-offend.c \
|
---|
226 | libio/tst-mmap-setvbuf.c \
|
---|
227 | libio/tst-mmap2-eofsync.c \
|
---|
228 | libio/tst-sscanf.c \
|
---|
229 | libio/tst-swscanf.c \
|
---|
230 | libio/tst-ungetwc1.c \
|
---|
231 | libio/tst-ungetwc2.c \
|
---|
232 | libio/tst-widetext.c \
|
---|
233 | libio/tst_getwc.c \
|
---|
234 | libio/tst_putwc.c \
|
---|
235 | libio/tst_swprintf.c \
|
---|
236 | libio/tst_swscanf.c \
|
---|
237 | libio/tst_wprintf.c \
|
---|
238 | libio/tst_wprintf2.c \
|
---|
239 | libio/tst_wscanf.c
|
---|
240 |
|
---|
241 | libio/tst-widetext.c_INPUT = libio/tst-widetext.input
|
---|
242 | libio/tst_getwc.c_INPUT = libio/tst_getwc.input
|
---|
243 | libio/tst_wscanf.c_INPUT = libio/tst_wscanf.input
|
---|
244 |
|
---|
245 | # todo libio/test-freopen.sh
|
---|
246 |
|
---|
247 | LINUXTHREADS := # skipped
|
---|
248 |
|
---|
249 | LOCALE := \
|
---|
250 | locale/tst-C-locale.c
|
---|
251 |
|
---|
252 | LOCALEDATA := # todo later
|
---|
253 |
|
---|
254 | LOGIN := \
|
---|
255 | login/tst-grantpt.c \
|
---|
256 | login/tst-utmp.c \
|
---|
257 | login/tst-utmpx.c
|
---|
258 |
|
---|
259 | MALLOC := \
|
---|
260 | malloc/tst-calloc.c \
|
---|
261 | malloc/tst-malloc.c \
|
---|
262 | malloc/tst-mallocstate.c \
|
---|
263 | malloc/tst-mcheck.c \
|
---|
264 | malloc/tst-obstack.c \
|
---|
265 | malloc/tst-valloc.c
|
---|
266 | # malloc/tst-mtrace.c
|
---|
267 | # malloc/tst-mtrace.sh
|
---|
268 |
|
---|
269 | MATH := \
|
---|
270 | math/basic-test.c \
|
---|
271 | math/bug-nextafter.c \
|
---|
272 | math/bug-nexttoward.c \
|
---|
273 | math/bug-tgmath1.c \
|
---|
274 | math/test-double.c \
|
---|
275 | math/test-fenv.c \
|
---|
276 | math/test-float.c \
|
---|
277 | math/test-fpucw.c \
|
---|
278 | math/test-idouble.c \
|
---|
279 | math/test-ifloat.c \
|
---|
280 | math/test-ildoubl.c \
|
---|
281 | math/test-ldouble.c \
|
---|
282 | math/test-matherr.c \
|
---|
283 | math/test-misc.c \
|
---|
284 | math/test-tgmath-ret.c \
|
---|
285 | math/test-tgmath.c \
|
---|
286 | math/tst-definitions.c
|
---|
287 | # math/atest-exp2.c
|
---|
288 | # math/atest-sincos.c
|
---|
289 | # math/atest-exp.c
|
---|
290 | # math/gen-libm-test.pl
|
---|
291 | $(foreach t,$(MATH),$(eval $(t)_LDFLAGS := -lm))
|
---|
292 | $(foreach t,$(filter math/test-%,$(MATH)), \
|
---|
293 | $(eval $(t)_DEPS := $(OUTDIR)/math/libm-test.stamp) \
|
---|
294 | $(eval $(t)_CFLAGS := -I $(OUTDIR)/math/) \
|
---|
295 | )
|
---|
296 |
|
---|
297 | $(OUTDIR)/math/libm-test.stamp: \
|
---|
298 | sysdeps/i386/fpu/libm-test-ulps \
|
---|
299 | math/libm-test.inc \
|
---|
300 | math/gen-libm-test.pl Makefile
|
---|
301 | cd math && perl gen-libm-test.pl -u ../$< -o ../$(OUTDIR)/math/
|
---|
302 | @echo > $@
|
---|
303 |
|
---|
304 |
|
---|
305 | MISC :=\
|
---|
306 | misc/tst-dirname.c \
|
---|
307 | misc/tst-efgcvt.c \
|
---|
308 | misc/tst-fdset.c \
|
---|
309 | misc/tst-hsearch.c \
|
---|
310 | misc/tst-mntent.c \
|
---|
311 | misc/tst-tsearch.c
|
---|
312 | misc/tst-tsearch.c_LDFLAGS = -lm
|
---|
313 |
|
---|
314 | NPTL := # skipped
|
---|
315 |
|
---|
316 | NSS := \
|
---|
317 | nss/bug-erange.c \
|
---|
318 | nss/test-netdb.c
|
---|
319 |
|
---|
320 |
|
---|
321 | # posix/bug-regex5.c - internal
|
---|
322 | # posix/bug-regex20.c - internal
|
---|
323 | # posix/bug-regex24.c - goes on forever it seems
|
---|
324 | POSIX :=\
|
---|
325 | posix/bug-ga1.c \
|
---|
326 | posix/bug-ga2.c \
|
---|
327 | posix/bug-glob1.c \
|
---|
328 | posix/bug-glob2.c \
|
---|
329 | posix/bug-regex1.c \
|
---|
330 | posix/bug-regex10.c \
|
---|
331 | posix/bug-regex11.c \
|
---|
332 | posix/bug-regex12.c \
|
---|
333 | posix/bug-regex13.c \
|
---|
334 | posix/bug-regex14.c \
|
---|
335 | posix/bug-regex15.c \
|
---|
336 | posix/bug-regex16.c \
|
---|
337 | posix/bug-regex17.c \
|
---|
338 | posix/bug-regex18.c \
|
---|
339 | posix/bug-regex19.c \
|
---|
340 | posix/bug-regex2.c \
|
---|
341 | posix/bug-regex21.c \
|
---|
342 | posix/bug-regex22.c \
|
---|
343 | posix/bug-regex23.c \
|
---|
344 | posix/bug-regex3.c \
|
---|
345 | posix/bug-regex4.c \
|
---|
346 | posix/bug-regex6.c \
|
---|
347 | posix/bug-regex7.c \
|
---|
348 | posix/bug-regex8.c \
|
---|
349 | posix/bug-regex9.c \
|
---|
350 | posix/runptests.c \
|
---|
351 | posix/runtests.c \
|
---|
352 | posix/test-vfork.c \
|
---|
353 | posix/testfnm.c \
|
---|
354 | posix/tst-boost.c \
|
---|
355 | posix/tst-chmod.c \
|
---|
356 | posix/tst-dir.c \
|
---|
357 | posix/tst-exec.c \
|
---|
358 | posix/tst-execl1.c \
|
---|
359 | posix/tst-execl2.c \
|
---|
360 | posix/tst-execle1.c \
|
---|
361 | posix/tst-execle2.c \
|
---|
362 | posix/tst-execlp1.c \
|
---|
363 | posix/tst-execlp2.c \
|
---|
364 | posix/tst-execv1.c \
|
---|
365 | posix/tst-execv2.c \
|
---|
366 | posix/tst-execve1.c \
|
---|
367 | posix/tst-execve2.c \
|
---|
368 | posix/tst-execvp1.c \
|
---|
369 | posix/tst-execvp2.c \
|
---|
370 | posix/tst-execvp3.c \
|
---|
371 | posix/tst-fnmatch.c \
|
---|
372 | posix/tst-fork.c \
|
---|
373 | posix/tst-getaddrinfo.c \
|
---|
374 | posix/tst-getaddrinfo2.c \
|
---|
375 | posix/tst-getlogin.c \
|
---|
376 | posix/tst-gnuglob.c \
|
---|
377 | posix/tst-mmap.c \
|
---|
378 | posix/tst-nanosleep.c \
|
---|
379 | posix/tst-nice.c \
|
---|
380 | posix/tst-pcre.c \
|
---|
381 | posix/tst-preadwrite.c \
|
---|
382 | posix/tst-preadwrite64.c \
|
---|
383 | posix/tst-rxspencer.c \
|
---|
384 | posix/tst-spawn.c \
|
---|
385 | posix/tst-truncate.c \
|
---|
386 | posix/tst-truncate64.c \
|
---|
387 | posix/tst-vfork1.c \
|
---|
388 | posix/tst-vfork2.c \
|
---|
389 | posix/tst-waitid.c \
|
---|
390 | posix/tstgetopt.c
|
---|
391 | # posix/tst-regex.c - internal?
|
---|
392 | # posix/tst-regex2.c - too new?
|
---|
393 | # posix/tst-regexloc.c - internal?
|
---|
394 | # posix/tst-sysconf.c - too new?
|
---|
395 | # todo:
|
---|
396 | # posix/wordexp-test.c
|
---|
397 | # posix/wordexp-tst.sh
|
---|
398 | # posix/globtest.c
|
---|
399 | # posix/globtest.sh
|
---|
400 | # posix/tst-getconf.sh
|
---|
401 |
|
---|
402 | posix/tst-fnmatch.c_INPUT = posix/tst-fnmatch.input
|
---|
403 |
|
---|
404 | posix/tstgetopt.c_ARGS = -a -b -cfoobar --required foobar --optional=bazbug --none random --col --color --colour
|
---|
405 | posix/tst-exec.c_ARGS = -- $(OUTDIR)/posix/tst-exec.exe
|
---|
406 | posix/tst-spawn.c_ARGS = -- $(OUTDIR)/posix/tst-spawn.exe
|
---|
407 | posix/tst-dir.c_ARGS = `pwd` `cd $(OUTDIR)/$(posix); pwd` `cd $(OUTDIR)/; pwd` $(OUTDIR)/tst-dir.exe
|
---|
408 | posix/tst-chmod.c_ARGS = `cd posix/; pwd`
|
---|
409 | posix/tst-rxspencer.c_ARGS = --utf8 posix/rxspencer/tests
|
---|
410 | posix/tst-pcre.c_ARGS = posix/PCRE.tests
|
---|
411 | posix/tst-boost.c_ARGS = posix/BOOST.tests
|
---|
412 | posix/bug-glob1.c_ARGS = "$(OBJDIR)/posix/"
|
---|
413 | posix/tst-execvp3.c_ARGS = --test-dir="$(OBJDIR)/posix/"
|
---|
414 |
|
---|
415 |
|
---|
416 | PWD := \
|
---|
417 | pwd/tst-getpw.c
|
---|
418 |
|
---|
419 | RESOLV := \
|
---|
420 | resolv/tst-aton.c \
|
---|
421 | resolv/tst-leaks.c
|
---|
422 | resolv/tst-leaks.c_LDFLAGS = -lresolv
|
---|
423 |
|
---|
424 | RT := # todo
|
---|
425 | SETJMP := \
|
---|
426 | setjmp/tst-setjmp.c
|
---|
427 |
|
---|
428 | SIGNAL := \
|
---|
429 | signal/tst-raise.c \
|
---|
430 | signal/tst-signal.c \
|
---|
431 | signal/tst-sigset.c \
|
---|
432 | signal/tst-sigsimple.c
|
---|
433 |
|
---|
434 | SOFT-FP := # skipping
|
---|
435 |
|
---|
436 | STDIO-COMMON := \
|
---|
437 | stdio-common/temptest.c \
|
---|
438 | stdio-common/test-fseek.c \
|
---|
439 | stdio-common/test-fwrite.c \
|
---|
440 | stdio-common/test-popen.c \
|
---|
441 | stdio-common/test-vfprintf.c \
|
---|
442 | stdio-common/test_rdwr.c \
|
---|
443 | stdio-common/tst-cookie.c \
|
---|
444 | stdio-common/tst-fdopen.c \
|
---|
445 | stdio-common/tst-ferror.c \
|
---|
446 | stdio-common/tst-fileno.c \
|
---|
447 | stdio-common/tst-fmemopen.c \
|
---|
448 | stdio-common/tst-fmemopen2.c \
|
---|
449 | stdio-common/tst-fphex.c \
|
---|
450 | stdio-common/tst-fseek.c \
|
---|
451 | stdio-common/tst-gets.c \
|
---|
452 | stdio-common/tst-obprintf.c \
|
---|
453 | stdio-common/tst-perror.c \
|
---|
454 | stdio-common/tst-popen.c \
|
---|
455 | stdio-common/tst-printfsz.c \
|
---|
456 | stdio-common/tst-rndseek.c \
|
---|
457 | stdio-common/tst-sprintf.c \
|
---|
458 | stdio-common/tst-sscanf.c \
|
---|
459 | stdio-common/tst-swprintf.c \
|
---|
460 | stdio-common/tst-tmpnam.c \
|
---|
461 | stdio-common/tst-ungetc.c \
|
---|
462 | stdio-common/tst-unlockedio.c \
|
---|
463 | stdio-common/tst-wc-printf.c \
|
---|
464 | stdio-common/tstdiomisc.c \
|
---|
465 | stdio-common/tstgetln.c \
|
---|
466 | stdio-common/tstscanf.c
|
---|
467 | stdio-common/tst-ferror.c_INPUT = stdio-common/tst-ferror.input
|
---|
468 | stdio-common/tst-gets.c_INPUT = stdio-common/tst-gets.input
|
---|
469 | stdio-common/tstgetln.c_INPUT = stdio-common/tstgetln.input
|
---|
470 | stdio-common/tstscanf.c_INPUT = stdio-common/tstscanf.input
|
---|
471 | # stdio-common/tst-printf.c
|
---|
472 | # stdio-common/tst-printf.sh
|
---|
473 | # stdio-common/tst-unbputc.c
|
---|
474 | # stdio-common/tst-unbputc.sh
|
---|
475 |
|
---|
476 | STDLIB := \
|
---|
477 | stdlib/bug-strtod.c \
|
---|
478 | stdlib/test-a64l.c \
|
---|
479 | stdlib/test-canon.c \
|
---|
480 | stdlib/test-canon2.c \
|
---|
481 | stdlib/testmb.c \
|
---|
482 | stdlib/testmb2.c \
|
---|
483 | stdlib/testrand.c \
|
---|
484 | stdlib/testsort.c \
|
---|
485 | stdlib/tst-bsearch.c \
|
---|
486 | stdlib/tst-environ.c \
|
---|
487 | stdlib/tst-limits.c \
|
---|
488 | stdlib/tst-putenv.c \
|
---|
489 | stdlib/tst-qsort.c \
|
---|
490 | stdlib/tst-rand48.c \
|
---|
491 | stdlib/tst-random.c \
|
---|
492 | stdlib/tst-random2.c \
|
---|
493 | stdlib/tst-setcontext.c \
|
---|
494 | stdlib/tst-strtod.c \
|
---|
495 | stdlib/tst-strtol.c \
|
---|
496 | stdlib/tst-strtoll.c \
|
---|
497 | stdlib/tst-system.c \
|
---|
498 | stdlib/tst-xpg-basename.c \
|
---|
499 | stdlib/testdiv.c
|
---|
500 | # todo:
|
---|
501 | # stdlib/tst-fmtmsg.c
|
---|
502 | # stdlib/tst-fmtmsg.sh
|
---|
503 | # stdlib/tst-putenvmod.c
|
---|
504 | stdlib/testdiv.c_INPUT = stdlib/testdiv.input
|
---|
505 |
|
---|
506 | STRING := \
|
---|
507 | string/bug-strcoll1.c \
|
---|
508 | string/bug-strncat1.c \
|
---|
509 | string/bug-strpbrk1.c \
|
---|
510 | string/bug-strspn1.c \
|
---|
511 | string/inl-tester.c \
|
---|
512 | string/noinl-tester.c \
|
---|
513 | string/test-ffs.c \
|
---|
514 | string/test-memccpy.c \
|
---|
515 | string/test-memchr.c \
|
---|
516 | string/test-memcmp.c \
|
---|
517 | string/test-memcpy.c \
|
---|
518 | string/test-memmove.c \
|
---|
519 | string/test-mempcpy.c \
|
---|
520 | string/test-memset.c \
|
---|
521 | string/test-stpcpy.c \
|
---|
522 | string/test-stpncpy.c \
|
---|
523 | string/test-strcat.c \
|
---|
524 | string/test-strchr.c \
|
---|
525 | string/test-strcmp.c \
|
---|
526 | string/test-strcpy.c \
|
---|
527 | string/test-strcspn.c \
|
---|
528 | string/test-strlen.c \
|
---|
529 | string/test-strncmp.c \
|
---|
530 | string/test-strncpy.c \
|
---|
531 | string/test-strpbrk.c \
|
---|
532 | string/test-strrchr.c \
|
---|
533 | string/test-strspn.c \
|
---|
534 | string/testcopy.c \
|
---|
535 | string/tester.c \
|
---|
536 | string/tst-bswap.c \
|
---|
537 | string/tst-inlcall.c \
|
---|
538 | string/tst-strfry.c \
|
---|
539 | string/tst-strlen.c \
|
---|
540 | string/tst-strtok.c \
|
---|
541 | string/tst-strxfrm.c \
|
---|
542 |
|
---|
543 | STRING_IN_EXP := \
|
---|
544 | string/tst-svc.c
|
---|
545 |
|
---|
546 | SUNRPC := \
|
---|
547 | sunrpc/tst-getmyaddr.c
|
---|
548 |
|
---|
549 | SYSDEPS := # todo
|
---|
550 |
|
---|
551 | TIME := \
|
---|
552 | time/clocktest.c \
|
---|
553 | time/test_time.c \
|
---|
554 | time/tst-ftime_l.c \
|
---|
555 | time/tst-getdate.c \
|
---|
556 | time/tst-mktime.c \
|
---|
557 | time/tst-mktime2.c \
|
---|
558 | time/tst-mktime3.c \
|
---|
559 | time/tst-posixtz.c \
|
---|
560 | time/tst-strftime.c \
|
---|
561 | time/tst-strptime.c \
|
---|
562 | time/tst-strptime2.c \
|
---|
563 | time/tst_wcsftime.c
|
---|
564 |
|
---|
565 | TIMEZONE := \
|
---|
566 | timezone/test-tz.c \
|
---|
567 | timezone/tst-timezone.c
|
---|
568 |
|
---|
569 | WCSMBS := \
|
---|
570 | wcsmbs/tst-btowc.c \
|
---|
571 | wcsmbs/tst-mbrtowc.c \
|
---|
572 | wcsmbs/tst-mbsrtowcs.c \
|
---|
573 | wcsmbs/tst-wcpncpy.c \
|
---|
574 | wcsmbs/tst-wcrtomb.c \
|
---|
575 | wcsmbs/tst-wcsnlen.c \
|
---|
576 | wcsmbs/tst-wcstof.c \
|
---|
577 | wcsmbs/wcsmbs-tst1.c
|
---|
578 |
|
---|
579 | WCTYPE := \
|
---|
580 | wctype/test_wcfuncs.c \
|
---|
581 | wctype/test_wctype.c
|
---|
582 |
|
---|
583 |
|
---|
584 | SUBTESTS := \
|
---|
585 | ARGP \
|
---|
586 | ASSERT \
|
---|
587 | CATGETS \
|
---|
588 | CRYPT \
|
---|
589 | CSU \
|
---|
590 | CTYPE \
|
---|
591 | DEBUG \
|
---|
592 | DIRENT \
|
---|
593 | DLFCN \
|
---|
594 | ELF \
|
---|
595 | GMON \
|
---|
596 | GNULIB \
|
---|
597 | GRP \
|
---|
598 | ICONV \
|
---|
599 | ICONVDATA \
|
---|
600 | INET \
|
---|
601 | INTL \
|
---|
602 | IO \
|
---|
603 | LIBIO \
|
---|
604 | LINUXTHREADS \
|
---|
605 | LOCALE \
|
---|
606 | LOCALEDATA \
|
---|
607 | LOGIN \
|
---|
608 | MALLOC \
|
---|
609 | MANUAL \
|
---|
610 | MATH \
|
---|
611 | MISC \
|
---|
612 | NPTL \
|
---|
613 | NSS \
|
---|
614 | POSIX \
|
---|
615 | PWD \
|
---|
616 | RESOLV \
|
---|
617 | RT \
|
---|
618 | SCRIPTS \
|
---|
619 | SETJMP \
|
---|
620 | SIGNAL \
|
---|
621 | SOFT-FP \
|
---|
622 | STDIO-COMMON \
|
---|
623 | STDLIB \
|
---|
624 | STRING \
|
---|
625 | SUNRPC \
|
---|
626 | SYSDEPS \
|
---|
627 | TIME \
|
---|
628 | TIMEZONE \
|
---|
629 | WCSMBS \
|
---|
630 | WCTYPE
|
---|
631 |
|
---|
632 | .SUFFIXES:
|
---|
633 | .SUFFIXES: .c .exe .result
|
---|
634 |
|
---|
635 |
|
---|
636 | #
|
---|
637 | # Generate test rules
|
---|
638 | #
|
---|
639 | _TESTS :=
|
---|
640 |
|
---|
641 | # process one test
|
---|
642 | define def_simple
|
---|
643 |
|
---|
644 | $(OUTDIR)/$2.result: $1 $(OUTDIR)/$(dir $1).dir_created $($(1)_DEPS)
|
---|
645 | @echo "########## $1"; \
|
---|
646 | echo "## BUILDING: $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<"; \
|
---|
647 | if $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<; then \
|
---|
648 | echo "## RUNNING : LC_ALL=C $($1_ENVS) $(OUTDIR)/$2.exe $($1_ARGS) $(if $($(1)_INPUT), < $($(1)_INPUT),)"; \
|
---|
649 | if LC_ALL=C $($1_ENVS) $(OUTDIR)/$2.exe $($1_ARGS) $(if $($(1)_INPUT), < $($(1)_INPUT),); then\
|
---|
650 | echo OK > $$@; \
|
---|
651 | printf "########## %-26s - SUCCESS\n" "$1"; \
|
---|
652 | else \
|
---|
653 | echo "## rc=$$$$?"; \
|
---|
654 | printf "########## %-26s - $(if $(filter $1,$(EXPECTED)),EXPECTED FAILURE,FAILURE)\n" "$1"; \
|
---|
655 | echo "$(if $(filter $1,$(EXPECTED)),EXPECTED,FAILURE)" > $$@; \
|
---|
656 | fi \
|
---|
657 | else \
|
---|
658 | echo "## rc=$$$$? "; \
|
---|
659 | echo "## $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<"; \
|
---|
660 | printf "########## %-26s - BUILD FAILURE\n" "$1"; \
|
---|
661 | echo "FAILURE - $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<" > $$@; \
|
---|
662 | fi
|
---|
663 |
|
---|
664 | $2: $(OUTDIR)/$2.result
|
---|
665 | @
|
---|
666 |
|
---|
667 | _TESTS += $(OUTDIR)/$2.result
|
---|
668 | $(eval _$(TEST) += $(OUTDIR)/$2.result)
|
---|
669 | endef
|
---|
670 |
|
---|
671 | # skip on test
|
---|
672 | define def_skipped
|
---|
673 | $(OUTDIR)/$2.result:
|
---|
674 | @printf "########## %-26s - SKIPPED\n" "$1"; \
|
---|
675 | echo "SKIPPED" > $$@
|
---|
676 |
|
---|
677 | _TESTS += $(OUTDIR)/$2.result
|
---|
678 | $(eval _$(TEST) += $(OUTDIR)/$2.result)
|
---|
679 | endef
|
---|
680 |
|
---|
681 | # process a subtest
|
---|
682 | define def_subtest
|
---|
683 | $(eval test := $(shell echo $(TEST) | tr 'A-Z' 'a-z'))
|
---|
684 | $(eval _$(TEST) :=)
|
---|
685 | $(foreach src, $($(TEST)), \
|
---|
686 | $(if $(filter $(src),$(SKIPPED)),\
|
---|
687 | $(eval $(call def_skipped,$(src),$(basename $(src)),)),\
|
---|
688 | $(eval $(call def_simple,$(src),$(basename $(src)),)) \
|
---|
689 | ) \
|
---|
690 | )
|
---|
691 |
|
---|
692 | .PHONY: $(test)
|
---|
693 | $(test): $(_$(TEST))
|
---|
694 | @echo "**** $$@ ****"
|
---|
695 | @echo " SUCCESS : `cat /dev/null $$^ | grep OK | wc -l`"
|
---|
696 | @echo " SKIPPED : `cat /dev/null $$^ | grep SKIPPED | wc -l`"
|
---|
697 | @echo " EXPECTED: `cat /dev/null $$^ | grep EXPECTED | wc -l`"
|
---|
698 | @echo " FAILURES: `cat /dev/null $$^ | grep FAILURE | wc -l`"
|
---|
699 |
|
---|
700 | endef
|
---|
701 |
|
---|
702 | # process all subtests
|
---|
703 | $(foreach TEST, $(SUBTESTS), $(eval $(def_subtest)))
|
---|
704 |
|
---|
705 |
|
---|
706 | #
|
---|
707 | # generate directory rules
|
---|
708 | #
|
---|
709 | define def_dir
|
---|
710 | $1.dir_created:
|
---|
711 | @mkdir -p $1
|
---|
712 | @echo > $$@
|
---|
713 | endef
|
---|
714 |
|
---|
715 | _DIRS := $(sort $(dir $(_TESTS)))
|
---|
716 | $(foreach d,$(_DIRS), $(eval $(call def_dir,$(d))))
|
---|
717 |
|
---|
718 |
|
---|
719 | #
|
---|
720 | # All tests (expect the ones in the next sections).
|
---|
721 | #
|
---|
722 | tests: $(_TESTS)
|
---|
723 | @echo "***************"
|
---|
724 | @echo " SUCCESS : `cat /dev/null $^ | grep OK | wc -l`"
|
---|
725 | @echo " SKIPPED : `cat /dev/null $^ | grep SKIPPED | wc -l`"
|
---|
726 | @echo " EXPECTED: `cat /dev/null $^ | grep EXPECTED | wc -l`"
|
---|
727 | @echo " FAILURES: `cat /dev/null $^ | grep FAILURE | wc -l`"
|
---|
728 |
|
---|
729 | tests-logged:
|
---|
730 | @echo "**** logging to $(call LOG,test) ****"
|
---|
731 | $(MAKE) tests 2>&1 | tee $(call LOG,test)
|
---|
732 |
|
---|
733 |
|
---|
734 | #
|
---|
735 | # Special and separate tests.
|
---|
736 | #
|
---|
737 | .PHONY: conform
|
---|
738 | conform:
|
---|
739 | cd conform/ && perl ./conformtest.pl
|
---|
740 |
|
---|
741 | conform-logged:
|
---|
742 | @echo "**** logging to $(call LOG,conform) ****"
|
---|
743 | $(MAKE) conform 2>&1 | tee $(call LOG,conform)
|
---|
744 |
|
---|