diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-07-17 22:08:31 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-26 19:20:53 -0400 |
commit | bb4506da6f89c28bb4cf06697fbe9f59d6a3a22b (patch) | |
tree | e4371366a919f9486c11f26b99272297814d6650 | |
parent | 6afd5506e92930eea10a2e911fa5717c8271cd67 (diff) | |
download | tor-bb4506da6f89c28bb4cf06697fbe9f59d6a3a22b.tar.gz tor-bb4506da6f89c28bb4cf06697fbe9f59d6a3a22b.zip |
Add a dry run mode to test-network.sh
-rwxr-xr-x | src/test/test-network.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh index b88577d970..5dc7f99cd3 100755 --- a/src/test/test-network.sh +++ b/src/test/test-network.sh @@ -48,9 +48,19 @@ do --coverage) export USE_COVERAGE_BINARY=true ;; + --dry-run) + # process arguments, but don't call any other scripts + export NETWORK_DRY_RUN=true + ;; *) echo "$myname: Sorry, I don't know what to do with '$1'." - exit 2 + echo "$myname: Maybe chutney's test-network.sh understands '$1'." + echo "$myname: Please update your chutney using 'git pull', and set \ +\$CHUTNEY_PATH" + # continue processing arguments during a dry run + if [ "$NETWORK_DRY_RUN" != true ]; then + exit 2 + fi ;; esac shift @@ -121,6 +131,11 @@ fi export NETWORK_FLAVOUR=${NETWORK_FLAVOUR:-"bridges+hs"} export CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR +# And finish up if we're doing a dry run +if [ "$NETWORK_DRY_RUN" = true]; then + exit 0 +fi + cd "$CHUTNEY_PATH" ./tools/bootstrap-network.sh $NETWORK_FLAVOUR || exit 2 |