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