2013-06-05 15:48:57 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
2013-06-05 15:48:57 +02:00
|
|
|
# NOTE: Requires Chutney in $CHUTNEY_PATH.
|
|
|
|
|
2013-06-05 15:48:57 +02:00
|
|
|
TOR_DIR=$(pwd)/src/or
|
2013-06-05 15:48:57 +02:00
|
|
|
NETWORK_FLAVOUR=basic
|
|
|
|
CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR
|
2013-06-05 15:48:57 +02:00
|
|
|
myname=$(basename $0)
|
2013-06-05 15:48:57 +02:00
|
|
|
|
2013-06-05 15:48:57 +02:00
|
|
|
[ -d "$CHUTNEY_PATH" ] && [ -x "$CHUTNEY_PATH/chutney" ] || {
|
|
|
|
echo "$myname: missing 'chutney' in CHUTNEY_PATH ($CHUTNEY_PATH)"
|
2013-06-05 15:48:57 +02:00
|
|
|
exit 1
|
|
|
|
}
|
2013-06-05 15:48:57 +02:00
|
|
|
cd "$CHUTNEY_PATH"
|
2013-06-05 15:48:57 +02:00
|
|
|
PATH=$TOR_DIR:$PATH # For picking up the right tor binary.
|
|
|
|
./tools/bootstrap-network.sh $NETWORK_FLAVOUR || exit 2
|
|
|
|
|
|
|
|
# Sleep some, waiting for the network to bootstrap.
|
|
|
|
# TODO: Add chutney command 'bootstrap-status' and use that instead.
|
|
|
|
BOOTSTRAP_TIME=18
|
|
|
|
echo -n "$myname: sleeping for $BOOTSTRAP_TIME seconds"
|
|
|
|
n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do
|
2013-06-05 15:48:57 +02:00
|
|
|
sleep 1; n=$(expr $n - 1); echo -n .
|
2013-06-05 15:48:57 +02:00
|
|
|
done; echo ""
|
|
|
|
./chutney verify $CHUTNEY_NETWORK
|