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