mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-22 14:23:04 +01:00
Autodetect CHUTNEY_PATH if chutney is next to tor
If the chutney and tor sources are side-by-side in the same parent directory, autodetect the chutney path. Closes ticket 16903. Patch by "teor".
This commit is contained in:
parent
b531fc7d9a
commit
d9948dfc9d
3 changed files with 20 additions and 3 deletions
11
Makefile.am
11
Makefile.am
|
@ -73,9 +73,14 @@ test: all
|
|||
|
||||
need-chutney-path:
|
||||
@if test ! -d "$$CHUTNEY_PATH"; then \
|
||||
echo '$$CHUTNEY_PATH was not set.'; echo; \
|
||||
echo "To run these tests, git clone https://git.torproject.org/chutney.git ; export CHUTNEY_PATH=\`pwd\`/chutney"; \
|
||||
exit 1; \
|
||||
echo '$$CHUTNEY_PATH was not set.'; \
|
||||
if test -d $(top_srcdir)/../chutney -a -x $(top_srcdir)/../chutney/chutney; then \
|
||||
echo "Assuming test-network.sh will find" $(top_srcdir)/../chutney; \
|
||||
else \
|
||||
echo; \
|
||||
echo "To run these tests, git clone https://git.torproject.org/chutney.git ; export CHUTNEY_PATH=\`pwd\`/chutney"; \
|
||||
exit 1; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
|
||||
|
|
4
changes/autodetect-chutney-path
Normal file
4
changes/autodetect-chutney-path
Normal file
|
@ -0,0 +1,4 @@
|
|||
o Minor features (testing):
|
||||
- Autodetect CHUTNEY_PATH if the chutney and tor sources are
|
||||
side-by-side in the same parent directory.
|
||||
Closes ticket 16903. Patch by "teor".
|
|
@ -59,8 +59,16 @@ NETWORK_FLAVOUR=${NETWORK_FLAVOUR:-basic}
|
|||
CHUTNEY_NETWORK=networks/$NETWORK_FLAVOUR
|
||||
myname=$(basename $0)
|
||||
|
||||
[ -n "$CHUTNEY_PATH" ] || {
|
||||
echo "$myname: \$CHUTNEY_PATH not set, trying $TOR_DIR/../chutney"
|
||||
CHUTNEY_PATH="$TOR_DIR/../chutney"
|
||||
}
|
||||
|
||||
[ -d "$CHUTNEY_PATH" ] && [ -x "$CHUTNEY_PATH/chutney" ] || {
|
||||
echo "$myname: missing 'chutney' in CHUTNEY_PATH ($CHUTNEY_PATH)"
|
||||
echo "$myname: Get chutney: git clone https://git.torproject.org/\
|
||||
chutney.git"
|
||||
echo "$myname: Set \$CHUTNEY_PATH to a non-standard location: export CHUTNEY_PATH=\`pwd\`/chutney"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue