source: trunk/src/libctests/glibc/Makefile@ 2087

Last change on this file since 2087 was 2082, checked in by bird, 20 years ago

..

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