[tor-commits] [tor/master] Improved targets for "run all the tests, no, all of them."

nickm at torproject.org nickm at torproject.org
Mon Aug 3 17:50:39 UTC 2015


commit 6de49f4d9a9c0f0788e44e7199b935e175fb0ad4
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Aug 3 13:03:58 2015 -0400

    Improved targets for "run all the tests, no, all of them."
---
 Makefile.am               |   32 ++++++++++++++++++++------------
 changes/early-check-paths |    3 +++
 changes/test-full         |    3 +++
 3 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 87a5d8a..784ff48 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,26 +69,34 @@ doxygen:
 test: all
 	$(top_builddir)/src/test/test
 
+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; \
+	fi
+
 # 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
+test-network: need-chutney-path all
 	$(top_srcdir)/src/test/test-network.sh
 
-test-stem: $(TESTING_TOR_BINARY)
-	@if test -d "$$STEM_SOURCE_DIR"; then \
-		$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL; \
-	else \
+need-stem-path:
+	@if test ! -d "$$STEM_SOURCE_DIR"; then \
 		echo '$$STEM_SOURCE_DIR was not set.'; echo; \
 		echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
+		exit 1; \
 	fi
 
-test-stem-full: $(TESTING_TOR_BINARY)
-	@if test -d "$$STEM_SOURCE_DIR"; then \
-		$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL,ONLINE -v; \
-	else \
-		echo '$$STEM_SOURCE_DIR was not set.'; echo; \
-		echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
-	fi
+test-stem: need-stem-path $(TESTING_TOR_BINARY)
+	@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL;
+
+test-stem-full: need-stem-path $(TESTING_TOR_BINARY)
+	@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL,ONLINE -v;
+
+test-full: need-stem-path need-chutney-path check test-network test-stem
+
+test-full-online: need-stem-path need-chutney-path check test-network test-stem-full
 
 reset-gcov:
 	rm -f $(top_builddir)/src/*/*.gcda $(top_builddir)/src/*/*/*.gcda
diff --git a/changes/early-check-paths b/changes/early-check-paths
new file mode 100644
index 0000000..44bebbe
--- /dev/null
+++ b/changes/early-check-paths
@@ -0,0 +1,3 @@
+  o Testing:
+    - When running test-network or test-stem, check for the absence
+      of stem/chutney before doing any build operations.
\ No newline at end of file
diff --git a/changes/test-full b/changes/test-full
new file mode 100644
index 0000000..5ff51db
--- /dev/null
+++ b/changes/test-full
@@ -0,0 +1,3 @@
+  o Testing:
+    - Add new 'test-full' and 'test-full-online' targets to run all tests,
+      including integration tests with stem and chutney.





More information about the tor-commits mailing list