Date: Fri, 4 Jun 2010 00:19:22 +0200 From: Erik Cederstrand <erik@cederstrand.dk> To: Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: Alexander Leidinger <Alexander@Leidinger.net>, current@FreeBSD.org Subject: Re: Running all regression tests Message-ID: <E7506938-8396-4342-BAFE-F51D9047F40C@cederstrand.dk> In-Reply-To: <87ljav99j2.fsf@kobe.laptop> References: <97382526-EC81-4660-B494-315A73DD5783@cederstrand.dk> <20100603145013.599226aj5n6rgikg@webmail.leidinger.net> <87ljav99j2.fsf@kobe.laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 = <Alexander@Leidinger.net> wrote: >> Quoting Erik Cederstrand <erik@cederstrand.dk> (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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E7506938-8396-4342-BAFE-F51D9047F40C>