[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Add a dry run mode to test-network.sh
commit bb4506da6f89c28bb4cf06697fbe9f59d6a3a22b
Author: teor (Tim Wilson-Brown) <teor2345@xxxxxxxxx>
Date: Sun Jul 17 22:08:31 2016 +1000
Add a dry run mode to test-network.sh
---
src/test/test-network.sh | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index b88577d..5dc7f99 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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits