From owner-svn-src-head@FreeBSD.ORG Thu Jan 6 20:05:24 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AB66106566C; Thu, 6 Jan 2011 20:05:24 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9C48FC12; Thu, 6 Jan 2011 20:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p06K5O1f026818; Thu, 6 Jan 2011 20:05:24 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p06K5ORU026814; Thu, 6 Jan 2011 20:05:24 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101062005.p06K5ORU026814@svn.freebsd.org> From: Giorgos Keramidas Date: Thu, 6 Jan 2011 20:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217064 - head/tools/regression/acct X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2011 20:05:24 -0000 Author: keramida (doc committer) Date: Thu Jan 6 20:05:24 2011 New Revision: 217064 URL: http://svn.freebsd.org/changeset/base/217064 Log: tests: 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'. Reviewed by: uqs MFC after: 1 week Modified: head/tools/regression/acct/Makefile head/tools/regression/acct/pack.c head/tools/regression/acct/regress.t Modified: head/tools/regression/acct/Makefile ============================================================================== --- head/tools/regression/acct/Makefile Thu Jan 6 19:50:11 2011 (r217063) +++ head/tools/regression/acct/Makefile Thu Jan 6 20:05:24 2011 (r217064) @@ -1,26 +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} -CFLAGS= -include /usr/include/sys/limits.h \ - -include /usr/include/sys/syslog.h - -all: regress - -pack: pack.c convert.c +pack.o: convert.c +CLEANFILES+= convert.c convert.c: ../../../sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? >$@ regress: pack regress.t - ./regress.t - -clean: - rm -f $(PROG) convert.c + ${.CURDIR}/regress.t .include Modified: head/tools/regression/acct/pack.c ============================================================================== --- head/tools/regression/acct/pack.c Thu Jan 6 19:50:11 2011 (r217063) +++ head/tools/regression/acct/pack.c Thu Jan 6 20:05:24 2011 (r217064) @@ -25,15 +25,18 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include #include #include +#include #include #include - -#include -#include +#include +#include #define KASSERT(val, msg) assert(val) Modified: head/tools/regression/acct/regress.t ============================================================================== --- head/tools/regression/acct/regress.t Thu Jan 6 19:50:11 2011 (r217063) +++ head/tools/regression/acct/regress.t Thu Jan 6 20:05:24 2011 (r217064) @@ -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() {