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