aboutsummaryrefslogtreecommitdiff
path: root/src/test/test-network.sh
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2014-10-01 18:05:04 +1000
committerteor <teor2345@gmail.com>2014-10-01 18:05:04 +1000
commitbae73343902072c24469d42deffe90b22b7fff6e (patch)
tree58c33df5993573bfe95a0e325fd07f95832f6566 /src/test/test-network.sh
parent7c0215f8cafd2b7e1d251439b97ad97ec46e6211 (diff)
downloadtor-bae73343902072c24469d42deffe90b22b7fff6e.tar.gz
tor-bae73343902072c24469d42deffe90b22b7fff6e.zip
Add test-network delay option
Add a --delay option to test-network.sh, which configures the delay before the chutney network tests for data transmission. The default remains at 18 seconds if the argument isn't specified. Apparently we should be using bootstrap status for this (eventually). Partially implements ticket 13161.
Diffstat (limited to 'src/test/test-network.sh')
-rwxr-xr-xsrc/test/test-network.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index e1bed5c694..4fe4e639fe 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -17,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
@@ -41,7 +45,7 @@ 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
+BOOTSTRAP_TIME=${BOOTSTRAP_TIME:-18}
$ECHO_N "$myname: sleeping for $BOOTSTRAP_TIME seconds"
n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do
sleep 1; n=$(expr $n - 1); $ECHO_N .