diff options
-rw-r--r-- | changes/bug13161-test-network-echo-n | 3 | ||||
-rwxr-xr-x | src/test/test-network.sh | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/changes/bug13161-test-network-echo-n b/changes/bug13161-test-network-echo-n new file mode 100644 index 0000000000..501ebdda1f --- /dev/null +++ b/changes/bug13161-test-network-echo-n @@ -0,0 +1,3 @@ + o Minor bugfixes: + - Stop using "echo -n", as some shells' built-in echo doesn't support + "-n". Instead, use "/bin/echo -n". Partially fixes bug 13161. diff --git a/src/test/test-network.sh b/src/test/test-network.sh index 7b59864166..e1bed5c694 100755 --- a/src/test/test-network.sh +++ b/src/test/test-network.sh @@ -1,5 +1,7 @@ #! /bin/sh +ECHO_N="/bin/echo -n" + until [ -z $1 ] do case $1 in @@ -40,8 +42,8 @@ PATH="$TOR_DIR/src/or:$TOR_DIR/src/tools:$PATH" # Sleep some, waiting for the network to bootstrap. # TODO: Add chutney command 'bootstrap-status' and use that instead. BOOTSTRAP_TIME=18 -echo -n "$myname: sleeping for $BOOTSTRAP_TIME seconds" +$ECHO_N "$myname: sleeping for $BOOTSTRAP_TIME seconds" n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do - sleep 1; n=$(expr $n - 1); echo -n . + sleep 1; n=$(expr $n - 1); $ECHO_N . done; echo "" ./chutney verify $CHUTNEY_NETWORK |