test: don't reply on specific bitcoin.conf settings.

I changed mine off regtest, and "make check" broke.  Fix that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-03-15 17:08:42 +10:30
parent 8f2e66089b
commit 6410b0ac9c
3 changed files with 19 additions and 11 deletions

View File

@ -129,17 +129,17 @@ all_ok()
trap "echo Results in $DIR1 and $DIR2 >&2; cat $DIR1/errors $DIR2/errors >&2" EXIT
mkdir $DIR1 $DIR2
if [ -n "$GDB1" ]; then
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 --bitcoin-datadir=$DATADIR
read REPLY
else
$PREFIX ../daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 > $REDIR1 2> $REDIRERR1 &
$PREFIX ../daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR1 --bitcoin-datadir=$DATADIR > $REDIR1 2> $REDIRERR1 &
fi
if [ -n "$GDB2" ]; then
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2
echo Press return once you run: gdb --args daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 --bitcoin-datadir=$DATADIR
read REPLY
else
$PREFIX ../daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 > $REDIR2 2> $REDIRERR2 &
$PREFIX ../daemon/lightningd --log-level=debug --bitcoind-poll=1 --min-expiry=900 --lightning-dir=$DIR2 --bitcoin-datadir=$DATADIR > $REDIR2 2> $REDIRERR2 &
fi
i=0

View File

@ -8,7 +8,15 @@ if $CLI getinfo 2>/dev/null; then
fi
# Start clean
rm -rf $DATADIR/$REGTESTDIR
rm -rf $DATADIR
mkdir $DATADIR
# Create appropriate config file so cmdline matches.
cat > $DATADIR/bitcoin.conf <<EOF
regtest=1
testnet=0
walletbroadcast=0
EOF
$DAEMON &
i=0

View File

@ -2,17 +2,17 @@
if grep -q ^FEATURES.*ALPHA ../Makefile; then
STYLE=alpha
DATADIR=$HOME/.alpha
DATADIR=/tmp/alpha-lightning
REGTESTDIR=alpharegtest
CLI="alpha-cli -datadir=$DATADIR -regtest -testnet=0"
DAEMON="alphad -datadir=$DATADIR -regtest -testnet=0 -walletbroadcast=1"
CLI="alpha-cli -datadir=$DATADIR"
DAEMON="alphad -datadir=$DATADIR"
SEQ_ENFORCEMENT=true
else
STYLE=bitcoin
CLI="bitcoin-cli -regtest -testnet=0"
DATADIR=$HOME/.bitcoin
DATADIR=/tmp/bitcoin-lightning
CLI="bitcoin-cli -datadir=$DATADIR"
REGTESTDIR=regtest
DAEMON="bitcoind -regtest -testnet=0 -walletbroadcast=1"
DAEMON="bitcoind -datadir=$DATADIR"
if grep ^FEATURES ../Makefile | cut -d'#' -f1 | grep -q BIP68; then
SEQ_ENFORCEMENT=true
else