3 # Do an automated test which involves building and regtesting version
4 # 1.6 of the GNU Scientific Library (gsl). This has proven to be a
5 # very thorough test of Vex's CPU simulations and has exposed bugs
6 # which had not been previously discovered. Gsl contains more
7 # than 100,000 tests as part of its regression suite, and so this
8 # script's purpose is to runs those tests using valgrind and compare
9 # against the same tests run natively.
11 # You can download gsl and get more info about it at
12 # http://www.gnu.org/software/gsl
17 # absolute name of gsl-1.6.tar.gz file
23 # Results: 3.7.0 --tool=none
24 # x86 1 failure Ubuntu 10.10
25 # FAIL: qawo(f456) elist (7.25063790881233303e-15 observed vs 7.25922435194575979e-15 expected)
26 # same failure was also present in 3.6.1
27 # s390x 0 failures on z900 running RHEL4
31 echo "usage: gsl16test /absolute/name/of/gsl-1.6-patched.tar.gz"
32 echo " C-compiler-command"
33 echo " flags-for-C-compiler"
34 echo " Valgrind-command"
35 echo " flags-for-Valgrind"
44 (eval "$*") >> log.verbose
2>&1
62 TESTS1
="block/test cblas/test cdf/test cheb/test combination/test"
63 TESTS2
="complex/test const/test deriv/test dht/test diff/test"
64 TESTS3
="eigen/test err/test fft/test fit/test histogram/test"
65 TESTS4
="ieee-utils/test integration/test interpolation/test linalg/test"
66 TESTS5
="matrix/test min/test monte/test multifit/test multimin/test"
67 TESTS6
="multiroots/test ntuple/test ode-initval/test permutation/test"
68 TESTS7
="poly/test qrng/test randist/test rng/test roots/test siman/test"
69 TESTS8
="sort/test specfunc/test statistics/test sum/test sys/test"
70 TESTS9
="vector/test wavelet/test"
72 ALL_TESTS
="$TESTS1 $TESTS2 $TESTS3 $TESTS4 $TESTS5 $TESTS6 $TESTS7 $TESTS8 $TESTS9"
74 echo "gsl16test: src: " $GSL_FILE
75 echo "gsl16test: cc: " $GSL_CC
76 echo "gsl16test: cflags: " $GSL_CFLAGS
77 echo "gsl16test: valgrind: " $GSL_VV
78 echo "gsl16test: vflags: " $GSL_VFLAGS
80 rm -rf log.verbose gsl-1.6
-patched summary.txt
85 echo $0 $1 \"$2\" \"$3\" \"$4\" \"$5\" >> summary.txt
89 "rm -rf gsl-1.6-patched && tar xzf $GSL_FILE" && \
91 runcmd
"Configuring " \
92 "(cd gsl-1.6-patched && CC=$GSL_CC CFLAGS=\"$GSL_CFLAGS\" ./configure)" && \
95 "(cd gsl-1.6-patched && make -j4 && make -k check)"
97 echo -n " Collecting reference results "
99 (cd gsl-1.6
-patched && for f
in $ALL_TESTS ; do .
/$f ; done) &> out-REF
102 echo -n " Collecting valgrinded results "
104 (cd gsl-1.6
-patched && for f
in $ALL_TESTS ; do eval $GSL_VV -v --trace-children=yes "$GSL_VFLAGS" .
/$f ; done) &> out-VAL
107 echo -n " Native fails: " && (grep FAIL
: out-REF |
wc -l)
108 echo -n " Native passes: " && (grep PASS
: out-REF |
wc -l)
109 echo -n " Valgrind fails: " && (grep FAIL
: out-VAL |
wc -l)
110 echo -n " Valgrind passes: " && (grep PASS
: out-VAL |
wc -l)
112 (echo -n " Native fails: " && (grep FAIL
: out-REF |
wc -l)) >> summary.txt
113 (echo -n " Native passes: " && (grep PASS
: out-REF |
wc -l)) >> summary.txt
114 (echo -n " Valgrind fails: " && (grep FAIL
: out-VAL |
wc -l)) >> summary.txt
115 (echo -n " Valgrind passes: " && (grep PASS
: out-VAL |
wc -l)) >> summary.txt