test: do version check during setup.

Waiting until lightningd is up is too long: do a --version test in setup,
and then check that all reported versions match later on.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-11-08 21:50:55 +10:30
parent 35b2ee9c42
commit d8892c4dda
2 changed files with 11 additions and 3 deletions

View File

@@ -2,6 +2,9 @@
. `dirname $0`/vars.sh
VERSION=$(`dirname $0`/../../lightning-cli --version | head -n1)
[ $VERSION = `git describe --always --dirty` ] || (echo Wrong version $VERSION >&2; exit 1)
if $CLI getinfo 2>/dev/null; then
echo $DAEMON already running >&2
exit 1