summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-12 11:05:27 -0400
committerNick Mathewson <nickm@torproject.org>2019-03-12 11:05:27 -0400
commitc01c6123fa0ef207ca55f6ce9b4896b1f3de8b15 (patch)
tree600245822dc2602677527f8bbc8cf761d1c1eb1e /src/test
parent1c9b6292840dd5517578f398d517befbc99bd025 (diff)
parent4773fa647434eba582f775cb371894b7e36cdb34 (diff)
downloadtor-c01c6123fa0ef207ca55f6ce9b4896b1f3de8b15.tar.gz
tor-c01c6123fa0ef207ca55f6ce9b4896b1f3de8b15.zip
Merge remote-tracking branch 'tor-github/pr/779'
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/test-network.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 372c8cbac3..4d56e83806 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
# This script calls the equivalent script in chutney/tools
@@ -18,6 +18,10 @@ ECHO="${ECHO:-echo}"
# Output is prefixed with the name of the script
myname=$(basename "$0")
+# Save the arguments before we destroy them
+# This might not preserve arguments with spaces in them
+ORIGINAL_ARGS=( "$@" )
+
# We need to find CHUTNEY_PATH, so that we can call the version of this script
# in chutney/tools with the same arguments. We also need to respect --quiet.
until [ -z "$1" ]
@@ -95,7 +99,7 @@ if [ -d "$CHUTNEY_PATH" ] && [ -x "$TEST_NETWORK" ]; then
# this may fail if some arguments have spaces in them
# if so, set CHUTNEY_PATH before calling test-network.sh, and spaces
# will be handled correctly
- exec "$TEST_NETWORK" "$@"
+ exec "$TEST_NETWORK" "${ORIGINAL_ARGS[@]}" # $ORIGINAL_ARGS
else
$ECHO "$myname: Could not find tools/test-network.sh in CHUTNEY_PATH."
$ECHO "$myname: Please update your chutney using 'git pull'."