aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Pannacciulli <jpnc@member.fsf.org>2013-09-29 01:24:14 -0400
committerNick Mathewson <nickm@torproject.org>2013-09-29 14:19:00 -0400
commit8bc5b9f3d0cd35ebf3d6eca428adc5d27e12e9dc (patch)
tree5ad35aa050d66fc32c6dc6d019e974f57df779c4 /src
parent09e850dc3657b8e83016d43d237dd00272957765 (diff)
downloadtor-8bc5b9f3d0cd35ebf3d6eca428adc5d27e12e9dc.tar
tor-8bc5b9f3d0cd35ebf3d6eca428adc5d27e12e9dc.tar.gz
test-network.sh: tools dir in PATH, parameterization
Diffstat (limited to 'src')
-rwxr-xr-xsrc/test/test-network.sh30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 9146ae3ce..7b5986416 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -1,9 +1,30 @@
#! /bin/sh
-# NOTE: Requires Chutney in $CHUTNEY_PATH.
+until [ -z $1 ]
+do
+ case $1 in
+ --chutney-path)
+ export CHUTNEY_PATH="$2"
+ shift
+ ;;
+ --tor-path)
+ export TOR_DIR="$2"
+ shift
+ ;;
+ --flavo?r|--network-flavo?r)
+ export NETWORK_FLAVOUR="$2"
+ shift
+ ;;
+ *)
+ echo "Sorry, I don't know what to do with '$1'."
+ exit 2
+ ;;
+ esac
+ shift
+done
-TOR_DIR=$(pwd)/src/or
-NETWORK_FLAVOUR=basic
+TOR_DIR="${TOR_DIR:-$PWD}"
+NETWORK_FLAVOUR=${NETWORK_FLAVOUR:-basic}
CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR
myname=$(basename $0)
@@ -12,7 +33,8 @@ myname=$(basename $0)
exit 1
}
cd "$CHUTNEY_PATH"
-PATH=$TOR_DIR:$PATH # For picking up the right tor binary.
+# For picking up the right tor binaries.
+PATH="$TOR_DIR/src/or:$TOR_DIR/src/tools:$PATH"
./tools/bootstrap-network.sh $NETWORK_FLAVOUR || exit 2
# Sleep some, waiting for the network to bootstrap.