summaryrefslogtreecommitdiff
path: root/src/test/test-network.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-network.sh')
-rwxr-xr-xsrc/test/test-network.sh37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index be57cafb7f..cc74c0f823 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -1,6 +1,7 @@
#! /bin/sh
ECHO_N="/bin/echo -n"
+use_coverage_binary=false
until [ -z $1 ]
do
@@ -13,7 +14,7 @@ do
export TOR_DIR="$2"
shift
;;
- --flavo?r|--network-flavo?r)
+ --flavor|--flavour|--network-flavor|--network-flavour)
export NETWORK_FLAVOUR="$2"
shift
;;
@@ -21,6 +22,30 @@ do
export BOOTSTRAP_TIME="$2"
shift
;;
+ # Environmental variables used by chutney verify performance tests
+ # Send this many bytes per client connection (10 KBytes)
+ --data|--data-bytes|--data-byte|--bytes|--byte)
+ export CHUTNEY_DATA_BYTES="$2"
+ shift
+ ;;
+ # Make this many connections per client (1)
+ # Note: If you create 7 or more connections to a hidden service from
+ # a single client, you'll likely get a verification failure due to
+ # https://trac.torproject.org/projects/tor/ticket/15937
+ --connections|--connection|--connection-count|--count)
+ export CHUTNEY_CONNECTIONS="$2"
+ shift
+ ;;
+ # Make each client connect to each HS (0)
+ # 0 means a single client connects to each HS
+ # 1 means every client connects to every HS
+ --hs-multi-client|--hs-multi-clients|--hs-client|--hs-clients)
+ export CHUTNEY_HS_MULTI_CLIENT="$2"
+ shift
+ ;;
+ --coverage)
+ use_coverage_binary=true
+ ;;
*)
echo "Sorry, I don't know what to do with '$1'."
exit 2
@@ -38,9 +63,17 @@ myname=$(basename $0)
echo "$myname: missing 'chutney' in CHUTNEY_PATH ($CHUTNEY_PATH)"
exit 1
}
+
cd "$CHUTNEY_PATH"
# For picking up the right tor binaries.
-PATH="$TOR_DIR/src/or:$TOR_DIR/src/tools:$PATH"
+tor_name=tor
+tor_gencert_name=tor-gencert
+if test "$use_coverage_binary" = true; then
+ tor_name=tor-cov
+fi
+export CHUTNEY_TOR="${TOR_DIR}/src/or/${tor_name}"
+export CHUTNEY_TOR_GENCERT="${TOR_DIR}/src/tools/${tor_gencert_name}"
+
./tools/bootstrap-network.sh $NETWORK_FLAVOUR || exit 2
# Sleep some, waiting for the network to bootstrap.