diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-06-29 16:02:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-06-29 16:02:13 -0400 |
commit | f631b73cd5d97ff1eede5d57008ff7392c44a4bc (patch) | |
tree | f804e6a66f9770361dced68c68b9e4f4784f8d3c | |
parent | 0c3d676f9ea879ec78b442cc9b0c4d0231f0d2b0 (diff) | |
parent | 538ca4153a1334179856866abf32975caf8daae4 (diff) | |
download | tor-f631b73cd5d97ff1eede5d57008ff7392c44a4bc.tar.gz tor-f631b73cd5d97ff1eede5d57008ff7392c44a4bc.zip |
Merge remote-tracking branch 'linus/bug8530'
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | changes/bug8530 | 3 | ||||
-rwxr-xr-x | src/test/test-network.sh | 25 |
3 files changed, 33 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 4639c22c41..a736638e4b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,6 +60,11 @@ doxygen: test: all ./src/test/test +# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH. +# Chutney can be cloned from https://git.torproject.org/chutney.git . +test-network: all + ./src/test/test-network.sh + # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c, # eventdns.[hc], tinytest*.[ch] check-spaces: diff --git a/changes/bug8530 b/changes/bug8530 new file mode 100644 index 0000000000..f66b602dbd --- /dev/null +++ b/changes/bug8530 @@ -0,0 +1,3 @@ + o Enhancements + - Add make target 'test-network' running tests on a Chutney + network. diff --git a/src/test/test-network.sh b/src/test/test-network.sh new file mode 100755 index 0000000000..9146ae3ce4 --- /dev/null +++ b/src/test/test-network.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +# NOTE: Requires Chutney in $CHUTNEY_PATH. + +TOR_DIR=$(pwd)/src/or +NETWORK_FLAVOUR=basic +CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR +myname=$(basename $0) + +[ -d "$CHUTNEY_PATH" ] && [ -x "$CHUTNEY_PATH/chutney" ] || { + echo "$myname: missing 'chutney' in CHUTNEY_PATH ($CHUTNEY_PATH)" + exit 1 +} +cd "$CHUTNEY_PATH" +PATH=$TOR_DIR:$PATH # For picking up the right tor binary. +./tools/bootstrap-network.sh $NETWORK_FLAVOUR || exit 2 + +# 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" +n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do + sleep 1; n=$(expr $n - 1); echo -n . +done; echo "" +./chutney verify $CHUTNEY_NETWORK |