Browse Source

test.sh: move valgrind PREFIX setting to vars.sh

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
973ef3c932
  1. 7
      daemon/test/scripts/vars.sh
  2. 6
      daemon/test/test.sh

7
daemon/test/scripts/vars.sh

@ -8,6 +8,12 @@ CLI="bitcoin-cli -datadir=$DATADIR"
REGTESTDIR=regtest
DAEMON="$EATMYDATA bitcoind -datadir=$DATADIR"
PREFIX=$EATMYDATA
# Always use valgrind if available (unless NO_VALGRIND=1 set)
if which valgrind >/dev/null; then :; else NO_VALGRIND=1; fi
[ -n "$NO_VALGRIND" ] || PREFIX="$EATMYDATA valgrind -q --error-exitcode=7"
findport()
{
PORT=$1
@ -16,4 +22,3 @@ findport()
while netstat -ntl | grep -q ":$PORT "; do PORT=$(($PORT + 1)); done
echo $PORT
}
#PREFIX="valgrind --vgdb-error=1"

6
daemon/test/test.sh

@ -39,14 +39,10 @@ NO_HTLCS_FEE=$((338 * $FEE_RATE / 2000 * 2000))
ONE_HTLCS_FEE=$(( (338 + 32) * $FEE_RATE / 2000 * 2000))
EXTRA_FEE=$(($ONE_HTLCS_FEE - $NO_HTLCS_FEE))
# Always use valgrind if available.
PREFIX=$EATMYDATA
[ -n "$NO_VALGRIND" ] || PREFIX="$EATMYDATA valgrind -q --error-exitcode=7"
while [ $# != 0 ]; do
case x"$1" in
x"--valgrind-vgdb")
[ -n "$NO_VALGRIND" ] || PREFIX="$EATMYDATA valgrind --vgdb-error=1"
[ -n "$NO_VALGRIND" ] || PREFIX="$PREFIX --vgdb-error=1"
REDIR1="/dev/tty"
REDIRERR1="/dev/tty"
REDIR2="/dev/tty"

Loading…
Cancel
Save