Ignore:
Timestamp:
Jun 26, 2005, 12:42:04 AM (20 years ago)
Author:
bird
Message:

libc adjustments. extending some testcases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libctests/glibc/Makefile

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r2075 r2076  
    11# $Id$
    2            
    3            
    4 # default rule       
    5 all: test-logged
     2       
     3       
     4# default rule 
     5all: tests-logged
    66
    77#
     
    1212LOG    = $(OUTDIR)/$(1)-$(TS).log
    1313CC     = gcc
     14LDFLAGS=
    1415CFLAGS = -O -D_GNU_SOURCE -std=gnu99 -DOBJPFX=\"$(OUTDIR)/\"
    1516ifeq ($(shell uname -m),amd64)
     
    2425#
    2526ifeq ($(TARGET),)
    26 TARGET     := bsd
     27TARGET     := innoteklibc
    2728endif
    2829
    2930ifeq ($(TARGET),glibc)
    30 SKIPPED    := 
    31 EXCEPTIONS :=
     31SKIPPED    :=
     32EXPECTED   :=
    3233_TARGET_OK := ok
    3334CFLAGS     += \
     
    4445
    4546ifeq ($(TARGET),innoteklibc)
    46 SKIPPED    :=
    47 EXCEPTIONS :=
     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        \
     58        timezone/test-tz.c \
     59        timezone/tst-timezone.c \
     60        \
     61        wcsmbs/tst-wcpncpy.c \
     62        wcsmbs/tst-wcsnlen.c \
     63
     64EXPECTED   := \
     65        wcsmbs/tst-mbrtowc.c \
     66        wcsmbs/tst-wcrtomb.c \
     67        time/tst-posixtz.c
     68       
     69CFLAGS     += -Zomf -g \
     70        -DHAVE_STRNLEN \
     71        -DHAVE_MEMPCPY
     72LDFLAGS    += -Zstack 512
    4873_TARGET_OK := ok
    4974endif
     
    7297        string/tst-strfry.c
    7398EXCEPTIONS := \
    74         catgets/test-gencat.c 
     99        catgets/test-gencat.c
    75100_TARGET_OK := ok
    76101CFLAGS     += -I sysdeps/unix/bsd -D__BSD__
     
    85110        @echo TS=$(TS)
    86111
    87        
     112
    88113#
    89114# The test.
     
    135160
    136161GRP := \
    137         grp/testgrp.c 
     162        grp/testgrp.c
    138163#       grp/tst_fgetgrent.c
    139164       
     
    213238        libio/tst_wprintf2.c \
    214239        libio/tst_wscanf.c
    215          
     240       
    216241libio/tst-widetext.c_INPUT = libio/tst-widetext.input
    217242libio/tst_getwc.c_INPUT = libio/tst_getwc.input
     
    240265        malloc/tst-valloc.c
    241266#        malloc/tst-mtrace.c
    242 #        malloc/tst-mtrace.sh 
     267#        malloc/tst-mtrace.sh
    243268
    244269MATH := \
     
    260285        math/test-tgmath.c \
    261286        math/tst-definitions.c
    262 #        math/atest-exp2.c 
    263 #        math/atest-sincos.c 
    264 #         math/atest-exp.c 
     287#        math/atest-exp2.c
     288#        math/atest-sincos.c
     289#         math/atest-exp.c
    265290#         math/gen-libm-test.pl
    266291$(foreach t,$(MATH),$(eval $(t)_LDFLAGS := -lm))
     
    369394#        posix/tst-sysconf.c - too new?
    370395# todo:
    371 #        posix/wordexp-test.c 
    372 #        posix/wordexp-tst.sh 
    373 #        posix/globtest.c 
    374 #        posix/globtest.sh 
    375 #        posix/tst-getconf.sh 
     396#        posix/wordexp-test.c
     397#        posix/wordexp-tst.sh
     398#        posix/globtest.c
     399#        posix/globtest.sh
     400#        posix/tst-getconf.sh
    376401
    377402posix/tst-fnmatch.c_INPUT = posix/tst-fnmatch.input
     
    387412posix/bug-glob1.c_ARGS = "$(OBJDIR)/posix/"
    388413posix/tst-execvp3.c_ARGS = --test-dir="$(OBJDIR)/posix/"
    389          
     414       
    390415
    391416PWD := \
     
    444469stdio-common/tstgetln.c_INPUT = stdio-common/tstgetln.input
    445470stdio-common/tstscanf.c_INPUT = stdio-common/tstscanf.input
    446 #        stdio-common/tst-printf.c 
    447 #        stdio-common/tst-printf.sh 
    448 #       stdio-common/tst-unbputc.c 
    449 #        stdio-common/tst-unbputc.sh 
     471#        stdio-common/tst-printf.c
     472#        stdio-common/tst-printf.sh
     473#       stdio-common/tst-unbputc.c
     474#        stdio-common/tst-unbputc.sh
    450475
    451476STDLIB := \
     
    474499        stdlib/testdiv.c
    475500# todo:
    476 #       stdlib/tst-fmtmsg.c 
     501#       stdlib/tst-fmtmsg.c
    477502#       stdlib/tst-fmtmsg.sh
    478503#       stdlib/tst-putenvmod.c
     
    611636#
    612637# Generate test rules
    613 # 
     638#
    614639_TESTS :=
    615640
     
    617642define def_simple
    618643
    619 $(OUTDIR)/$2.exe: $1 $(OUTDIR)/$(dir $1).dir_created $($(1)_DEPS)
    620         @echo "* COMPILING: $1"
    621         @$$(CC) $$(CFLAGS) -o $$@ $($(1)_CFLAGS) $($(1)_LDFLAGS)  $$< || (echo "$$(CC) $$(CFLAGS) -o $$@ $$<" && exit 1)
    622        
    623 $(OUTDIR)/$2.result: $(OUTDIR)/$2.exe
    624         @echo "* TESTING  : $1"
    625         @if LC_ALL=C $($1_ENVS) $$< $($1_ARGS) $(if $($(1)_INPUT), < $($(1)_INPUT),) ; then echo OK > $$@; else echo FAILURE > $$@; fi
    626         @echo "* RESULT   : $1 - `cat $$@`"
     644$(OUTDIR)/$2.result: $1 $(OUTDIR)/$(dir $1).dir_created $($(1)_DEPS)
     645        @echo "########## $1"; \
     646        echo  "##  BUILDING: $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<"; \
     647        if $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<; then \
     648                echo "##  RUNNING : LC_ALL=C $($1_ENVS) $(OUTDIR)/$2.exe $($1_ARGS) $(if $($(1)_INPUT), < $($(1)_INPUT),)"; \
     649                if LC_ALL=C $($1_ENVS) $(OUTDIR)/$2.exe $($1_ARGS) $(if $($(1)_INPUT), < $($(1)_INPUT),); then\
     650                        echo OK > $$@; \
     651                        printf "########## %-26s - SUCCESS\n" "$1"; \
     652                else \
     653                        echo "##  rc=$$$$?"; \
     654                        printf "########## %-26s - $(if $(filter $1,$(EXPECTED)),EXPECTED FAILURE,FAILURE)\n" "$1"; \
     655                        echo "$(if $(filter $1,$(EXPECTED)),EXPECTED,FAILURE)" > $$@; \
     656                fi \
     657        else \
     658                echo "##  rc=$$$$? "; \
     659                echo "##  $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<"; \
     660                printf "########## %-26s - BUILD FAILURE\n" "$1";  \
     661                echo "FAILURE - $$(CC) $$(CFLAGS) -o $(OUTDIR)/$2.exe $($(1)_CFLAGS) $($(1)_LDFLAGS) $$<" > $$@; \
     662        fi
     663       
     664$2: $(OUTDIR)/$2.result
     665        @
    627666       
    628667_TESTS += $(OUTDIR)/$2.result
     
    633672define def_skipped
    634673$(OUTDIR)/$2.result:
    635         @echo "* SKIPPING : $1"
    636         @echo "SKIPPED" > $$@
     674        @printf "########## %-26s - SKIPPED\n" "$1"; \
     675        echo "SKIPPED" > $$@
    637676       
    638677_TESTS += $(OUTDIR)/$2.result
     
    656695        @echo " SUCCESS : `cat /dev/null $$^ | grep OK | wc -l`"
    657696        @echo " SKIPPED : `cat /dev/null $$^ | grep SKIPPED | wc -l`"
     697        @echo " EXPECTED: `cat /dev/null $$^ | grep EXPECTED | wc -l`"
    658698        @echo " FAILURES: `cat /dev/null $$^ | grep FAILURE | wc -l`"
    659699
     
    664704
    665705
    666 #       
    667 # generate directory rules               
     706#
     707# generate directory rules             
    668708#
    669709define def_dir
    670710$1.dir_created:
    671         mkdir -p $1
    672         echo > $$@
     711        @mkdir -p $1
     712        @echo > $$@
    673713endef
    674714
     
    679719#
    680720# All tests (expect the ones in the next sections).
    681 # 
     721#
    682722tests: $(_TESTS)
    683723        @echo "***************"
    684724        @echo " SUCCESS : `cat /dev/null $^ | grep OK | wc -l`"
    685725        @echo " SKIPPED : `cat /dev/null $^ | grep SKIPPED | wc -l`"
     726        @echo " EXPECTED: `cat /dev/null $^ | grep EXPECTED | wc -l`"
    686727        @echo " FAILURES: `cat /dev/null $^ | grep FAILURE | wc -l`"
    687728
Note: See TracChangeset for help on using the changeset viewer.