File tree 1 file changed +9
-4
lines changed 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,17 @@ function fatal () {
11
11
which datamash || fatal " FATAL: datamash must be installed"
12
12
13
13
TMPIN=` mktemp`
14
+ TMPOUT=` mktemp`
14
15
15
16
function cleanup {
16
- rm -f $TMPIN
17
+ rm -f $TMPIN $TMPOUT
17
18
}
18
19
19
20
trap cleanup EXIT
20
21
22
+ # build executables we want to test
21
23
dune build src/gauss_test.exe
24
+ dune build src/welford_test.exe
22
25
23
26
# some wanted distributions MU and SIGMA params
24
27
cat << EOF > $TMPIN
@@ -31,7 +34,9 @@ cat <<EOF > $TMPIN
31
34
EOF
32
35
33
36
while read MU SIGMA; do
34
- printf " %.3f\t%.3f\n" $MU $SIGMA
35
- _build/default/src/gauss_test.exe $MU $SIGMA 100000 | \
36
- datamash mean 1 sstdev 1 | awk ' {printf("%.3f\t%.3f\n\n",$1,$2)}'
37
+ printf " %.3f\t%.3f\tREF\n" $MU $SIGMA
38
+ _build/default/src/gauss_test.exe $MU $SIGMA 100000 > $TMPOUT
39
+ _build/default/src/welford_test.exe $TMPOUT
40
+ cat $TMPOUT | datamash mean 1 sstdev 1 | \
41
+ awk ' {printf("%.3f\t%.3f\n",$1,$2)}'
37
42
done < $TMPIN
You can’t perform that action at this time.
0 commit comments