Commit bb4506da authored by teor (Tim Wilson-Brown)'s avatar teor (Tim Wilson-Brown) Committed by Nick Mathewson
Browse files

Add a dry run mode to test-network.sh

parent 6afd5506
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -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'."
      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