Commit f631b73c authored by Nick Mathewson's avatar Nick Mathewson 🐘
Browse files

Merge remote-tracking branch 'linus/bug8530'

parents 0c3d676f 538ca415
Loading
Loading
Loading
Loading
+5 −0
Changes for Makefile.am: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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:

changes/bug8530

0 → 100644
+3 −0
Changes for changes/bug8530: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
  o Enhancements
    - Add make target 'test-network' running tests on a Chutney
      network.
+25 −0
Changes for src/test/test-network.sh: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
#! /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