|
From: <sv...@va...> - 2005-07-04 23:44:45
|
Author: sewardj Date: 2005-07-05 00:44:10 +0100 (Tue, 05 Jul 2005) New Revision: 4104 Log: Add a test script (recycled version of Tom's nightly/bin/nightly) which is useful for doing automated test runs against the GNU Scientific Library v 1.6 (gsl-1.6). This has proven very helpful in shaking out Vex simulation bugs. Added: trunk/auxprogs/gsl16test Modified: trunk/auxprogs/Makefile.am Modified: trunk/auxprogs/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/auxprogs/Makefile.am 2005-07-03 20:22:39 UTC (rev 4103) +++ trunk/auxprogs/Makefile.am 2005-07-04 23:44:10 UTC (rev 4104) @@ -3,7 +3,7 @@ =20 bin_PROGRAMS =3D valgrind-listener =20 -noinst_SCRIPTS =3D gen-mdg DotToScc.hs +noinst_SCRIPTS =3D gen-mdg DotToScc.hs gsl16test =20 EXTRA_DIST =3D $(noinst_SCRIPTS) =20 Added: trunk/auxprogs/gsl16test =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/auxprogs/gsl16test 2005-07-03 20:22:39 UTC (rev 4103) +++ trunk/auxprogs/gsl16test 2005-07-04 23:44:10 UTC (rev 4104) @@ -0,0 +1,92 @@ +#!/bin/bash + +# Do an automated test which involves building and regtesting version +# 1.6 of the GNU Scientific Library (gsl). This has proven to be a=20 +# very thorough test of Vex's CPU simulations and has exposed bugs=20 +# which had not been previously discovered. Gsl contains more +# than 100,000 tests as part of its regression suite, and so this +# script's purpose is to runs those tests using valgrind and compare=20 +# against the same tests run natively. +#=20 +# You can download gsl and get more info about it at=20 +# http://www.gnu.org/software/gsl + + + +# Args: +# absolute name of gsl-1.6.tar.gz file +# name of C compiler +# args for C compiler +# name of Valgrind +# args for Valgrind + + +runcmd () { + echo -n " $1 ... " + shift + + (eval "$*") >> log.verbose 2>&1 + + if [ $? =3D=3D 0 ] + then + echo "done" + return 0 + else + echo "failed" + return 1 + fi +} + +GSL_FILE=3D$1 +GSL_CC=3D$2 +GSL_CFLAGS=3D$3 +GSL_VV=3D$4 +GSL_VFLAGS=3D$5 + +TESTS1=3D"block/test cblas/test cdf/test cheb/test combination/test" +TESTS2=3D"complex/test const/test deriv/test dht/test diff/test" +TESTS3=3D"eigen/test err/test fft/test fit/test histogram/test" +TESTS4=3D"ieee-utils/test integration/test interpolation/test linalg/tes= t" +TESTS5=3D"matrix/test min/test monte/test multifit/test multimin/test" +TESTS6=3D"multiroots/test ntuple/test ode-initval/test permutation/test" +TESTS7=3D"poly/test qrng/test randist/test rng/test roots/test siman/tes= t" +TESTS8=3D"sort/test specfunc/test statistics/test sum/test sys/test" +TESTS9=3D"vector/test wavelet/test" + +ALL_TESTS=3D"$TESTS1 $TESTS2 $TESTS3 $TESTS4 $TESTS5 $TESTS6 $TESTS7 $TE= STS8 $TESTS9" + +echo "gsl16test: src: " $GSL_FILE +echo "gsl16test: cc: " $GSL_CC +echo "gsl16test: cflags: " $GSL_CFLAGS +echo "gsl16test: valgrind: " $GSL_VV +echo "gsl16test: vflags: " $GSL_VFLAGS + +rm -rf log.verbose gsl-1.6 + +echo > log.verbose + +runcmd "Untarring " \ + "rm -rf gsl-1.6 && tar xzf $GSL_FILE" && \ +\ +runcmd "Configuring " \ + "(cd gsl-1.6 && CC=3D$GSL_CC CFLAGS=3D$GSL_CFLAGS ./configure)" &= & \ +\ +runcmd "Building " \ + "(cd gsl-1.6 && make && make -k check)" + +echo -n " Collecting reference results " +rm -f out-REF +(cd gsl-1.6 && for f in $ALL_TESTS ; do ./$f ; done) &> out-REF +echo " ... done" + +echo -n " Collecting valgrinded results " +rm -f out-V +(cd gsl-1.6 && for f in $ALL_TESTS ; do $GSL_VV -v --trace-children=3Dye= s $GSL_VFLAGS ./$f ; done) &> out-V +echo " ... done" + +echo -n " Native fails: " && (grep FAIL: out-REF | wc -l) +echo -n " Native passes: " && (grep PASS: out-REF | wc -l) +echo -n " Valgrind fails: " && (grep FAIL: out-V | wc -l) +echo -n " Valgrind passes: " && (grep PASS: out-V | wc -l) + +echo Property changes on: trunk/auxprogs/gsl16test ___________________________________________________________________ Name: svn:executable + * |