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