4 use_coverage_binary
=false
10 export CHUTNEY_PATH
="$2"
17 --flavor|
--flavour|
--network-flavor|
--network-flavour)
18 export NETWORK_FLAVOUR
="$2"
21 --delay|
--sleep|
--bootstrap-time|
--time)
22 export BOOTSTRAP_TIME
="$2"
25 # Environmental variables used by chutney verify performance tests
26 # Send this many bytes per client connection (10 KBytes)
27 --data|
--data-bytes|
--data-byte|
--bytes|
--byte)
28 export CHUTNEY_DATA_BYTES
="$2"
31 # Make this many connections per client (1)
32 # Note: If you create 7 or more connections to a hidden service from
33 # a single client, you'll likely get a verification failure due to
34 # https://trac.torproject.org/projects/tor/ticket/15937
35 --connections|
--connection|
--connection-count|
--count)
36 export CHUTNEY_CONNECTIONS
="$2"
39 # Make each client connect to each HS (0)
40 # 0 means a single client connects to each HS
41 # 1 means every client connects to every HS
42 --hs-multi-client|
--hs-multi-clients|
--hs-client|
--hs-clients)
43 export CHUTNEY_HS_MULTI_CLIENT
="$2"
47 use_coverage_binary
=true
50 echo "Sorry, I don't know what to do with '$1'."
57 TOR_DIR
="${TOR_DIR:-$PWD}"
58 NETWORK_FLAVOUR
=${NETWORK_FLAVOUR:-"bridges+hs"}
59 CHUTNEY_NETWORK
=networks
/$NETWORK_FLAVOUR
62 [ -n "$CHUTNEY_PATH" ] ||
{
63 echo "$myname: \$CHUTNEY_PATH not set, trying $TOR_DIR/../chutney"
64 CHUTNEY_PATH
="$TOR_DIR/../chutney"
67 [ -d "$CHUTNEY_PATH" ] && [ -x "$CHUTNEY_PATH/chutney" ] ||
{
68 echo "$myname: missing 'chutney' in CHUTNEY_PATH ($CHUTNEY_PATH)"
69 echo "$myname: Get chutney: git clone https://git.torproject.org/\
71 echo "$myname: Set \$CHUTNEY_PATH to a non-standard location: export CHUTNEY_PATH=\`pwd\`/chutney"
76 # For picking up the right tor binaries.
78 tor_gencert_name
=tor-gencert
79 if test "$use_coverage_binary" = true
; then
82 export CHUTNEY_TOR
="${TOR_DIR}/src/or/${tor_name}"
83 export CHUTNEY_TOR_GENCERT
="${TOR_DIR}/src/tools/${tor_gencert_name}"
85 .
/tools
/bootstrap-network.sh
$NETWORK_FLAVOUR ||
exit 2
87 # Sleep some, waiting for the network to bootstrap.
88 # TODO: Add chutney command 'bootstrap-status' and use that instead.
89 BOOTSTRAP_TIME
=${BOOTSTRAP_TIME:-35}
90 $ECHO_N "$myname: sleeping for $BOOTSTRAP_TIME seconds"
91 n
=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do
92 sleep 1; n
=$
(expr $n - 1); $ECHO_N .
94 .
/chutney verify
$CHUTNEY_NETWORK
96 # work around a bug/feature in make -j2 (or more)
97 # where make hangs if any child processes are still alive
98 .
/chutney stop
$CHUTNEY_NETWORK
99 exit $VERIFY_EXIT_STATUS