aboutsummaryrefslogtreecommitdiff
path: root/src/test/test-network.sh
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-08-03 13:23:58 -0400
committerNick Mathewson <nickm@torproject.org>2015-08-03 13:23:58 -0400
commit62e6513b48009adba289243155b93da3212c00c2 (patch)
tree3cb44c91107068ec63fbe3c292c8315950576026 /src/test/test-network.sh
parent6de49f4d9a9c0f0788e44e7199b935e175fb0ad4 (diff)
downloadtor-62e6513b48009adba289243155b93da3212c00c2.tar.gz
tor-62e6513b48009adba289243155b93da3212c00c2.zip
When building with coverage, run chutney with coverage
Previously, this required me to do stuff like 'cp src/or/tor-cov src/or/tor' , which is pretty embarrassing.
Diffstat (limited to 'src/test/test-network.sh')
-rwxr-xr-xsrc/test/test-network.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 49bf03c0d3..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
@@ -41,7 +42,10 @@ do
--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
@@ -59,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.