mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-23 20:03:31 +01:00
Add make target test-network running traffic tests in a Chutney network.
This implements ticket #8530.
This commit is contained in:
parent
c132427db4
commit
c82d7950ad
@ -60,6 +60,10 @@ doxygen:
|
||||
test: all
|
||||
./src/test/test
|
||||
|
||||
# Requires a copy of Chutney in ./chutney
|
||||
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:
|
||||
|
3
changes/bug8530
Normal file
3
changes/bug8530
Normal file
@ -0,0 +1,3 @@
|
||||
o Enhancements
|
||||
- Add make target 'test-network' running tests on a Chutney
|
||||
network.
|
23
src/test/test-network.sh
Executable file
23
src/test/test-network.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
CHUTNEY_BASEDIR=./chutney # FIXME
|
||||
TOR_DIR=$(/bin/pwd)/src/or
|
||||
NETWORK_FLAVOUR=basic
|
||||
CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR
|
||||
myname=$(/usr/bin/basename $0)
|
||||
|
||||
cd $CHUTNEY_BASEDIR || {
|
||||
echo "$myname: missing chutney dir: $CHUTNEY_BASEDIR"
|
||||
exit 1
|
||||
}
|
||||
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
|
||||
/bin/sleep 1; n=$(/usr/bin/expr $n - 1); echo -n .
|
||||
done; echo ""
|
||||
./chutney verify $CHUTNEY_NETWORK
|
Loading…
Reference in New Issue
Block a user