[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Makefike: Add an IPv6 test to test-network



commit 9d352028e60fa5b2b239f6ce0803c2b1b0cb5d84
Author: teor <teor@xxxxxxxxxxxxxx>
Date:   Thu Feb 13 11:57:36 2020 +1000

    Makefike: Add an IPv6 test to test-network
    
    The IPv6 test only runs if IPv6 is available.
    
    Also, explicitly use the bridges+hs-v2 network for the IPv4-only test.
    This network was chutney's default as of January 2020.
    
    Closes 33300.
---
 Makefile.am         | 15 +++++++++++----
 changes/ticket33300 |  3 +++
 src/test/include.am | 10 ++++++++++
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 3f93e9f5c..72ea34380 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -275,6 +275,9 @@ check-local:					\
 	shellcheck				\
 	check-cocci
 
+# test-network requires a copy of Chutney in $CHUTNEY_PATH.
+# Chutney can be cloned from https://git.torproject.org/chutney.git .
+.PHONY: need-chutney-path
 need-chutney-path:
 	@if test ! -d "$$CHUTNEY_PATH"; then \
 		echo '$$CHUTNEY_PATH was not set.'; \
@@ -287,10 +290,14 @@ need-chutney-path:
 		fi \
 	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: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
-	$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)
+# Run some basic tests using automake's test-driver
+.PHONY: test-network
+test-network:
+	@$(MAKE) test-network-mkdir
+	@$(MAKE) test-network-clean
+	@$(MAKE) test-network-ipv4-impl ipv4_flavors="$(TEST_CHUTNEY_FLAVOR_QUICK)"
+	@$(MAKE) test-network-ipv6-impl ipv6_flavors="$(TEST_CHUTNEY_FLAVOR_QUICK_IPV6)"
+	@$(MAKE) test-network-results
 
 # Run all available tests using automake's test-driver
 .PHONY: test-network-all
diff --git a/changes/ticket33300 b/changes/ticket33300
new file mode 100644
index 000000000..9b0bdce37
--- /dev/null
+++ b/changes/ticket33300
@@ -0,0 +1,3 @@
+  o Testing:
+    - Add a basic IPv6 test to "make test-network". This test only runs when
+      the local machine has an IPv6 stack. Closes ticket 33300.
diff --git a/src/test/include.am b/src/test/include.am
index 90e50752c..47e8d8fb0 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -61,11 +61,21 @@ TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
 	$(TESTSCRIPTS)
 
 # These flavors are run using automake's test-driver and test-network.sh
+
+# run a quick test or two
+# this test only uses IPv4
+TEST_CHUTNEY_FLAVOR_QUICK = bridges+hs-v2
+# only run if we can ping6 ::1 (localhost)
+TEST_CHUTNEY_FLAVOR_QUICK_IPV6 = client-ipv6-only-md
+
+# run a basic set of tests, which only use IPv4
 TEST_CHUTNEY_FLAVORS = basic-min bridges-min hs-v2-min hs-v3-min \
 	single-onion-v23
+
 # only run if we can ping6 ::1 (localhost)
 TEST_CHUTNEY_FLAVORS_IPV6 = bridges+ipv6-min ipv6-exit-min hs-v23-ipv6-md \
 	single-onion-v23-ipv6-md
+
 # only run if we can find a stable (or simply another) version of tor
 TEST_CHUTNEY_FLAVORS_MIXED = mixed+hs-v2
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits