tests/vg_regtest: Always evaluate prerequisite expressions with sh
[valgrind.git] / drd / scripts / run-matinv
bloba115528134a29230dfdbecb24fdae0bb66fa8160
1 #!/bin/bash
3 ########################
4 # Function definitions #
5 ########################
7 source "$(dirname $0)/measurement-functions"
9 ########################
10 # Script body #
11 ########################
13 DRD_SCRIPTS_DIR="$(dirname $0)"
14 if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
15 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
18 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
19 MATINV="${DRD_SCRIPTS_DIR}/../../drd/tests/matinv"
22 for n in 200 400
24 tmp="/tmp/test-timing.$$"
25 rm -f "${tmp}"
27 measure_runtime ${MATINV} $n | avgstddev > "$tmp"
28 read avg1 stddev1 vsz1 vszdev1 < "$tmp"
29 echo "Average time: ${avg1} +/- ${stddev1} seconds." \
30 " VSZ: ${vsz1} +/- ${vszdev1} KB"
32 for i in 1 10
34 print_runtime_ratio ${avg1} ${stddev1} ${vsz1} ${vszdev1} \
35 ${VG} --tool=none ${MATINV} $n -t$i
36 print_runtime_ratio ${avg1} ${stddev1} ${vsz1} ${vszdev1} \
37 ${VG} --tool=drd ${MATINV} $n -t$i
38 done
39 done