[tor-commits] [tor/maint-0.3.0] Use bash in src/test/test-network.sh
nickm at torproject.org
nickm at torproject.org
Mon Feb 27 16:37:05 UTC 2017
commit 73879aa5b686cf445389f02a3d954222ea6ae2ae
Author: teor <teor2345 at gmail.com>
Date: Mon Feb 27 16:11:22 2017 +1100
Use bash in src/test/test-network.sh
This ensures we reliably call chutney's newer tools/test-network.sh when
available.
Fixes bug 21562; bugfix on tor-0.2.9.1-alpha.
---
changes/bug21562 | 4 ++++
src/test/test-network.sh | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/changes/bug21562 b/changes/bug21562
new file mode 100644
index 0000000..48396a0
--- /dev/null
+++ b/changes/bug21562
@@ -0,0 +1,4 @@
+ o Minor bugfixes (testing):
+ - Use bash in src/test/test-network.sh. This ensures we reliably call
+ chutney's newer tools/test-network.sh when available.
+ Fixes bug 21562; bugfix on tor-0.2.9.1-alpha.
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 2c37b6d..cb10f72 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
# Please do not modify this script, it has been moved to chutney/tools
@@ -178,7 +178,8 @@ export CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR
# And finish up if we're doing a dry run
if [ "$NETWORK_DRY_RUN" = true ]; then
# we can't exit here, it breaks argument processing
- return
+ # this only works in bash: return semantics are shell-specific
+ return 2>/dev/null || exit
fi
cd "$CHUTNEY_PATH"
More information about the tor-commits
mailing list