diff options
Diffstat (limited to 'src/test/test-network.sh')
-rwxr-xr-x | src/test/test-network.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh index 7b59864166..be57cafb7f 100755 --- a/src/test/test-network.sh +++ b/src/test/test-network.sh @@ -1,5 +1,7 @@ #! /bin/sh +ECHO_N="/bin/echo -n" + until [ -z $1 ] do case $1 in @@ -15,6 +17,10 @@ do export NETWORK_FLAVOUR="$2" shift ;; + --delay|--sleep|--bootstrap-time|--time) + export BOOTSTRAP_TIME="$2" + shift + ;; *) echo "Sorry, I don't know what to do with '$1'." exit 2 @@ -39,9 +45,14 @@ PATH="$TOR_DIR/src/or:$TOR_DIR/src/tools:$PATH" # 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" +BOOTSTRAP_TIME=${BOOTSTRAP_TIME:-25} +$ECHO_N "$myname: sleeping for $BOOTSTRAP_TIME seconds" n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do - sleep 1; n=$(expr $n - 1); echo -n . + sleep 1; n=$(expr $n - 1); $ECHO_N . done; echo "" ./chutney verify $CHUTNEY_NETWORK +VERIFY_EXIT_STATUS=$? +# work around a bug/feature in make -j2 (or more) +# where make hangs if any child processes are still alive +./chutney stop $CHUTNEY_NETWORK +exit $VERIFY_EXIT_STATUS |