Browse Source

Merge remote-tracking branch 'teor/autodetect-chutney-path'

Nick Mathewson 8 years ago
parent
commit
fe4273fdc1
2 changed files with 12 additions and 3 deletions
  1. 8 3
      Makefile.am
  2. 4 0
      changes/autodetect-chutney-path

+ 8 - 3
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 - 0
changes/autodetect-chutney-path

@@ -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".