From: solar Date: Thu, 1 Jun 2006 11:23:42 +0000 (+0000) Subject: Beautified output. X-Git-Tag: v0.5~175 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=e6fd9753e785702792a00236f86f257a22f5c794 Beautified output. --- diff --git a/Makefile b/Makefile index 11e1cdc..ab9e812 100644 --- a/Makefile +++ b/Makefile @@ -34,18 +34,20 @@ CFLAGS := -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings all: pdclib.a pdclib.a: $(OBJFILES) + @echo " AR $@" @ar rc pdclib.a $? + @echo test: $(FILE) $(FILE) tests: testdrivers - -@rc=0; count=0; for file in $(TSTFILES); do echo " TST $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking PDCLib): $$count Tests failed: $$rc" + -@rc=0; count=0; echo; for file in $(TSTFILES); do echo " TST $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking PDCLib): $$count Tests failed: $$rc"; echo testdrivers: $(TSTFILES) regtests: regtestdrivers - -@rc=0; count=0; for file in $(REGFILES); do echo " RTST $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking system libc): $$count Tests failed: $$rc" + -@rc=0; count=0; echo; for file in $(REGFILES); do echo " RTST $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking system libc): $$count Tests failed: $$rc"; echo regtestdrivers: $(REGFILES) @@ -102,13 +104,13 @@ help: @echo "help - print this list" %.o: %.c Makefile - @echo " CC $@" + @echo " CC $(patsubst functions/%,%,$@)" @$(CC) $(CFLAGS) -DNDEBUG -MMD -MP -MT "$*.d $*.t" -g -std=c99 -I./includes -I./internals -c $< -o $@ %.t: %.c Makefile pdclib.a - @echo " CC $@" + @echo " CC $(patsubst functions/%,%,$@)" @$(CC) $(CFLAGS) -DTEST -std=c99 -I./includes -I./internals $< pdclib.a -o $@ %.r: %.c Makefile - @echo " CC $@" + @echo " CC $(patsubst functions/%,%,$@)" @$(CC) $(CFLAGS) -DTEST -DREGTEST -std=c99 -I./internals $< -o $@ diff --git a/functions/stdlib/malloc.c b/functions/stdlib/malloc.c index 2286d0d..22718ee 100644 --- a/functions/stdlib/malloc.c +++ b/functions/stdlib/malloc.c @@ -165,8 +165,6 @@ void * sbrk( intptr_t ); int main( void ) { #ifndef REGTEST - printf( "Start of malloc() testing...\n" ); - { void * ptr1, * ptr2, * ptr3, * ptr4, * ptr5, * ptr6, * ptr7, * ptr8, * ptr9; char * pages_start = _PDCLIB_allocpages( 0 ); /* allocating 10 byte; expected: 1 page allocation, node split */ @@ -239,8 +237,6 @@ int main( void ) TESTCASE( memset( ptr9, 0, 4072 ) == ptr9 ); TESTCASE( PAGETEST( 9 ) ); NODETRACE( 17 ); - printf( "End of malloc() testing.\n" ); - } #else puts( "No testing of malloc() - test driver does not know internals of system function." ); #endif diff --git a/internals/_PDCLIB_test.h b/internals/_PDCLIB_test.h index 42664b2..302c27b 100644 --- a/internals/_PDCLIB_test.h +++ b/internals/_PDCLIB_test.h @@ -1,24 +1,24 @@ -/* $Id$ */ - -/* PDCLib testing suite <_PDCLIB_test.h> - - This file is part of the Public Domain C Library (PDCLib). - Permission is granted to use, modify, and / or redistribute at will. -*/ - -/* -------------------------------------------------------------------------- */ -/* Helper macros for test drivers */ -/* -------------------------------------------------------------------------- */ - -#include - -char const abcde[] = "abcde"; -char const abcdx[] = "abcdx"; - -int NO_TESTDRIVER = 0; - -//#define BEGIN_TESTS unsigned int rc = 0 -static unsigned int rc = 0; -#define TESTCASE( x ) if ( x ) {} \ - else { rc += 1; printf( "Testcase failed: " __FILE__ ", line %d - " #x "\n", __LINE__ ); } -#define TEST_RESULTS rc +/* $Id$ */ + +/* PDCLib testing suite <_PDCLIB_test.h> + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +/* -------------------------------------------------------------------------- */ +/* Helper macros for test drivers */ +/* -------------------------------------------------------------------------- */ + +#include + +char const abcde[] = "abcde"; +char const abcdx[] = "abcdx"; + +int NO_TESTDRIVER = 0; + +//#define BEGIN_TESTS unsigned int rc = 0 +static unsigned int rc = 0; +#define TESTCASE( x ) if ( x ) {} \ + else { rc += 1; printf( "FAILED: " __FILE__ ", line %d - " #x "\n", __LINE__ ); } +#define TEST_RESULTS rc