diff --git a/daemon/test/scripts/vars.sh b/daemon/test/scripts/vars.sh index f19237e18..a08a3c136 100644 --- a/daemon/test/scripts/vars.sh +++ b/daemon/test/scripts/vars.sh @@ -1,10 +1,13 @@ # Sourced by other scripts +# Suppress sync if we can, for speedup. +if which eatmydata >/dev/null; then EATMYDATA=eatmydata; fi + STYLE=bitcoin DATADIR=/tmp/bitcoin-lightning CLI="bitcoin-cli -datadir=$DATADIR" REGTESTDIR=regtest -DAEMON="bitcoind -datadir=$DATADIR" +DAEMON="$EATMYDATA bitcoind -datadir=$DATADIR" findport() { diff --git a/daemon/test/test.sh b/daemon/test/test.sh index 0fdee03a9..9cd89fd9a 100755 --- a/daemon/test/test.sh +++ b/daemon/test/test.sh @@ -40,12 +40,13 @@ ONE_HTLCS_FEE=$(( (338 + 32) * $FEE_RATE / 2000 * 2000)) EXTRA_FEE=$(($ONE_HTLCS_FEE - $NO_HTLCS_FEE)) # Always use valgrind if available. -[ -n "$NO_VALGRIND" ] || PREFIX="valgrind -q --error-exitcode=7" +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="valgrind --vgdb-error=1" + [ -n "$NO_VALGRIND" ] || PREFIX="$EATMYDATA valgrind --vgdb-error=1" REDIR1="/dev/tty" REDIRERR1="/dev/tty" REDIR2="/dev/tty"