]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add test-network delay option
authorteor <teor2345@gmail.com>
Wed, 1 Oct 2014 08:05:04 +0000 (18:05 +1000)
committerteor <teor2345@gmail.com>
Wed, 1 Oct 2014 08:05:04 +0000 (18:05 +1000)
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.

changes/feature13161-test-network-delay-option [new file with mode: 0644]
src/test/test-network.sh

diff --git a/changes/feature13161-test-network-delay-option b/changes/feature13161-test-network-delay-option
new file mode 100644 (file)
index 0000000..1cf2e71
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features (testing):
+    - Add a --delay option to test-network.sh, which configures the delay
+      before the chutney network tests for data transmission.
+      Partially implements ticket 13161.
index e1bed5c694326f15dc68dcfa174eadd34148faa2..4fe4e639fef0d5f91465135a867ed1399797eacb 100755 (executable)
@@ -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 .