From owner-freebsd-current@FreeBSD.ORG Thu Jun 3 22:19:25 2010 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524891065670 for ; Thu, 3 Jun 2010 22:19:25 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id DE3B08FC18 for ; Thu, 3 Jun 2010 22:19:24 +0000 (UTC) Received: from macfeast.lan (0x573b9942.cpe.ge-1-2-0-1101.ronqu1.customer.tele.dk [87.59.153.66]) by csmtp3.one.com (Postfix) with ESMTP id EDD0B24061B0; Thu, 3 Jun 2010 22:19:22 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: multipart/signed; boundary=Apple-Mail-627-943619085; protocol="application/pkcs7-signature"; micalg=sha1 From: Erik Cederstrand In-Reply-To: <87ljav99j2.fsf@kobe.laptop> Date: Fri, 4 Jun 2010 00:19:22 +0200 Message-Id: References: <97382526-EC81-4660-B494-315A73DD5783@cederstrand.dk> <20100603145013.599226aj5n6rgikg@webmail.leidinger.net> <87ljav99j2.fsf@kobe.laptop> To: Giorgos Keramidas X-Mailer: Apple Mail (2.1078) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Alexander Leidinger , current@FreeBSD.org Subject: Re: Running all regression tests X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 22:19:25 -0000 --Apple-Mail-627-943619085 Content-Type: multipart/mixed; boundary=Apple-Mail-626-943619071 --Apple-Mail-626-943619071 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Den 03/06/2010 kl. 21.54 skrev Giorgos Keramidas: > On Thu, 03 Jun 2010 14:50:13 +0200, Alexander Leidinger = wrote: >> Quoting Erik Cederstrand (from Thu, 3 Jun 2010 >> 12:02:51 +0200): >>=20 >>> Hi, >>>=20 >>> I'd like to run the regression tests in src/tools/regression on a >>> regular basis. What's the official way to do this? Is there some way >>> I can run them all in one go? >>>=20 >>> It seems it's necessary to enter every single subdirectory and >>> execute any Makefiles located there before running 'prove -r'. Some >>=20 >> You could write a Makefile which recurses into the subdirs. I ended up with the attached shell script which does the job (but not = very elegantly) for the time being. As stated elsewhere in this thread, some tests need cleaning up and = rewriting to the standard format. Erik --Apple-Mail-626-943619071 Content-Disposition: attachment; filename=test.sh Content-Type: application/octet-stream; name="test.sh" Content-Transfer-Encoding: 7bit #!/bin/sh # Runs all regression tests within src/tools/regression. # Copy it to src/tools/regression and do: # ./test.sh make # ./test.sh run MAKE="/usr/bin/make" PROVE="/usr/local/bin/prove" DIR=`dirname $0` PWD=`pwd` if [ "$DIR" = "." ]; then BASEDIR="$PWD" else BASEDIR="$PWD/$DIR" fi # Only needs to run once if [ "$1" = "make" ]; then echo "Running 'make':" makefiles=`find "$BASEDIR/" -name "Makefile" | sort` for m in $makefiles; do dir=`dirname $m` # Only run 'make' in directories that contain .t files dott=`find "$dir" -name "*.t"` if [ "$dott" = "" ]; then echo " Skipping $dir (no *.t files in this directory)" else echo " Building in $dir" cd "$dir" # Some of the makefiles start running tests. Ignore the output for now. $MAKE > /dev/null fi done elif [ "$1" = "run" ]; then echo "Running tests:" # Find all dirs containing .t files tdirs=`find "$BASEDIR/" -name "*.t" | sed 's|[^/]*t$||' | sort -u` for t in $tdirs; do echo " Proving $t" $PROVE $t done else echo "Unknown option ('$1')" fi echo "Done" --Apple-Mail-626-943619071-- --Apple-Mail-627-943619085--