[tor-commits] [tor/master] test-network.sh: tools dir in PATH, parameterization
nickm at torproject.org
nickm at torproject.org
Sun Sep 29 18:19:41 UTC 2013
commit 8bc5b9f3d0cd35ebf3d6eca428adc5d27e12e9dc
Author: Jim Pannacciulli <jpnc at member.fsf.org>
Date: Sun Sep 29 01:24:14 2013 -0400
test-network.sh: tools dir in PATH, parameterization
---
src/test/test-network.sh | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 9146ae3..7b59864 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.
More information about the tor-commits
mailing list