From: <sv...@va...> - 2007-03-26 15:27:03
|
Author: sewardj Date: 2007-03-26 16:27:01 +0100 (Mon, 26 Mar 2007) New Revision: 6664 Log: Add a variant of gsl16test which handles the newer gsl-1.9 package. Added: trunk/auxprogs/gsl19test Modified: trunk/auxprogs/Makefile.am Modified: trunk/auxprogs/Makefile.am =================================================================== --- trunk/auxprogs/Makefile.am 2007-03-26 15:23:20 UTC (rev 6663) +++ trunk/auxprogs/Makefile.am 2007-03-26 15:27:01 UTC (rev 6664) @@ -5,6 +5,7 @@ noinst_SCRIPTS = gen-mdg DotToScc.hs Merge3Way.hs primes.c \ gsl16test gsl16-badfree.patch gsl16-wavelet.patch \ + gsl19test \ ppcfround.c ppc64shifts.c libmpiwrap.c mpiwrap_type_test.c \ aix5_VKI_info.c libmpiwrap_aix5.exp \ aix5_proc_self_sysent.c \ Added: trunk/auxprogs/gsl19test =================================================================== --- trunk/auxprogs/gsl19test (rev 0) +++ trunk/auxprogs/gsl19test 2007-03-26 15:27:01 UTC (rev 6664) @@ -0,0 +1,118 @@ +#!/bin/sh + +# Do an automated test which involves building and regtesting version +# 1.9 of the GNU Scientific Library (gsl). This has proven to be a +# very thorough test of Vex's CPU simulations and has exposed bugs +# which had not been previously discovered. Gsl 1.9 contains more +# than 6 million tests as part of its regression suite, and so this +# script's purpose is to runs those tests using valgrind and compare +# against the same tests run natively. Note that it produces a +# huge amount of output (about 2 x 620 MByte), so be careful. +# The older gsl16test script produces only about 2 x 7 MByte per run. +# +# You can download gsl and get more info about it at +# http://www.gnu.org/software/gsl + + + +# Args: +# absolute name of gsl-1.9.tar.gz file +# name of C compiler +# args for C compiler +# name of Valgrind +# args for Valgrind + + +if [ $# != 5 ] +then + echo "usage: gsl19test /absolute/name/of/gsl-1.9.tar.gz" + echo " C-compiler-command" + echo " flags-for-C-compiler" + echo " Valgrind-command" + echo " flags-for-Valgrind" + exit 1 +fi + + +runcmd () { + echo -n " $1 ... " + shift + + (eval "$*") >> log.verbose 2>&1 + + if [ $? == 0 ] + then + echo "done" + return 0 + else + echo "failed" + return 1 + fi +} + +GSL_FILE=$1 +GSL_CC=$2 +GSL_CFLAGS=$3 +GSL_VV=$4 +GSL_VFLAGS=$5 + +TESTS1="block/test bspline/test cblas/test cdf/test cheb/test" +TESTS2="combination/test complex/test const/test deriv/test dht/test" +TESTS3="diff/test eigen/test err/test fft/test fit/test histogram/test" +TESTS4="ieee-utils/test integration/test interpolation/test linalg/test" +TESTS5="matrix/test min/test monte/test multifit/test multimin/test" +TESTS6="multiroots/test ntuple/test ode-initval/test permutation/test" +TESTS7="poly/test qrng/test randist/test rng/test roots/test siman/test" +TESTS8="sort/test specfunc/test statistics/test sum/test sys/test" +TESTS9="vector/test wavelet/test" + +ALL_TESTS="$TESTS1 $TESTS2 $TESTS3 $TESTS4 $TESTS5 $TESTS6 $TESTS7 $TESTS8 $TESTS9" + + +echo "gsl19test: src: " $GSL_FILE +echo "gsl19test: cc: " $GSL_CC +echo "gsl19test: cflags: " $GSL_CFLAGS +echo "gsl19test: valgrind: " $GSL_VV +echo "gsl19test: vflags: " $GSL_VFLAGS + +rm -rf log.verbose gsl-1.9 summary.txt + +echo > log.verbose + +echo > summary.txt +echo $0 $1 \"$2\" \"$3\" \"$4\" \"$5\" >> summary.txt +echo >> summary.txt + +runcmd "Untarring " \ + "rm -rf gsl-1.9 && tar xzf $GSL_FILE" && \ +\ +runcmd "Configuring " \ + "(cd gsl-1.9 && CC=$GSL_CC CFLAGS=\"$GSL_CFLAGS\" ./configure)" && \ +\ +runcmd "Building " \ + "(cd gsl-1.9 && make && make -k check)" + +echo -n " Collecting reference results " +rm -f out-REF +(cd gsl-1.9 && for f in $ALL_TESTS ; \ + do GSL_TEST_VERBOSE=1 ./$f ; done) &> out-REF +echo " ... done" + +echo -n " Collecting valgrinded results " +rm -f out-V +(cd gsl-1.9 && for f in $ALL_TESTS ; \ + do GSL_TEST_VERBOSE=1 eval $GSL_VV -v --trace-children=yes "$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 -n " Native fails: " && (grep FAIL: out-REF | wc -l)) >> summary.txt +(echo -n " Native passes: " && (grep PASS: out-REF | wc -l)) >> summary.txt +(echo -n " Valgrind fails: " && (grep FAIL: out-V | wc -l)) >> summary.txt +(echo -n " Valgrind passes: " && (grep PASS: out-V | wc -l)) >> summary.txt +echo >> summary.txt + +echo Property changes on: trunk/auxprogs/gsl19test ___________________________________________________________________ Name: svn:executable + * |