Date: Wed, 19 Jan 2011 21:09:39 +0000 (UTC) From: Giorgos Keramidas <keramida@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r217599 - stable/8/tools/regression/acct Message-ID: <201101192109.p0JL9duf089141@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: keramida (doc committer) Date: Wed Jan 19 21:09:39 2011 New Revision: 217599 URL: http://svn.freebsd.org/changeset/base/217599 Log: MFC r217064 - sort & fix includes, remove -include from CFLAGS of acct tests - Sort the includes of pack.c, moving sys/*.h files near the top. - Add a couple of missing #include lines, and remove the need for custom -include options in the CFLAGS of the test Makefile. - Remove the ad-hoc ’all’ target, but keep its ’regress’ bits for testing. - Convert the ad-hoc ’clean’ target to proper CLEANFILES stuff, so that the normal bsd.prog.mk machinery can clean up. - Use ‘make -V .OBJDIR’ to detect the place where ’pack’ lives, so that regress.t works both with and without ’make obj’. Modified: stable/8/tools/regression/acct/Makefile stable/8/tools/regression/acct/pack.c stable/8/tools/regression/acct/regress.t Directory Properties: stable/8/tools/regression/acct/ (props changed) Modified: stable/8/tools/regression/acct/Makefile ============================================================================== --- stable/8/tools/regression/acct/Makefile Wed Jan 19 21:03:22 2011 (r217598) +++ stable/8/tools/regression/acct/Makefile Wed Jan 19 21:09:39 2011 (r217599) @@ -1,22 +1,22 @@ # # $FreeBSD$ # -# "make" will compile what is needed and run the regression tests. +# "make" will compile the acct test programs # + PROG= pack +SRCS= pack.c NO_MAN= +CFLAGS+= -I${.OBJDIR} -all: regress - -pack: pack.c convert.c +pack.o: convert.c +CLEANFILES+= convert.c convert.c: ../../../sys/kern/kern_acct.c - sed -n '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? >$@ + sed -n '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? | \ + sed -e 's/log(/syslog(/' >$@ regress: pack regress.t - ./regress.t - -clean: - rm -f $(PROG) convert.c + sh ${.CURDIR}/regress.t .include <bsd.prog.mk> Modified: stable/8/tools/regression/acct/pack.c ============================================================================== --- stable/8/tools/regression/acct/pack.c Wed Jan 19 21:03:22 2011 (r217598) +++ stable/8/tools/regression/acct/pack.c Wed Jan 19 21:09:39 2011 (r217599) @@ -25,15 +25,18 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/types.h> + #include <assert.h> #include <float.h> +#include <limits.h> #include <math.h> #include <stdio.h> +#include <stdint.h> #include <stdlib.h> #include <strings.h> - -#include <sys/time.h> -#include <sys/types.h> +#include <syslog.h> +#include <time.h> #define KASSERT(val, msg) assert(val) Modified: stable/8/tools/regression/acct/regress.t ============================================================================== --- stable/8/tools/regression/acct/regress.t Wed Jan 19 21:03:22 2011 (r217598) +++ stable/8/tools/regression/acct/regress.t Wed Jan 19 21:09:39 2011 (r217599) @@ -3,7 +3,12 @@ # $FreeBSD$ # -DIR=`dirname $0` +if test -z "${DIR}" ; then + DIR=$( make -V .OBJDIR ) +fi +if test -z "${DIR}" ; then + DIR=$( dirname $0 ) +fi check() {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101192109.p0JL9duf089141>