commit 1ac58478c113b40c17d3bd43ebe00639d419eb51 Author: teor (Tim Wilson-Brown) teor2345@gmail.com Date: Mon Jul 18 13:15:40 2016 +1000
Allow tor and tor-gencert to be specified on the chutney command-line
Now works via --tor and --tor-gencert. Overridden by the build directory set via --tor-path and $TOR_DIR. --- README | 6 +++++- tools/test-network.sh | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/README b/README index 826e5dd..0ae9380 100644 --- a/README +++ b/README @@ -19,8 +19,12 @@ Stuff to try:
Automated Setup, Verification, and Shutdown: ./tools/test-network.sh --flavor basic-min - ./tools/test-network.sh --tor-path <tor-build-directory> ./tools/test-network.sh --coverage + ./tools/test-network.sh --tor-path <tor-build-directory> + ./tools/test-network.sh --tor <name-or-path> --tor-gencert <name-or-path> + (--tor-path and $TOR_DIR override --tor and --tor-gencert.) + +The environmental variables documented below also work with test-network.sh.
Standard Actions: ./chutney configure networks/basic diff --git a/tools/test-network.sh b/tools/test-network.sh index 3cd6092..2e0cd7c 100755 --- a/tools/test-network.sh +++ b/tools/test-network.sh @@ -13,9 +13,21 @@ do shift ;; --tor-path) + # the path of a tor build directory + # --tor-path overrides --tor and --tor-gencert export TOR_DIR="$2" shift ;; + --tor) + # the name or path of a tor binary + export CHUTNEY_TOR="$2" + shift + ;; + --tor-gencert) + # the name or path of a tor-gencert binary + export CHUTNEY_TOR_GENCERT="$2" + shift + ;; --flavor|--flavour|--network-flavor|--network-flavour) export NETWORK_FLAVOUR="$2" shift @@ -113,7 +125,9 @@ CHUTNEY_PATH=`pwd`/chutney" fi
# For picking up the right tor binaries. -# If these varibles aren't set, chutney looks for tor binaries in $PATH +# If $TOR_DIR isn't set, chutney looks for tor binaries by name or path +# using $CHUTNEY_TOR and $CHUTNEY_TOR_GENCERT, and then falls back to +# looking for tor and tor-gencert in $PATH if [ -d "$TOR_DIR" ]; then tor_name=tor tor_gencert_name=tor-gencert